Jump to content
  • Advertisement
Sign in to follow this  
beckslover81

Adding radial distortion

This topic is 5111 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everybody, I have the following problem: I have set up a virtual camera head in a 3d scene and now I want to simulate different camera parameters that have effect on the picures "taken" by the camera in the scene, especially radial distortion. But I don't know how to do. I could imagine the possibility to use the current undistorted picture and map it on a sphere by using spherical mapping...is there a more elegant way? thx

Share this post


Link to post
Share on other sites
Advertisement
You've basically got two possibilities - one, you distort the geometry, or two, you distort the resulting image. I'd go with the second option for a couple of reasons. First, because it means you can render the scene as normal, letting the API take care of transformations. Secondly because distorting the geometry non-linearly should result in things that aren't triangles, which means that the image you render won't be perfectly accurate. With highly tessellated models, though, this won't be visible.

Try rendering to texture, and then mapping that texture over a grid and rendering to the screen. That'll let you distort the resulting image pretty much any way you can think of.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!