getting started

Practical and theoretical implementation discussion.
Post Reply
palebluedot
Posts: 6
Joined: Wed Oct 10, 2012 12:46 am

getting started

Post by palebluedot » Wed Oct 10, 2012 9:14 pm

Hi,

I'm just getting started with raytracing and to begin with, I decided to do simple ray-sphere collision checks. So far I've tried algebraic and geometric collision checks and both produce elongations of my sphere as it moves in the XY plane ( camera is on negative Z ). Does anyone have any clues onto why this stretching occurs?

Here is an example:
http://glsl.heroku.com/e#4283.8

Thanks

h3r3
Posts: 1
Joined: Thu Oct 11, 2012 8:00 am

Re: getting started

Post by h3r3 » Thu Oct 11, 2012 8:04 am

That is normal and is due to the perspective (field of view), it's like when you take a photo with a fisheye lens.
Just use higher value for your constant "focus" and you will get less perspective deformation.

Tristan
Posts: 10
Joined: Fri Jun 29, 2012 1:27 pm

Re: getting started

Post by Tristan » Thu Oct 11, 2012 12:35 pm

Haha wow that's quite a development environment you've got there!

graphicsMan
Posts: 166
Joined: Mon Nov 28, 2011 7:28 pm

Re: getting started

Post by graphicsMan » Thu Oct 11, 2012 6:28 pm

With a simple pinhole camera model this is normal and to be expected.

palebluedot
Posts: 6
Joined: Wed Oct 10, 2012 12:46 am

Re: getting started

Post by palebluedot » Thu Oct 11, 2012 8:04 pm

Oh, you know, I've been banging my head with this for a week now! It is a big relief to hear someone knowledgeable telling you "that's the way its supposed to work". Thank you very much =)

PS: My book should have stated so earlier, so I could account for this happening and not try to figure out what I was doing wrong.

palebluedot
Posts: 6
Joined: Wed Oct 10, 2012 12:46 am

Re: getting started

Post by palebluedot » Fri Oct 12, 2012 3:05 am



palebluedot
Posts: 6
Joined: Wed Oct 10, 2012 12:46 am

Re: getting started

Post by palebluedot » Fri Oct 12, 2012 3:14 am


Post Reply