Shader to get cylindrical projection texture?

Hi all,

Assume I have a group of animated objects remaining at anytime all located within a cylinder.

what I’d like to do is to get the projection of the content of the scene on the cylinder (as seen by an external observer moving around it) , ie realtime baking the scene to get a cylindrical texture to be used for other purpose.

Any idea on how to do it in Panda3D with a ‘smart’ shader /direct write to texture?

thks for you hints

That sounds hard. One problem is that you don’t have a consistent eyepoint here: there’s no single point of view that represents the view you want to project onto the cylinder. So there’s no easy way to use the graphics hardware to render this kind of scene, since the graphics hardware is based on rendering from a single point of view.

You could render everything as seen from the center of the cylinder, which would be fine if you didn’t insist on having occlusions resolved from the outside. I guess you could play games with the depth buffer and the winding order to make everything from the outside in, even though your viewpoint is at the center. Then the result of this would be ready to apply to the cylinder.

David

Can you tell us something more about the particular effect you want to archieve?
Maybe there’s an easier way to do it, e.g. using sphere maps or projected movie textures.

@drwr
Right the issue I’m facing is to get a consitent eyepoint. So far the trick I found is to position the camera ‘under’ the scene, and through a shader transform the visible points by radially projecting them on the internal face of the cylinder.
One of the issue is that the object has to be concave (vertically concave)

@Nemesis#13
The best way I can describe what I’m trying to achieve is the reverse of a cylindrical texture projection on a central scene. ie: dynamic baking of an internal scene onto the surrounding cylinder.

Actually this seems quite related to ray tracing. Indeed I’ve played a little bit with Povray, and got good results.

Thanks for your hints.

jean-claude