OBJ imports with no textures from max and uanble to dae format

5886
14
08-23-2015 10:42 AM
bhaskarsjsj
New Contributor II

Hello

I have created a 3ds max glass building with textures, and exported it as obj file with mtl and texture in the same citiengine workspace folder / models folder, but  when imported into Citi engine it does not show any textures,

Is there anyway of applying manually.

I have followed  all your procedures but still a failure.How Can I Create a Scene with .OBJ Texture?​@

14 Replies
MicahTaylor
Occasional Contributor III

Hi!

     Have you tried opening the .mtl and checking the path name to the textures for each model component?

It should look similar to this....

newmtl component

Ka 0.000000 0.000000 0.000000

Kd 0.400000 0.392157 0.368627

Ks 0.330000 0.330000 0.330000

map_Kd YourAssets/YourTexture.jpg ​#This should be the path to your texture

Good luck!

0 Kudos
by Anonymous User
Not applicable

Also check that the material name has no spaces:

like Micah said:

newmtl component

not like this:

new mtl component

I believe space in material name will produce that error you have.

0 Kudos
bhaskarsjsj
New Contributor II

                        

I have tried everything you have mentioned but nothing is happening

can you be more specific about this ---YourAssets/YourTexture.jpg #This should be the path to your texture

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 24.08.2015 22:17:38

newmtl Arch41_057_mat_1
Ns 0.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 1.0000 0.8784 0.0667
Kd 1.0000 0.8784 0.0667
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka Arch41_057_leaf.jpg
map_Kd Arch41_057_leaf.jpg

newmtl 13___Default
Ns 10.0000
Ni 1.5000
d 0.5000
Tr 0.5000
Tf 0.5000 0.5000 0.5000
illum 2
Ka 0.4196 0.7725 0.9059
Kd 0.4196 0.7725 0.9059
Ks 0.7000 0.7000 0.7000
Ke 0.0000 0.0000 0.0000
map_Ka HighRiseGlass0055_2_S.jpg
map_Kd HighRiseGlass0055_2_S.jpg

this is what mtl I am getting after exporting to obj in 3dsmax 2014, all the texture and obj and mtl is in the model folder of citiengine workspace\

can you please make the problem here please.

0 Kudos
MicahTaylor
Occasional Contributor III

The file appears to be formatted correctly so I am not sure how to fix this.  However, I have done a couple of things on my obj files in the past that seem to have worked. Try rearranging the file in the following formats and see if it works...

Try this one first.....

newmtl Arch41_057_mat_1
Ns 0.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000


newmtl Arch41_057_mat_1  
Ka 1.0000 0.8784 0.0667
Kd 1.0000 0.8784 0.0667
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka Arch41_057_leaf.jpg
map_Kd Arch41_057_leaf.jpg

newmtl 13___Default
Ns 10.0000
Ni 1.5000
d 0.5000
Tr 0.5000
Tf 0.5000 0.5000 0.5000


newmtl 13___Default
Ka 0.4196 0.7725 0.9059
Kd 0.4196 0.7725 0.9059
Ks 0.7000 0.7000 0.7000
Ke 0.0000 0.0000 0.0000
map_Ka HighRiseGlass0055_2_S.jpg
map_Kd HighRiseGlass0055_2_S.jpg

Try this one next (remove the illum entirely)....


newmtl Arch41_057_mat_1
Ka 1.0000 0.8784 0.0667
Kd 1.0000 0.8784 0.0667
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka Arch41_057_leaf.jpg
map_Kd Arch41_057_leaf.jpg


newmtl 13___Default
Ka 0.4196 0.7725 0.9059
Kd 0.4196 0.7725 0.9059
Ks 0.7000 0.7000 0.7000
Ke 0.0000 0.0000 0.0000
map_Ka HighRiseGlass0055_2_S.jpg
map_Kd HighRiseGlass0055_2_S.jpg

Lastly, try putting ONLY TEXTURES in a separate folder within your "Models" folder (For example : models/RandomFolder/HighRiseGlass0055_2_S.jpg) and try this format...

newmtl Arch41_057_mat_1

Ka 1.0000 0.8784 0.0667

Kd 1.0000 0.8784 0.0667

Ks 0.0000 0.0000 0.0000

Ke 0.0000 0.0000 0.0000

