roypardi / panosalado

Automatically exported from code.google.com/p/panosalado
1 stars 1 forks source link

Sphere horizontal texturing depends on segments #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. change the segments in a sphere object

What is the expected output? What do you see instead?
The image should always be centered at the same point horizontally.  Instead, 
the horizontal center 
point depends on the # of segments.

Please use labels and text to provide additional information.
Workaround is to use geodesicSphere instead, which does not currently suffer 
from this defect.

Original issue reported on code.google.com by zephyr.r...@gmail.com on 4 Sep 2008 at 11:10

GoogleCodeExporter commented 8 years ago
no, workaround is to rotate sphere by certain amount, this was mentioned few 
times 
on pv3d list.

Original comment by makc.the...@gmail.com on 10 Sep 2008 at 12:20

GoogleCodeExporter commented 8 years ago
here is relevant message:

Aleksandar Mancic to papervision3d on May 12 Reply

Yaw offset depends on number of horizontal segments due to way of how sphere is 
built - it's built top-down, not left-right, so start of horizontal polys wont 
always be in the same position - they will have offset of horizontal segment 
angle. 
To get the correct yaw for `face-front` you can use something like:

sphere.yaw(90 - 360/numberOfSegmentsW); // for degrees based system

or

sphere.yaw(Math.PI/2 - 2*Math.PI/numberOfSegmentsW); // for radians based system

Hope it helps...

Original comment by makc.the...@gmail.com on 10 Sep 2008 at 12:22

GoogleCodeExporter commented 8 years ago
basically, the same with sandy sphere - 
http://www.flashsandy.org/tutorials/3.0/sandy_cs3_tut15a - seems like same code 
was 
used in all the engines...

Original comment by makc.the...@gmail.com on 10 Sep 2008 at 12:26

GoogleCodeExporter commented 8 years ago
Wow! Fantastic!  I didn't expect to get a solution by posting my own bug.  I'll 
have to do that more often!  THANK 
YOU!

I will implement the yaw workaround right this minute.  That was basically the 
sort of thing I was thinking I 
would have to work out on my own, since I looked at the sphere primitive and 
thought about modifying it and 
then got all depressed.

Zephyr

Original comment by zephyr.r...@gmail.com on 10 Sep 2008 at 4:28

GoogleCodeExporter commented 8 years ago
this has been addressed and is in the source code for panosalado.

Original comment by cheatham...@gmail.com on 27 Oct 2008 at 11:48