Texturing Sphere more than 2048px [Hemisphere, LatheExtrude, Blender, UVs]

Software: Away3D 4.x

Deimz, Newbie
Posted: 14 May 2015 07:46 AM   Total Posts: 3

Hi everybody,

  First thanks to the community for all the anwsers I’ve seen and helped me a lot. Next, sorry for my English if I do some mistakes.

  I’m trying to texturing a sphere with a big picture (4096px). I now there is a limitation of 2048px and it’s certainly not a problem from away3D but OpenGL or something like that.

  So I decided to create two hemisphere (half-sphere) and texture each one. So, i cut my photosphere in two part and now I’ve two textures.

  First of all, I tried to create a new class called HemisphereGeometry inspired of the SphereGeometry class, but i couldn’t do it.

  Next, I tried to make an hemisphere with LatheExtrude with a piece of code written by Mr.Closier (I’m not sure about the name…) :

var aPoints:Array = [];
   var 
profile:Vector.<Vector3D> = new Vector.<Vector3D>();
   var 
pt:Vector3D;
   var 
lathe:LatheExtrude;
   
   var 
radius:Number 400;
   var 
angle:Number 90//(any number greater than 90)
   
var step:int 1;

   for(var 
i:int 0<= angle+= step){
    pt 
= new Vector3D();
    
pt.Math.cos(-i/180*Math.PI) *  radius;
    
pt.Math.sin(i/180*Math.PI) * radius;
    
pt.0;
    
profile.push(pt);
   
}
lathe 
= new LatheExtrude(sphereMaterialprofileLatheExtrude.Y_AXIS120true,falsefalse); 

And it works fine to generate the geometry but new I can’t texture it correctly. I try some tricks, like rotating uv’s…Etc but it doesn’t works.

So, finally I decided to make a sphere in blender, cut it in half and create new material, with a spherical mapping and somes settings but when I export in obj (or .3ds, or .Dae) Uv and texture mapping options are not conserves, even if I check ‘export uv’, ‘export normals’..etc I think i’ve already tried all combinaisons of Obj’s export’s setings ^^

So i try to unwrap my hemisphere with spherical settings, and now I can see something better in Away Builder. But the textures isn’t fit correctly…

When I textured a sphere, all is ok and automatics, but with an hemisphere it looks more complicated.

I just would like to know if someone has already done it or if you have some advices it can be great wink


Thanks to read my post, if you need more informations, just ask me

Best wishes

 

   

Avatar
Fabrice Closier, Administrator
Posted: 14 May 2015 10:32 AM   Total Posts: 1265   [ # 1 ]

(I’m not sure about the name…) smile  That’s my name smile
Regarding LatheExtrude, if you do have standard setup, the uvs are exactly using 0-1 value. so your resulting hemisphere would need to have on one a uv scale 0.5 on v axis, the second, say the lowest, have also .5 multiplication and an offset added of .5 on the v.
You might need to add the property animateUVs = true if you rescale using the geometry handlers.

On the pict, you can see what it should look like.

 

   

Deimz, Newbie
Posted: 14 May 2015 11:20 AM   Total Posts: 3   [ # 2 ]

Hi,

Thanks a lot for the fast replies and for those informations !
I will try this, but I think theres is an other problem. In need to cut an UVSphere vertically and not horizontally.

Because, I’m trying to make a virtual tour system, so my original texture is 4096x2048, and I need to cut the picture vertically, to have 2 pictures of 2048x2048 each. And if I cut the UVSphere horizontally I don’t know how to mange UVs to apply my texture on the sphere and to make that the center of my texture be in the same position than the main vertex of the UVSphere. I don’t really know how to explain this in English but you can have a look to my problem in the first attachment.

Maybe there is a solution to apply the texture correctly, but like that, I cannot make my textures of each hemispheres following themselves.

But I don’t know if I can do this.
I’m sorry for my english, It certainly diffult to understand what I mean…

 

   

Avatar
Fabrice Closier, Administrator
Posted: 14 May 2015 11:29 AM   Total Posts: 1265   [ # 3 ]

well thats exactly the same, you rotate either your axis and path for Lathe or keep current and rotate 90 on x axis andor you rotate your image or you do rotate the uvs using u vs v. No rocket science here really.
The only important thing to keep in mind is that each hemisphere
needs to be 0-1 on u and v. if you use 2 textures (each half representing half the HR image) or as said above, move/scale the uv’s if you use the same source for both hemispheres. If your hemisphere are cut along xz plane or zy simply makes you use either v or u axis. Lathe will in all cases require zero changes if you use two separated images.

 

   

Deimz, Newbie
Posted: 14 May 2015 11:43 AM   Total Posts: 3   [ # 4 ]

Thanks a lot !

I’m sorry, i havn’t finished my answer, but I send it by mistake ! I see that you understood, thanks a lot for informations I’ll try tomorow, and i’ll tell you what’s happen.

Thank you so much !

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X