Coloring of entities not possible?
Posted: Thu Apr 11, 2013 6:08 pm
Hey guys,
I'm working on some kind of 3D editor and I want to mark the selected entity with a red coloration. I worked with other 3D engines in the past and the usual way to do this was using something like ColorEntity(Entity, Color) but there seems to be no similar way to do this with PB-Ogre.
After studying the manual I thought I could achieve this by using GetEntityMaterial() to read out the material of the entity and then SetMaterialColor() to change its color, but GetEntityMaterial() returns a MaterialID wich is not usable with SetMaterialColor(). Going that way would have had the problem that several entites that have the same material would have been colored, too. And even if I would add an additional MaterialLayer with a red texture on it, it would show the same behaviour.
Does anybody know how to achive something like this in PB-Ogre? Or does anyone have an alternative idea how to mark a selected entity in a 3D editor app?
Thanks in advance
MAC
PS: The same thing with making an entity transparent after creation. Other engines use something like EntityAlpha(Entity, Alpha) for making entities transparent. In PB-Ogre it seems you have to alter the material to get something like this wich brings the same problems as mentioned above, or is there another way to do it?
I'm working on some kind of 3D editor and I want to mark the selected entity with a red coloration. I worked with other 3D engines in the past and the usual way to do this was using something like ColorEntity(Entity, Color) but there seems to be no similar way to do this with PB-Ogre.
After studying the manual I thought I could achieve this by using GetEntityMaterial() to read out the material of the entity and then SetMaterialColor() to change its color, but GetEntityMaterial() returns a MaterialID wich is not usable with SetMaterialColor(). Going that way would have had the problem that several entites that have the same material would have been colored, too. And even if I would add an additional MaterialLayer with a red texture on it, it would show the same behaviour.
Does anybody know how to achive something like this in PB-Ogre? Or does anyone have an alternative idea how to mark a selected entity in a 3D editor app?
Thanks in advance
MAC
PS: The same thing with making an entity transparent after creation. Other engines use something like EntityAlpha(Entity, Alpha) for making entities transparent. In PB-Ogre it seems you have to alter the material to get something like this wich brings the same problems as mentioned above, or is there another way to do it?