3D Studio MAX objects to CityEngine

5415
7
01-23-2015 01:48 PM
SteveRhyne
New Contributor III

I'm creating custom objects that I'd like to import into CE but my textures are not coming through. I've export my objects to Collada (.dae) and Wavefront object (obj). I tested my exports to bring them back into 3DS Max and they lose the texture so I feel this is an export problem and not a CE problem. However, I reviewed material files from ESRI sample CE projects and the format is different than what 3DS Max is exporting. Does anyone know more about obj export versions/formats? Attached are 2 files to compare.

0 Kudos
7 Replies
DavidWasserman
Regular Contributor

Hi Steve,
Can you include the objs so we can see mapping between the MTL and the Obj? Or is it proprietary?

Did you try changing the back face culling settings?

David

David Wasserman, AICP
0 Kudos
SteveRhyne
New Contributor III

I updated the post with the OBJ and MTL files. Are you referring to making the back face culling in 3DS MAX?

0 Kudos
DavidWasserman
Regular Contributor

That and in CityEngine. Just messing with the display options could give me some more information.
Viewing Modes and Display Settings

David Wasserman, AICP
0 Kudos
SteveRhyne
New Contributor III

I did. No change. What is strange is the MTL file I looked at from your asset folder for the complete streets clearly lists the JPGs it would use for the texture whereas my MTL completely ignores the JPGs. Here is what the model looks like. Simple with 3 textures.

Sample.jpg

0 Kudos
SteveRhyne
New Contributor III

And it always creates this line in the MTL file when it should list the texture.

newmtl wire_087225087

  Ns 32

  d 1

  Tr 0

  Tf 1 1 1

  illum 2

  Ka 0.3412 0.8824 0.3412

  Kd 0.3412 0.8824 0.3412

  Ks 0.3500 0.3500 0.3500

0 Kudos
DavidWasserman
Regular Contributor

I came here to say this haha. Sorry still working on Data_Viz rule (can normalize data sets now).

This is your MTL. Notice that the lead to the image file is not present. The way this mapping works  is that when you insert an OBJ, your obj calls the MTL file. The MTL file must have a same directory mapping (as in the name of the mtl file) mapped within the obj. Then the MTL file will call the actual images who also must be in the same directory based on the mapping and established in the file. In fact I use this often to edit MTL files manually so I can put them in a folder and then create the mapping between them with that directory change (So if I put the images in the folder Tree for the other image, I write map_Kd Tree/Alderbuckthorn_Billboard.png. There are three opportunities for this to mess up, the obj mapping to the MTL, MTL mapping to the images, and the fact that your images may not be in the correct directory.

IF this is does not work, I will experiment more with images I create. Back to rules.

MTL Not Mapped.JPGMTL Mapped.JPG

David Wasserman, AICP
0 Kudos
RebeccaRichman
Esri Contributor

You may want to check out the following thread: How Can I Create a Scene with .OBJ Texture?

Based on that, it sounds like you need to first import a building footprint and then apply the model to the footprint via a rule