Are materials "stackable"

the question says it all can multiple material effects be applied to a single node, I know filters are “somewhat” but they seem to act on the root scene…in the tests anyways…I’m trying to figure out how best to use my shader since I discovered that the shader settings can’t be “one size fits all”

Not sure I understand but, no you can’t set several materials to a geometry. (btw applying a material to a node apply the material to all the sub-geometries of the node).



Filters are just a fullscreen quad with the render of the scene mapped on it as a texture (and modified according to the filter effect). But this quad has only one material.



What do you want to do exactly?

I wouldn’t mind knowing how to do something along these lines. A “for instance” would be…



A target indicator that follows the curvature of the terrain.



The terrain being a large geom… the target indicator would be relatively small. It would be great to be able to overlay a second texture at defined coords… but I do realize this is not possible.



Any suggestions for how to accomplish this?

nehon said:
Not sure I understand but, no you can't set several materials to a geometry. (btw applying a material to a node apply the material to all the sub-geometries of the node).

that's what I'm trying to find out

Filters are just a fullscreen quad with the render of the scene mapped on it as a texture (and modified according to the filter effect). But this quad has only one material.

ok cool thanks

What do you want to do exactly?
I'm simple trying to find out if two effects that require shaders can be applied to a single model or would applying one effect be at the expense of another, which I think you answered


so it effect if I go use my toon shader don't bother considering normal maps...right

Shader, look at the terrain examples it already does exactly what you want.



Material != Texture

Multiple Materials no

Multiple Textures yes (and combine them in shader for rendering with a formular)

I know I say that a lot but…shaders :smiley:

Projected texture to be exact.

You would have to create a RenderProcessor, compute a projection matrix for the desired position and re-render the ground with that projection matrix and the required texture.



look at the BasicShadowRenderer that’s what it does

EmpirePhoenix said:
Shader, look at the terrain examples it already does exactly what you want.

Material != Texture
Multiple Materials no
Multiple Textures yes (and combine them in shader for rendering with a formular)


I dont quite get what you are saying here...so let me clarify, I know texture != material, when I was using jme2 a while back , I asked about the possibilities of using toon and normal map shaders together and found out that it was an oil and water type deal.....wont work together, the two work nicely in blender with nodes NOW, was just wondering if the same could be said for real time apps Now or it still oil and water, but since shader effects aren't "stackable" as indicated above the question seems moot, but thanks anyways

if toon is an overlay shader then ti works.

they get the render image with all shaders already done for the geometry, and ender stuff onto them based on their own logic.



jme3test.post.TestCartoonEdge like this maybee? The model can have any shader as material and the toon effect is done in the overlay then.

The toon shader in jME3 supports normal maps. The issue is not that you can’t stack them, its generally because normal mapping and toon shader look bad together due to the way lighting works.