I have geometry object - grass. So this object is a simple plane of 3 polys, and I need it be rendered as double-side object. There is light in scene, as well. I have the following code:
[java]
public Material getGrass01m() {
t_dmap = “Models/Grass/grass01/dif_map.dds”;
mat = new Material(assetManager, “Common/MatDefs/Light/Lighting.j3md”);
mat.setTexture(“DiffuseMap”,assetManager.loadTexture(t_dmap));
mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
return mat;
}
[/java]
But I have this:
http://img815.imageshack.us/img815/4836/start06.jpg
http://www.youtube.com/watch?v=IuEMUFwdheE
I think you need to make it shadeless or make it with backlighting.
I watched the video, but I already have Facecull - Off:
[java]
mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
[/java]
How can I do backlighting?
So may be, it will be better to make shadow on geometry brighter? Any chance to do it?
if you have many objects with grass it would be better to make only CAST shadows for the grass. Or switch shadows off for them at all.
Also, in many games grass material is without any lighting (unshaded material).
About backlighting, I don’t remember how it’s called in JMP. Something like Ambient Light.
1 Like
Oh!!! Yeah you are right, Unshaded material looks better. Thanks mifth!