How to approach having ultra large texture for in-sphere panorama

Software: Away3D 4.x

finkie, Newbie
Posted: 06 September 2013 10:05 PM   Total Posts: 7

Hi all,

How would you work around the 2048 texture size restriction if the panorama requires a dimension a lot bigger than that (such as this image that is 10000x3028 - http://upload.wikimedia.org/wikipedia/commons/6/6f/Helvellyn_Striding_Edge_360_Panorama,_Lake_District_-_June_09.jpg)?

Do I either take the original bitmapData and split it up into multiple textures maybe during runtime or do that in PS before loading them in? Either way, how do you stitch them together in the sphere?

   

Avatar
dottob, Jr. Member
Posted: 07 September 2013 02:55 PM   Total Posts: 49   [ # 1 ]

If i do,i’ll split a GeoSphere(with Unwrap UVW and bitmap material) to parts in 3dsmax,and load it into away3d.

 

   

Avatar
theMightyAtom, Sr. Member
Posted: 07 September 2013 04:16 PM   Total Posts: 669   [ # 2 ]

Another option is remapping to a cube ( 6 x 2048 x 2048) and using a skybox.
If you do have Max, or another modelling program, building segments is indeed a good, quick option. I’m having a lot of fun with SEA3D that lets you export a great deal of what you can do in MAX, directly to an Away scene.

Another idea is to make a geometry dynamically, by taking the SphereGeometry class and modifying it to make an 1/8 of a sphere geometry class.

Even with all these techniques you are likely to run out of VRAM on a lot of graphic cards (notably older Mac Airs in my experience). Managing the texture resolution, so you only show what is necessary, would have to be implemented for a truly robust application.

Like this one…
http://krpano.com/
http://360gigapixels.com/tokyo-tower-panorama-photo/

And a clue as to one way of doing it…
http://krpano.com/petapixel/

Good Luck!

 

   

Avatar
dottob, Jr. Member
Posted: 08 September 2013 03:51 AM   Total Posts: 49   [ # 3 ]

New way:
Use LatheExtrude,so you can split the large picture to parts,
one part,one LatheExtrude mesh’s clone

 

   

finkie, Newbie
Posted: 13 September 2013 03:10 PM   Total Posts: 7   [ # 4 ]
theMightyAtom - 07 September 2013 04:16 PM

Another option is remapping to a cube ( 6 x 2048 x 2048) and using a skybox.
If you do have Max, or another modelling program, building segments is indeed a good, quick option. I’m having a lot of fun with SEA3D that lets you export a great deal of what you can do in MAX, directly to an Away scene.

Another idea is to make a geometry dynamically, by taking the SphereGeometry class and modifying it to make an 1/8 of a sphere geometry class.

Even with all these techniques you are likely to run out of VRAM on a lot of graphic cards (notably older Mac Airs in my experience). Managing the texture resolution, so you only show what is necessary, would have to be implemented for a truly robust application.

Like this one…
http://krpano.com/
http://360gigapixels.com/tokyo-tower-panorama-photo/

And a clue as to one way of doing it…
http://krpano.com/petapixel/

Good Luck!

Thanks for chiming in. I am currently using the skybox method and it works by taking the original bitmap, matrix-scale it to a new bitmapdata which used as texture. However the picture quality is significantly degraded. Client is leaning toward using a simple 2d panning due to quality loss but that would be so boring. This problem is exacerbated by the fact that it will be displayed on a 1080x1920 display that’s in portrait mode when there is a 1024x1024 size limitation on BitmapCubeTexture.

 

   

finkie, Newbie
Posted: 13 September 2013 03:11 PM   Total Posts: 7   [ # 5 ]
dottob - 08 September 2013 03:51 AM

New way:
Use LatheExtrude,so you can split the large picture to parts,
one part,one LatheExtrude mesh’s clone

This method seems like it’s worth a try. However I am still trying to wrap my head around LatheExtrude’s usage. If you could post the code you wrote to produce the screenshots that would be greatly appreciated.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 13 September 2013 03:22 PM   Total Posts: 1265   [ # 6 ]

Look in examples repositories, I recall post some example class. There is in there an example similar to what you need. Not sure for which version I posted it.

 

   

finkie, Newbie
Posted: 13 September 2013 03:30 PM   Total Posts: 7   [ # 7 ]
Fabrice Closier - 13 September 2013 03:22 PM

Look in examples repositories, I recall post some example class. There is in there an example similar to what you need. Not sure for which version I posted it.

I did however it seems as though it’s not the most updated version.

I’m looking at this - http://away3d.googlecode.com/svn/trunk/broomstick/Examples/Away3D/as/src/LatheExtrudeTest.as

I suppose “BitmapMaterial” is now “TextureMaterial”?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 13 September 2013 04:19 PM   Total Posts: 1265   [ # 8 ]

Yes, there are diffs in synthax but it works exactly the same. There is also a old tutorial on my site, even if outdated synthax wize, its still the same concept.

 

   

finkie, Newbie
Posted: 13 September 2013 04:37 PM   Total Posts: 7   [ # 9 ]

Thanks. I have been able to see results, even though it’s not exactly how I wanted. This leads to my next question.

I am having trouble understanding how to construct the profile to form my sphere, if I have say 4 pieces as previously demonstrated by dottob’s globe.

Where is the Vector3D(0,0,0) registration point for each piece, assuming that each piece has their own profile Vector3D? I’ve played around with the existing profile Vector3D coordinates from the example and it is not making any sense to me.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 13 September 2013 04:49 PM   Total Posts: 1265   [ # 10 ]

its a simple angle 0 to 90 x/sin(angle) y/cos(-angle) * radius to generate the profile on one plan. This give you a 1/4 circle defined by your points.
Then you pass these to class and enter rotation .25. that give you a 1/4 sphere. You can repeat the same 3x to generate the other 3 or use the mirror class, which allows you to generate a duplicate mirrored as well.

If you want to understand it, download Prefab 1.x (not 2.0) and go to lathe option in menu.

 

   

finkie, Newbie
Posted: 13 September 2013 06:36 PM   Total Posts: 7   [ # 11 ]

Do you mean using MultipleMaterials to pass to one instance of LatheExtrude, or use multiple instances of LatheExtrude? I am using the first method and below is my code. However what I’m getting is confined to one 1/4 of the sphere.

Here’s my code:

//_skyboxBmds contains the BitmapData of the sides
var multy:MultipleMaterials = new MultipleMaterials();
   
multy.front = new TextureMaterial(Cast.bitmapTexture(_skyboxBmds.posz), truefalsefalse);
   
multy.front.bothSides true;
   
multy.back = new TextureMaterial(Cast.bitmapTexture(_skyboxBmds.negz), truefalsefalse);
   
multy.back.bothSides true;
   
multy.left = new TextureMaterial(Cast.bitmapTexture(_skyboxBmds.negx), truefalsefalse);
   
multy.left.bothSides true;
   
multy.right = new TextureMaterial(Cast.bitmapTexture(_skyboxBmds.posx), truefalsefalse);
   
multy.right.bothSides true;
   
   var 
profileSphere:Vector.<Vector3D> = new Vector.<Vector3D>();
   
profileSphere[0] = new Vector3D(10000);
   
profileSphere[1] = new Vector3D(000);
   
   var 
le:LatheExtrude = new LatheExtrude(nullprofileSphereLatheExtrude.Y_AXIS0.254truefalsetrue40true0multy);
   
le.0;
   
_lathesContainer.addChild(le); 

 

   

Avatar
Fabrice Closier, Administrator
Posted: 13 September 2013 08:20 PM   Total Posts: 1265   [ # 12 ]

That you make a new LatheExtrusion per 1/4 sphere, use mirrors or fill a mesh with 4 subgeometries from the first LatheExtrusion geometry doesn’t matter. They all need to have own texture & uv set.

Note that you need more than 2 points to build a nice sphere. going from 0 to 90 degrees, I think 10 or 15 will be required.

 

   

finkie, Newbie
Posted: 13 September 2013 09:09 PM   Total Posts: 7   [ # 13 ]

I finally got it to work. Thanks for your patience and help.

Now I have come across another issue:

Currently I scale down my panoramic image to 4096 (so it’s 1024 when divided by 4). This is all fine. (Height is automatically adjusted based on width’s scale)

When I scale down the width to 8192 (so it’s 2048 when divided by 4, the maximum texture size allowed by Away3D), the texture appears briefly on screen and then disappears, leaving a blank screen.

What could this be?

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X