Can I determine from inside Blender which shading algorithm will be used in JME?

I can choose “smooth shading” in blender.

The materials tab allows me to choose from a couple different shading algorithms like Fresnel, Minnaert, Toon…

Does this apply only inside Blender when rendering?

I was told in another thread that by selecting “smooth shading”, the interpolated normals are saved as data in the Blender file, and JME imports these data.

Does this mean that the shading algorithm chosen in Blender will be “transferred” to JME. Is this correct?

I also read about JME that it uses Phong shading. Does this apply whether I choose flat or smooth shading in Blender?

My other question a while ago was similar, I know, but it still isn’t clear.

<cite>@ettavsdro said:</cite> I can choose "smooth shading" in blender.

The materials tab allows me to choose from a couple different shading algorithms like Fresnel, Minnaert, Toon…

Does this apply only inside Blender when rendering?

Yes.

The code in Blender that draws a model on the screen is not the same code as that in jME that draws on the screen. So models will look differently.
jME selects what code to use to draw on the screen by looking at the material you assigned (in jME) to the model. The material definition in jME has nothing to do with the materials in Blender. They are the same concept but there is no shared code so they behave differently. Totally different shaders.

Now a lot of clever people have spent a lot of time trying to make importing a model from Blender look similar when rendered in jME but there is only so much that can be done, they are different programs, with different shaders.
Some of the things that actually are carried over from Blender to jME is surface normals and UV-coordinates. Those are used in the same way in Blender as in jME for doing flat/smooth-looking models and to assign textures to the models.

For me it makes most sense to make the model in Blender (no materials - just the shape), make sure that I have the surface normals and the UV-coordinates correct in Blender. Then import the model into jME, then assign materials in_jME to the model.

You really should look at this: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender
it is all there: “Game-compatible models are models that basically only consist of a mesh and UV-mapped textures, in some cases animations. All other material parameters or effects (like particles etc.) can not be expected to be transferred properly and probably would not translate to live rendering very well anyway.”

3 Likes
<cite>@jmaasing said:</cite> Yes. live rendering very well anyway."

Thanks a lot, you really made an effort there. Will study that page more.

1 Like