javiergandia54 / tonatiuh

Automatically exported from code.google.com/p/tonatiuh
0 stars 0 forks source link

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

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
This problem is solved with Tonatiuh-1.2.0 version

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