mirrorSubobjects
by Desmond Fletcher · in Torque Game Engine · 11/24/2001 (6:15 pm) · 88 replies
I have not been able to get the mirrorSurface entity to work properly: when I place the mirrorSurface entity exactly on the surface to be a mirror, it always is the NULL texture (pink) when fully mirrored. If the surface texture has an alpha channel, the pink shows through that texture. So, looking at the mirrorSubobject code, I found this segment where it appears that the texture has been assigned NULL then is reassigned special/whiteAlpha0 (which is not in the common folder.
if (getInstance()->isClientObject() && mWhite == NULL)
mWhite = new TextureHandle "special/whiteAlpha0", MeshTexture);
So, I created my own alpha0 texture, created the common/special folder and replaced the above with:
mWhite = new TextureHandle("special/mirrorAlpha0", MeshTexture);
Still no change; then, while looking into the TextureHandle code saw that there is an InteriorTexture also. Well, I'm not trying to reflect the environmental image off a model so I replaced MeshTexture with InteriorTexture (why is MeshTexture there to begin with?):
mWhite = new TextureHandle("special/mirrorAlpha0", InteriorTexture);
Still no luck and no difference. Maybe I'm not looking in quite the right place; maybe the placement of the mirrorSurface entity is wrong; maybe, maybe, maybe--can anyone suggest a new direction to look?
if (getInstance()->isClientObject() && mWhite == NULL)
mWhite = new TextureHandle "special/whiteAlpha0", MeshTexture);
So, I created my own alpha0 texture, created the common/special folder and replaced the above with:
mWhite = new TextureHandle("special/mirrorAlpha0", MeshTexture);
Still no change; then, while looking into the TextureHandle code saw that there is an InteriorTexture also. Well, I'm not trying to reflect the environmental image off a model so I replaced MeshTexture with InteriorTexture (why is MeshTexture there to begin with?):
mWhite = new TextureHandle("special/mirrorAlpha0", InteriorTexture);
Still no luck and no difference. Maybe I'm not looking in quite the right place; maybe the placement of the mirrorSurface entity is wrong; maybe, maybe, maybe--can anyone suggest a new direction to look?
#82
They do this in Blitz Basic. They have a demo of a ball bouncing between to planes and you see the ripple of the ball impact on the water.
You simply lay a mirror object on a mesh and then ripple the mesh.
The result? Very, very, realistic water!
08/26/2004 (6:51 am)
Me three!!They do this in Blitz Basic. They have a demo of a ball bouncing between to planes and you see the ripple of the ball impact on the water.
You simply lay a mirror object on a mesh and then ripple the mesh.
The result? Very, very, realistic water!
#83
08/28/2004 (11:32 am)
I bet you'll see reflective water in TSE. For TGE, you'd have to write it yourself - how interiors view the world and how the water views the world are two very different things.
#84
08/29/2004 (4:36 pm)
Yeah, I have an almost fully functional implementation of reflective bumpmapped water using opengl pixel and fragment programs in the fluid rendering now, perhaps there will be a resource when I've finished.
#85
And when I am satisfied enough with some of The AI I am Working On I will definitely need to implament this.
09/21/2004 (9:00 am)
MAN This is exactly what I need I would Love to here more.......!!!!!!And when I am satisfied enough with some of The AI I am Working On I will definitely need to implament this.
#86
09/21/2004 (4:40 pm)
Kyle, that resource would be awsome.
#87
11/02/2004 (7:13 pm)
Kyle - did you ever get this working? That sure would be a nice resource!
#88
12/03/2004 (9:45 am)
Unfortunately I had to cut that support from the initial release of my game due to time constraints, it's still on the "To Do" plate, though. We'll see how much interest the game generates, first.
Torque Owner Jeff "Ddraig Goch" Parry