I am working on a bowling program. I want to make the floor reflective. So I defined a view --->
VIEW mirror {
flags = visible;
}
action mirror
{
camera.portal = mirror;
mirror.noshadow = on;
mirror.portalclip = on;
while (1) {
proc_late();
mirror.genius = camera.genius;
mirror.aspect = -camera.aspect;
mirror.arc = camera.arc;
mirror.fog = camera.fog;
mirror.fog_start = camera.fog_start;
mirror.fog_end = camera.fog_end;
mirror.x = camera.x;
mirror.y = camera.y;
mirror.z = 2*camera.portal_z - camera.z;
mirror.pan = camera.pan;
mirror.tilt = -camera.tilt;
mirror.roll = -camera.roll;
wait(1);
}
return;
}
---> and assigned the action mirror to the floor. I then edited the "properties" of the map entity for floor and made checked the mirror flag for every face of it and made the ground reflective.
My problem is that if we look from a little above the floor there is no reflection. There is reflection only if we look from a position very close to the surface of the floor . In that case also, reflections are flickering.
Could anyone suggest a meathod to solve this problem. Are there any other methods for creating reflections.
I have one more problem. Eventhough the surface is reflective, it is almost like a plane mirror. The texture of the surface is not clearly visible. You understood the point? I want to keep the texture visible, at the same time, it should be reflective.