Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sun light ajust to scene change ray tracing (A solution attached) #36

Closed
GoogleCodeExporter opened this issue May 8, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.place a simple Flat Shape in the scene
2.Define sun :
-Shape type =Flat_Rectangle
-Sun Position Azimuth =45 , Elevation = 45, Distance = 5
3.Click OK, and place the camera perpendicularly to the sun flatShape

What is the expected output? What do you see instead?
The ray trace aren't perpendicular to the shape.

What version of the product are you using? On what operating system?
Windows XP, V1.1.5

Please provide any additional information below.
The problem come from an non uniform scale factor applied in TLightKit.cpp:
    lightTransform->scaleFactor.setValue( ScaleFactorX, 1.0, ScaleFactorZ );

The proposed Solution in the attached file gives a homogenous scale Factor 
independently of the Sun position and follows the target in translation.

Original issue reported on code.google.com by Daw...@gmail.com on 19 Mar 2011 at 10:24

Attachments:

@GoogleCodeExporter
Copy link
Author

The file provide have a minor erro:
UpdateSunPosition();
should be add after:
double ScaleFactor = radius/sizeMin;


Original comment by Daw...@gmail.com on 20 Mar 2011 at 10:12

Attachments:

@GoogleCodeExporter
Copy link
Author

This problem is solved with Tonatiuh-1.2.0 version

Original comment by amaiamut...@gmail.com on 17 May 2011 at 3:44

  • Changed state: Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant