Material for big plane (screenshots)

bigjhnny

07-09-2006 01:18:42

Hi:

I have problem setting up simple material for a simple large floor plane that is of one color and is able to react to fog and receive shadow.



mm.createPlane('ground', ogre.ResourceManager.DEFAULT_RESOURCE_GROUP_NAME, self.plane, 90000, 90000, 20, 20, True, 1, 2, 2, Vector3.UNIT_Z)
self.floorEnt = sceneManager.createEntity("GroundEntity", "ground")

_groundMaterial = ogre.MaterialManager.getSingleton().create('ground', 'General')
self.mat = ogre.MaterialPointer(_groundMaterial)
self.mat.setAmbient(0.95,0.64,0.23)
self.floorEnt.setMaterialName("ground")


produces:

problem is where the plane is being blurred by the fog, the color isn't blended with the fog color, rather it shows up as white?


mm.createPlane('ground', ogre.ResourceManager.DEFAULT_RESOURCE_GROUP_NAME, self.plane, 90000, 90000, 20, 20, True, 1, 2, 2, Vector3.UNIT_Z)
self.floorEnt = sceneManager.createEntity("GroundEntity", "ground")

_groundMaterial = ogre.MaterialManager.getSingleton().create('ground', 'General')
self.mat = ogre.MaterialPointer(_groundMaterial)
self.mat.setAmbient(0.95,0.64,0.23)
self.mat.setDepthWriteEnabled(False)
self.mat.setSceneBlending(ogre.SBT_TRANSPARENT_ALPHA)
self.floorEnt.setMaterialName("ground")


produces

This produces the land effect i want, where the fog is blending with the floor. However, notice the model is no longer casting shadows on the floor plane.

Can anyone provide some hints? Sorry for the noobness on using materials.

bigjhnny

07-09-2006 23:03:45

I re-posted this thread in the "help" forum:

http://www.ogre3d.org/phpBB2/viewtopic.php?t=24099

Think it's probably more appropriate there. Feel free to delete this if you'd like.