Shadows on Mirror?
Shadows on Mirror?
Which has left the shadow in the mirror and crown of light?
http://www.iris3dgames.com Reality Factory Spanish
Re: Shadows on Mirror?
Found this in the Genesis3d source code, doesn't look like RF supports shadows in mirrors:
Code: Select all
#pragma message ("BUG: Shadow caused crash in mirrors (oops). Need to write a RenderShadowThroughFrustum...")
/*
if (P->DoShadow)
{
gePuppet_DrawShadow(P,Engine,World,Camera);
}
*/
Re: Shadows on Mirror?
If you fix it up that would be new update on the engine that could be used on the final version a new reality factroyAllanon wrote:Found this in the Genesis3d source code, doesn't look like RF supports shadows in mirrors:
Code: Select all
#pragma message ("BUG: Shadow caused crash in mirrors (oops). Need to write a RenderShadowThroughFrustum...") /* if (P->DoShadow) { gePuppet_DrawShadow(P,Engine,World,Camera); } */
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
Re: Shadows on Mirror?
Actually, that's not the code for shadow volumes. The code in question is in the function RenderShadowVolumes in world.c:Allanon wrote:Found this in the Genesis3d source code, doesn't look like RF supports shadows in mirrors:
Code: Select all
#pragma message ("BUG: Shadow caused crash in mirrors (oops). Need to write a RenderShadowThroughFrustum...") /* if (P->DoShadow) { gePuppet_DrawShadow(P,Engine,World,Camera); } */
Code: Select all
// no shadows in mirrors for now...
if(MirrorRecursion > 0)
return GE_TRUE;
Re: Shadows on Mirror?
There is a possibility that in the future this option will be provided so you can enable or disable .
http://www.iris3dgames.com Reality Factory Spanish
Re: Shadows on Mirror?
You would have to do very careful level design,to know when the mirror comes in view and when it is not.
Now ,when the mirror comes in view,you may not see it but if there are walls in front of it,but it will still double the polycount and shadows calculations.
One way is keep performance up is to stop from rendering any polygons that are inside closed rooms using sealed areas and area flagged portal brushes at the door positions (with a smaller hint door in the middle to allow passing through).
You can also use far clip plane and fog but i know you will want to set this distance limit to high so you see far as possible,and it means that the mirror will be so small you will not even notice it from far but it will be rendered by the engine and ,might mess the framerate.
I just thought a trick for this that is much easier than the whole area portals settup:
If all shadows were enabled for the mirrors in the source code, you could try making a moving platform mirror that stays out of sight at a far corner of the level and when you go near the supposed mirror position,a trigger makes the moving model to move front of a fake mirror you have put and then all can be reflected.
When you move away from the mirror,it will fly back out of sight and keep the performance high.
I have not tested it yet but in theory it should work,unless moving platforms can not be mirrors.
Now ,when the mirror comes in view,you may not see it but if there are walls in front of it,but it will still double the polycount and shadows calculations.
One way is keep performance up is to stop from rendering any polygons that are inside closed rooms using sealed areas and area flagged portal brushes at the door positions (with a smaller hint door in the middle to allow passing through).
You can also use far clip plane and fog but i know you will want to set this distance limit to high so you see far as possible,and it means that the mirror will be so small you will not even notice it from far but it will be rendered by the engine and ,might mess the framerate.
I just thought a trick for this that is much easier than the whole area portals settup:
If all shadows were enabled for the mirrors in the source code, you could try making a moving platform mirror that stays out of sight at a far corner of the level and when you go near the supposed mirror position,a trigger makes the moving model to move front of a fake mirror you have put and then all can be reflected.
When you move away from the mirror,it will fly back out of sight and keep the performance high.
I have not tested it yet but in theory it should work,unless moving platforms can not be mirrors.