JMonkeyEngine OBJ file does not appear as expected

My Artist created a 3D shoe model like FBX in 3d studio Max. which is as follows.

3d Shoe model snapshot of FBX file

I use jMonkeyEngine in my program and does not support the FBX file, so I export FBX to the wavefront OBJ file, 3d studio max also gives me the corresponding mtl file.

so when I load the exported obj model into my program that uses jMonkeyEngine as a library, it does not look like real shoes, but does not have a texture on it.

3d shoe Model snapshot of OBJ file

the program also shows one warning

WARNING: The style_7-geom-0 OBJ mesh does not contain normals! This may not be displayed 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. therefore, I think that according to doc, jMonkeyEngine directly downloads material from the same directory as the OBJ.

if you want, I can upload the OBJ file and the material file here, as well as all the necessary images here.

My absolute goal is to show the same model in JmonkeyEngine, as shown in the screenshot.

What am I missing? what I did wrong?

Update JULY 16, 2013

OBJ Model Resources Material File

thanks

+4
source share
1 answer

The reason your 3D model doesn’t look 3D like this is because the model was not exported with normals. Normal is what allows the 3D engine to do shading (which actually makes it 3D). Without normals, the engine cannot calculate the angles necessary for shading, you can calculate them at runtime to dynamically perform math, or simply export the model with normals (preferred).

+5
source

Source: https://habr.com/ru/post/1491492/


All Articles