PDA

View Full Version : Correct curvature.



MojoMagic
11-20-2003, 05:43 PM
Hey guys,

I'm at work, so I can't verifiy this right now. So bare with me.

Am I right in thinking that if I render a triangle in OGL all it segments (ie: lines between a, b and c) will be straight (screenspace)? No matter what the FOV?

I ask this because I remember reading somewhere that OGL (and DX for that matter) on perform transformations on the vertex level. Hence my conclusion.

So I am further assuming that if one wanted to perform fish-eye lens type effects, one would have to either:
- Tesselate their geometry.
- Render with an actual ray-tracer.

What do you think?

Cyranose
11-20-2003, 06:48 PM
Originally posted by MojoMagic:
Hey guys,

I'm at work, so I can't verifiy this right now. So bare with me.

What do you think?

Okay, keep your clothes on.

Tessellation is one approach. Ray-tracing isn't necessary. You can render a 1st pass to textures and map that onto a deformed mesh for various lens effects.

Avi

Don't Disturb
11-21-2003, 04:49 AM
You won't get a fish-eye effect if you set the FOV really wide, because OpenGL doesn't do true perpective, just an approximation.
Maybe you could make a vertex program to transform vertices correctly, but the rendering to texture method that Avi suggests is probably your best bet.

[This message has been edited by Don't Disturb (edited 11-21-2003).]