Archived

This topic is now archived and is closed to further replies.

warpexplorer

Looking for info on rendering idea

Recommended Posts

Im looking for info on a rendering idea I had. Here''s the idea: Lets say that I wanted to render a perfect cylinder. This is impossible using conventional polygons, but lets say that we used radius, height and rotation from the camera, instead of using polygons, and then determined the edges of the object on the screen (that would be an outline) and then determined where the pixels on the screen inside the outline intersect the object in 3D then used that to determine what the pixel should look like. Or something like that. All i really want to know is how to go from radius, height and rotation to something on the screen without going to polygons. This might be a really stupid idea, but is has probably been tried or researched before so im looking to know what you people have found out. If any of you know any of the equations needed for this i could use those too.

Share this post


Link to post
Share on other sites
um.. a common non-polygonal representation model is raytracing.. shoot a cluster of rays from 0,0,0 through every pixel on the imaginary plane described by the screen. plug each ray into the equation for whatever primitives you have, store the intersection coordinates and draw the closest one. the equation for a cylinder is x^2+z^2=r^2, y:{-height/2..height/2}


--
Float like a butterfly, bite like a crocodile.

Share this post


Link to post
Share on other sites
not only that, but raytracing is slower. besides, 3d parameters eventually have to be mashed into 2d anyway, through perspective projection. maybe you should study the 3d transformation pipeline.

a2k

Share this post


Link to post
Share on other sites
Anything drawn on the screen won''t be perfect (pixels are square). Besides, the hardware is optimized to draw polygons, so I would advise simply creating more polygons for a higher level of detail.

http://3d.n3.net/

Share this post


Link to post
Share on other sites
nothing you see is perfect (finite number of visual receptors, fairly low update rate, limited FOV and a color depth that leaves room for improvement). i suggest we all upgrade our eyes via a set of service packs released under GPL.

oh, and i dont know anything about human physiology, so i''m looking for some opthalmologists to help me out with this project.



--
Float like a butterfly, bite like a crocodile.

Share this post


Link to post
Share on other sites