how to simulate a depth with a cube map ?
hi does anyone has simulated a depth with a cubemap ?
i tried to sample the cubemap with the viewdirection but when the camera moves , this cause the view dir to be rotated and then the cubemap become misaligned with the geometry so the texture show a displacement...
Example , i render a quad and i want the cube map be aligned with it but instead of sampling in the middle of the cubemap i want to sample from the above.
Actually I do the calculation in object space in order to preview things in render monkey...
any help would be appreciated
thanx
This links about "Interior Mapping" may help you:
http://www.humus.name/index.php?page=3D
http://www.ogre3d.org/phpBB2/viewtopic.php?t=30275
http://www.humus.name/index.php?page=3D
http://www.ogre3d.org/phpBB2/viewtopic.php?t=30275
If I understand you correctly, it sounds like you want to capture the scene depth into a depth cube map. And then in the shader, trace the reflected ray into the depth cube map to check for an intersection, and then use the texture coordinates at the intersection to look up the color cube map.
sorry for the late response , no , i want to simulate a waterpool and do the refraction by looking it in a cube map and only rendering a quad ,
i have come with a solution wich is to aim a projector downward and shift it by the dot between viewdirection and the downwardvector (0,-1,0) in order to shift the lookup to simulate the perspective of the parallepiped but it gives me weird result at grazing angles.
moreover it produces a eyefish like image (:-x)
i tried interior mapping , it's amazing and exciting but the object seems to be at least cutted in two if the pivot of the object is the middle..(ie the cube in object space span from -1 to 1)
cheers.
i have come with a solution wich is to aim a projector downward and shift it by the dot between viewdirection and the downwardvector (0,-1,0) in order to shift the lookup to simulate the perspective of the parallepiped but it gives me weird result at grazing angles.
moreover it produces a eyefish like image (:-x)
i tried interior mapping , it's amazing and exciting but the object seems to be at least cutted in two if the pivot of the object is the middle..(ie the cube in object space span from -1 to 1)
cheers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement