Logo by slon_ru - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. November 29, 2025, 06:22:21 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Viewing specification for Ray Tracing  (Read 372 times)
0 Members and 1 Guest are viewing this topic.
asimes
Fractal Lover
**
Posts: 212



asimes
WWW
« on: January 06, 2013, 09:24:47 PM »

Given these variables:
- VRP, the point of attention that the viewer is focusing on
- VPN, the normalized direction to viewer
- d, the distance from the point of attention to the viewer
- uMin / uMax / vMin / vMax, the view plane boundaries on some axes u and v
- PRP, the location of the viewer calculated as:

Code:
PRP.x = (VRP.x+VPN.x*d, VRP.y+VPN.y*d, VRP.z+VPN.z*d)

How do you know what the value of d should be?

In my program I have these variables set as:
- VRP = (0.0, 0.0, 0.0), could change while the program is running in the future
- VPN = (1.0, 0.0, 1.0), could change while the program is running in the future
- d is arbitrarily set as 40.0 for now
- uMin = -40, uMax = 40, vMin = -40, vMax = 40
Logged
asimes
Fractal Lover
**
Posts: 212



asimes
WWW
« Reply #1 on: January 06, 2013, 09:29:23 PM »

This might be helpful...



(PRP and d are not in the image above)
Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #2 on: January 07, 2013, 07:39:09 AM »

The value of d is indeed not fixed. You can choose it to influence the "field of view", i.e. the angle between the eye point, the leftmost column of pixels and the rightmost column of pixels.

Small values of d widen the field of view, i.e. the resulting picture captures things that are to the far left and far right of the viewer. But in that case, perspective distortion is strong, and faraway objects appear very small. It's more like a fish eye lens.

Larger values of d narrow down the view. Objects to the sides are out of frame, but perspective distortion is less pronounced. Objects don't shrink as fast with growing distance from the viewer. This is more like a telescopic lens.
Logged
asimes
Fractal Lover
**
Posts: 212



asimes
WWW
« Reply #3 on: January 07, 2013, 10:51:34 PM »

Ah, thank you, I didn't realize a fish eye effect would happen from a small value of d. I just assumed my rays were somehow firing incorrectly.

The problem seems to go away when d has the same value as the view plane boundaries (u is 80 units wide and v is 80 units tall). If I were to make it more wide than tall, what would be suggested to do with d?
« Last Edit: January 08, 2013, 12:24:52 AM by asimes » Logged
hobold
Fractal Bachius
*
Posts: 573


« Reply #4 on: January 07, 2013, 11:40:13 PM »

what would be suggested to do with d?
Experiment and use whatever looks good. smiley

In a sense, this is a matter of artistic expression. Unless you want to match a particular camera model, or want the viewers to move very close to or very far from the display screen.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Crosseyed viewing recomended Images Showcase (Rate My Fractal) doncasteel8587 1 1194 Last post June 16, 2007, 12:35:29 AM
by Nahee_Enterprises
Tragic render / viewing realization : ( Mandelbulb 3d MindsEye 4 1270 Last post January 24, 2012, 10:48:22 PM
by MindsEye
old school ray tracing Images Showcase (Rate My Fractal) taurus 0 2779 Last post June 23, 2012, 11:57:37 AM
by taurus
old school ray tracing + gi Images Showcase (Rate My Fractal) taurus 0 1123 Last post June 24, 2012, 11:48:47 AM
by taurus
Viewing option Mandelbulb 3d paolo 0 1470 Last post January 12, 2013, 12:26:55 AM
by paolo

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.192 seconds with 24 queries. (Pretty URLs adds 0.008s, 2q)