Logo by HPDZ - 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: Visit us on facebook
 
*
Welcome, Guest. Please login or register. April 19, 2024, 05:11:40 PM


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: Global light vector relation  (Read 1365 times)
0 Members and 1 Guest are viewing this topic.
lxh
Iterator
*
Posts: 178


« on: April 02, 2013, 03:29:12 PM »

Hi Jesse,

sorry that i bother you again with my spinnings but maybe this is not a big deal for you.

It can be hard to find the right light angle again if you want to fix the light to the object. On the other side if it's fixed and fits the background image perfectly it would be great to take it back again to the cam for a perspective correction.

Is it possible to recalculate the global light vector while changing between camera and object relation?
Logged

I've learned so much by my mistakes that I'm planing to do some more.
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #1 on: April 03, 2013, 01:36:55 AM »

Hi lxh,

this should be a useful feature, adjust the sliders automatically when changing the 'light relative to object' option...
put it on the todo-list.

Logged
lxh
Iterator
*
Posts: 178


« Reply #2 on: April 09, 2013, 07:14:45 PM »

Thanks for the implementation, Jesse! It is as you say, a useful feature. You saved me from fumbling around over and over and over again. Tank you!  smiley
Logged

I've learned so much by my mistakes that I'm planing to do some more.
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #3 on: April 09, 2013, 09:57:42 PM »

I found that it will not work on all light angles, did a newton-like approach to find the angles... must be some deadlocks somewhere or so.
Logged
lxh
Iterator
*
Posts: 178


« Reply #4 on: April 10, 2013, 10:29:37 AM »

Hmmm, didn't notice that yet. If it helps in most situations it is still better than every time struggling with the obj. rel. angles. But deadlocks? Hm, i'm not the right person to assess the problem and might stultify myself but maybe it's a simple radians thing which can be solved by modulo 2PI?
Logged

I've learned so much by my mistakes that I'm planing to do some more.
hobold
Fractal Bachius
*
Posts: 573


« Reply #5 on: April 10, 2013, 11:34:40 PM »

Euler angles suffer from a phenomenon called "gimbal lock" (that's why people are fond of using quaternions instead). I am unsure if that is the problem here, but maybe a few more buzzwords can give Jesse hints to a solution.
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #6 on: April 10, 2013, 11:53:20 PM »

just a side note: this gimbal lock is assumed to be the reason for the whipped cream in the mandelbulb as well wink

the gimbal lock can be thought of the problem of at least 2 possibilities to express a point location in 3d through 3 rotation angles,
leaving aside 1 axis, does not imply perfect description of the point, since it still can be expressed through 2 ( or more )  variants,
for example (-1,0,0) could be expressed as either 180,0 (assuming Z/Y axises)  angles, or as (0,180) (assuming Z/Y axises as well )

the quaternions counter this, somehow, but i do not fully understood it what they do change, but it can be thought of as the tangent
vector that is kept to a point that preserves the orientation ....

just my 1cent side note....
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #7 on: April 10, 2013, 11:59:30 PM »

Euler angles suffer from a phenomenon called "gimbal lock" (that's why people are fond of using quaternions instead). I am unsure if that is the problem here, but maybe a few more buzzwords can give Jesse hints to a solution.

Yes, "gimbal lock" was what i meant, but i guess i already found the issue in my code, nothing worth to talk about  wink
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Is there a relation between string theory and fractals? Philosophy Melancholyman 7 9119 Last post April 11, 2011, 08:21:54 PM
by Melancholyman
Global 27 Mandelbulb3D Gallery GrahamSym 0 936 Last post October 11, 2011, 11:34:39 AM
by GrahamSym
global 9 Mandelbulb3D Gallery GrahamSym 0 637 Last post October 11, 2011, 11:34:41 AM
by GrahamSym
The relation between Fractals and Architecture Meet & Greet Fractopia 3 4564 Last post April 22, 2013, 12:11:10 PM
by taurus
synthclipse global shader includes Synthclipse cKleinhuis 1 1240 Last post July 13, 2015, 04:04:54 PM
by _revers_

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.156 seconds with 29 queries. (Pretty URLs adds 0.008s, 2q)