SphereGeometry bad UV mapping at poles

Software: Away3D 4.x

ragaes, Newbie
Posted: 27 June 2012 08:03 AM   Total Posts: 4

I’m trying to build a 360 scene with Away3D.

In order to achieve this I’m assigning a material with a equirectangular image texture to a sphere mesh build up with the SphereGeometry class.

Then I invert the faces and uv mapping with MeshHelper.

The problem is that the texture gets slightly distorted at the poles of the sphere.

The equierectangular texture is well generated as I’ve tested it with different panoramic software. So the problem must be in the uv mapping or the geometry itself.

I attach a screen capture where such defect can be seen.

The code to build the scene is very simple:
// bmpData is a BitmapData containing the equirectangular image
var texture : BitmapTexture = new BitmapTexture(bmpData);
var material : TextureMaterial = new TextureMaterial(texture, true, false, true) 
var sphere : Mesh =  new Mesh(new SphereGeometry(1000, 80, 80), material);
MeshHelper.invertFaces(sphere, true);

 

   

Richard Olsson, Administrator
Posted: 27 June 2012 04:59 PM   Total Posts: 1192   [ # 1 ]

Does it look ok on the outside? Do you have anti-aliasing enabled? Have you tried both with and without smoothing?

   

ragaes, Newbie
Posted: 02 July 2012 11:13 AM   Total Posts: 4   [ # 2 ]

Hi,
>>>Does it look ok on the outside?
No, it looks the same. Also tried TextureMaterial.bothSides=true and without calling invertFaces.

>>>Do you have anti-aliasing enabled?
Yes, and by disabling it I get the same result (View3D.antiAlias=0)

>>>Have you tried both with and without smoothing?
Yes, and getting the same result (TextureMaterial.smooth=false)

I think the problem is in the geometry/uv mapping built by SphereGeomerty as it only fails at north and south poles of the Sphere.

 

   

Richard Olsson, Administrator
Posted: 02 July 2012 11:35 AM   Total Posts: 1192   [ # 3 ]

Please upload the texture somewhere, then file a bug report in the GitHub issue tracker and link to the texture there so we can use it in our tests. Thanks!

Issue tracker here: http://github.com/away3d/away3d-core-fp11/issues

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X