map_Kd models/RandomFolder/Arch41_057_leaf.jpg


newmtl 13___Default
Ka 0.4196 0.7725 0.9059
Kd 0.4196 0.7725 0.9059
Ks 0.7000 0.7000 0.7000
Ke 0.0000 0.0000 0.0000
map_Kd models/RandomFolder/HighRiseGlass0055_2_S.jpg

If none of these work, zip up the textures, obj, and mtl and attach it in a comment and I will see if I can get it to work on my end if you like.

Another thing you might try is this....look within the software you made the model...and find the option to "Export two-sided faces" and DISABLE it. I have had this problem in the past as well.

Good luck, I know this is frustrating from experience; especially when you spend a lot of time building a model and it will not export.

0 Kudos
bhaskarsjsj
New Contributor II

Thank you Micah Taylor

Nothing is working, there should a much easier way of importing 3d models like fbx which does have much complication like obj files.

can I assign the materials manually in citiengine for the model.

Is there anyway for it.

I have 3xported it in 3ds max 2014 , where can  I find "Export two-sided faces" in 3s max.

thank you once again

0 Kudos
MicahTaylor
Occasional Contributor III

I agree this should be much easier.

I am not familiar with 3DS, but have only adjusted mtl files within CityEngine.  Here is a link that might help you with two sided faces

2-Sided (Double Sided) | 3ds Max | Autodesk Knowledge Network

You can assign the materials manually, but it is a bit tedious.  Just click the model, go to shapes->Convert Models to shapes.  Next, select the new shapes from the model and select shapes->Clean up shapes.  Now you can click individual faces and use the texture button to select textures for the shapes.  Just keep in mind that  the model is not a model anymore at this point , but it is a shape.  It can still be exported as a model, but it will always be a shape in CityEngine unless you apply a rule to it.

Sometimes, when you convert the models to shapes, the textures will show up behind the shape faces.  Try deleting one face on the shapes and see if your textures appear. (See below....this is a model --> convert model to shape--->cleanup shape--->delete the faces covering the textures)

0 Kudos
bhaskarsjsj
New Contributor II

I have tried everything you have mentioned but nothing is happening

can you be more specific about this ---YourAssets/YourTexture.jpg #This should be the path to your texture

# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 24.08.2015 22:17:38

newmtl Arch41_057_mat_1
Ns 0.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 1.0000 0.8784 0.0667
Kd 1.0000 0.8784 0.0667
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka Arch41_057_leaf.jpg
map_Kd Arch41_057_leaf.jpg

newmtl 13___Default
Ns 10.0000
Ni 1.5000
d 0.5000
Tr 0.5000
Tf 0.5000 0.5000 0.5000
illum 2
Ka 0.4196 0.7725 0.9059
Kd 0.4196 0.7725 0.9059
Ks 0.7000 0.7000 0.7000
Ke 0.0000 0.0000 0.0000
map_Ka HighRiseGlass0055_2_S.jpg
map_Kd HighRiseGlass0055_2_S.jpg

this is what mtl I am getting after exporting to obj in 3dsmax 2014, all the texture and obj and mtl is in the model folder of citiengine workspace\

can you please make the problem here please.

0 Kudos
MicahTaylor
Occasional Contributor III

Also, dont forget to refresh the "models" folder and workspace every now and then.

0 Kudos
KennethLindhardt
Occasional Contributor

Hi there,

The Tr in the .mtl files is transparently, so when CE are receiving Tr 0, it means that this is fully transparent, and not visible. So it’s correct that you need to reverse the transparency 0 = 1, the rest I usually leave as they are, but I think the right way to do it would be 0.55 = 0.45. I don’t know why it is reversing it like that, maybe there is a fix.

You will have to check if you are assigning the materials in 3DS as standard materials, if not you are not able to see them outside an autodesk product, since .obj not are supporting autodesk materials. I couple of test I ran with FBX export from an Autodesk product, shown that even if you are exporting as FBX, other applications will not recognize Autodesk materials (the couple I’ve tested anyway)    

So you will have to go from something like this:

3ds_1.png

To this:

3DS2.png

The you will be able to see your materials i CE

3ds3.png

This seems stupid, but I don’t think it’s CE to blame, but more like the autodesk materials, not being able to show outside of autodesk. But again they work great inside Autodesk