nindim
11-03-2007 15:02:33
I'm just wondering if it is possible to hide a mesh, but at the same time still have it produce a shadow. The setVisible method makes it invisible, but then the shadow disappears. Any ideas? Oh and I realise I could apply a fully alpha texture, but I was hoping that I could have it so it wouldnt render the triangles at all, just the shadow. This is assuming thst ogre does in fact render triangles if the material was fully alpha. Maybe ogre has some clever thing in that it doesnt (Wishful thinking i know).............
nindim
11-03-2007 16:01:15
I've just realised that if I were to set it to full alpha texture, the shadow wouldnt be rendered at all.
Ideally what I want ot do is render the shadow of a mesh without actually rendering the mesh itself, i.e, have the shadow without the overhead of the model.
So you want to render the shadow ahead of time? Because if you're still going to render the shadow each frame, then you're going to need the mesh data to render it with anyway.
nindim
13-03-2007 15:52:44
I want to use lightmaps for most of the static geometry in my game. However, the deformation of the ground is a key aspect to my game and as such I want the ground that the player deforms to cast a shadow.
What I intend to do is export out the possible deformations, and when the user applies one of these, render the mesh I previously exported so it casts a shadow giving the illusion of self shadowing but using texture shadows. Obviosuly I need to hide the actual mesh whilst still displaying the shadow.
Sinbad suggested I use rendertargetlisteners, to set visibility of the mesh to false when rendering to the main render taregt and then back on for the texture shadow pass. I have tried to implement this but ahve not been able to get it to compile, If anyone wanted to take a look the thread is here:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=29692