4

My Artist created a 3d shoe model as FBX in 3d studio Max . which looks as the following image.

3d Shoe model snapshot of FBX file

i use jMonkeyEngine in my Program, and it does not support FBX file so i export FBX to wavefront OBJ file , the 3d studio max also gives me the corresponding mtl file as well.

so when i load the exported obj model into my program which uses jMonkeyEngine as a library,it does not look as real shoe , not it has any texture on it.

3d shoe Model snapshot of OBJ file

the program also shows one warning

WARNING: OBJ mesh style_7-geom-0 doesnt contain normals! It might not display correctly

my simpleInitApp method

Spatial myModel = assetManager.loadModel("/Textures/Shoes/style_7.obj");
    myModel.scale(0.09f);
    rootNode.attachChild(myModel);

both the OBJ file and the material file are in the same directory. so i think as per the doc jMonkeyEngine directly load the material from the same directory where the OBJ resides.

if you want i can upload here OBJ file and the material file plus all of the needed images here.

My absolute goal is to display the same Model in JmonkeyEngine as shown in screenshot1.

what i am missing ? what did i do wrong ?

Update on 16-JULY- 2013

OBJ Model Material File Resources

Thanks

Mihir
  • 2,480
  • 7
  • 38
  • 57
  • Just have the artist export the mesh with pre-calculated normals. – John Jul 16 '13 at 06:03
  • hi what does it mean ? please explain me in some detail. – Mihir Jul 16 '13 at 06:06
  • Do you know what normals are? – John Jul 16 '13 at 06:07
  • yes it is for visual displacement. did my artist make some mistake while exporting the Object. – Mihir Jul 16 '13 at 06:09
  • please post your .obj file. – John Jul 16 '13 at 06:12
  • i have updated my questions with all the link, if you want original FBX as well i can post it too. – Mihir Jul 16 '13 at 06:16
  • That upload site seems to want us to register just to download the files – Richard Tingle Jul 16 '13 at 08:48
  • Although it seems to accept a crazy email address without validation so thats ok – Richard Tingle Jul 16 '13 at 09:06
  • so did you download it ? – Mihir Jul 16 '13 at 12:25
  • @Mihir I did, had a play with it but wasn't able to improve it. To be honest I have more experience with custom meshes that importing models (which I know is bizarre and the wrong way round). – Richard Tingle Jul 16 '13 at 13:12
  • 1
    Your mesh has no normals, which means that your shader cannot shade it at all unless you calculate them at runtime. It would just be easier to just export the model with normals – John Jul 16 '13 at 18:49
  • Okay then it will look like as exactly as shown in the first screenshot ? – Mihir Jul 17 '13 at 04:20
  • @John my first problem is solved, i exported the OBJ file with normal and the skeleton looks like a real shoe now what about its material ? – Mihir Jul 17 '13 at 05:00
  • @Mihir In general solve 1 problem per question. See [Exit strategies for chameleon questions](http://meta.stackexchange.com/questions/43478/exit-strategies-for-chameleon-questions) – Richard Tingle Jul 17 '13 at 10:37
  • Assuming @John doesn't want to post his comment as an answer (which may well be ideal) you could self answer this question indicating how you changed your settings to export the model with normals – Richard Tingle Jul 17 '13 at 10:42

1 Answers1

5

The reason why your 3D model isn't looking so 3D is because the model was not exported with normals. Normals are what allow the 3D engine to do the shading (which is what makes it actually look 3D). Without normals, the engine cannot calculate the angles needed to do the shading, you can calculate them at runtime by doing the math dynamically or by just exporting the model with normals (preferred).

John
  • 3,769
  • 6
  • 30
  • 49