Hello. I am trying to get my binary model format to export from Blender with smooth faces. To do this I’ve referenced Blender exporter, and I think I have it down.
When I reached the importing into jME3.1 part I couldn’t find out how the smoothing is applied. In GitHub the OBJLoader skips over the “s 1” flag which is what marks a group of verts as smooth.
My question is how does jME3.1 apply smooth faces from objs? Or what is the class that loads the obj format, if its not “jme3-core.src.plugins.java.com.jme3.scene.plugins.OBJLoader”?
For this usually the vertices are shared, with a average normal.
This makes the lighting do a smooth impression instead of a sharp one that happens if you have multiple vertices with different nromals for adjacent triangles.
OBJs work fine. I’m working on my own format, for fun. I want to know how/where OBJs calc their smooth faces. Is it already averaged in exported OBJ or is it done on import?
jME does not do any averaging, it writes the normals verbatim:
Blender is capable of calculating per-vertex normals (as opposed to per-face). That’s what you’re seeing when the model is displayed in the preview. You need to make sure you’re exporting per-vertex normals and not per-face normals.