Ogre Models and Shaders? Can I combine them?

Ogre brings his own materials, therefore the texture is already set.

Now I want to use another shader, for example a bumpmap shader or cartoon shader.

If I use the methode setMaterial() I lose the parameters of the textures. Can I somehow import the parameters of ogre inside the shader, before i apply the shader on the object?

The object might have subgroups. It’s confuse me a bit!

The material exported by the ogre exporter does not contain much info, so dont worry too much about that. The texture coordinates are stored in the mesh and except for some shininess parameters etc. theres not much to lose. A new j3m material based on SimpleTextured.j3md or Lighting.j3md with the exported textures set should give you just what the exporter did. Look at this video and how its done there, the material of the geometry is replaced completely.



Cheers,

Normen

In jME3, ogre shader, bumpmap shader, and cartoon shader are the same thing.

The only difference is the parameters you set on them.

To set a bump map, use m_NormalMap, to set cartoon shading, set m_ColorRamp to toon.png texture.



EDIT: See jme3test.post.TestCartoonEdge

How can we make it work on obj files? As I can understand from test application, an image is used to edges. I saw this, but I’m not sure about it.

tkey said:
How can we make it work on obj files? As I can understand from test application, an image is used to edges. I saw this, but I'm not sure about it.

The answer is in the posts above :roll: