[Papervision3D] Sphere BitmapMaterial yaw offset
Yanis Pavlidis
pavlidis.yanis at gmail.com
Sun May 11 18:10:22 PDT 2008
Hi Tim,
thanks for the prompt reply!
Your code can fix this issue, but I was wondering if that yaw offset is
constant, or dependent on the radius of the sphere, or the number of
triangles. Some trial and error can shed some light, but if somebody knows
that, from going through the source maybe, it would be very helpful.
Thank you,
Yanis
2008/5/12 Tim Knip <tim.knip at gmail.com>:
> Hi Yanis,
>
> Good point :-)
>
> Guess this is just the way a Sphere is created.
> Think this is simply something nobody thought off.
>
> Anyway: you could fix it if you know the exact offset angle:
>
> sphere.transformVertices( Matrix3D.rotationMatrix(0, 1, 0,
> myOffsetAngleInRadians ) );
> sphere.transform = Matrix3D.IDENTITY;
>
> Tim
>
> 2008/5/12 Yanis Pavlidis <pavlidis.yanis at gmail.com>:
> > Hi List,
> >
> > new user so forgive my ignorance!
> > I am using the GreatWhite branch and I am texturing a primitive.Sphere
> with
> > a BitmapMaterial, and placing the camera in the middle of the sphere to
> have
> > a panoramic view.
> > However I am troubled by the fact that the texture starts/ends at
> > yaw(rotationY that is)~=101. Where does this number come from? I would
> > expect a multiple of 90 maybe, but 101? Am I doing somethin wrong? Pitch
> > shows correct, for example 0 in the middle of the texture, +-90 at poles.
> >
> > viewport = new Viewport3D(600, 300, false, true);
> > addChild(viewport);
> > scene = new Scene3D();
> > camera = new FreeCamera3D();
> > renderer = new BasicRenderEngine();
> > bitmapFileMaterial = new BitmapFileMaterial("sphere.png");
> > sphere = new Sphere(BitmapFileMaterial, 25000, 30, 30);
> > sphere.x = sphere.y = sphere.z = 0 ;
> > sphere.rotationX = sphere.rotationY = sphere.rotationZ = 0;
> > scene.addChild(sphere);
> > camera.z = camera.x = camera.y = 0 ;
> > camera.zoom = 5;
> > camera.rotationX = camera.rotationY = camera.rotationZ = 0;
> >
> > I was expecting that running the above code, would place the start/end of
> > the BitmapMaterial at rotationY=0. It doesn't.
> > Any idea why?
> >
> > Thank you all,
> > Yanis
> >
> > _______________________________________________
> > Papervision3D mailing list
> > Papervision3D at osflash.org
> > http://osflash.org/mailman/listinfo/papervision3d_osflash.org
> >
> >
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20080512/c6a149bf/attachment-0001.html
More information about the Papervision3D
mailing list