Longest post title in the blog for sure!
So, well.. this is a non-finished work (i'm looking to do something else with this) but I guess I got something interesting to show alredy...
Using
Carlos' Panorama as base I've created my own one but also with my own scene and textures.
View PV3D Panorama with custom 3D scene (It takes a while to load (600kb, 6 x 1024x124 textures there).
In a way, this is just a trick to have a scene of
186.122 polys,
20 lights,
raytrace reflection and
fog in
realtime ;) Well, it's not, but you get it looks like. In a lot of games and demos they use this trick to simulate complex 3Dscenes when in fact they are rendering 6 textures to a cube and having the camera inside it.
So, if you were wondering about how to do this with your 3D scene, here it's a nice and simple how-to.
As some of you know already (and probably hate), I've used the
Greeble to create the object (based on a tube). Then a couple of lights to the scene, created a material for the tunnel using raytrace for the Reflection and then adding the fog to the camera.
I'm not going to detail on all this, I would asume you know how to create 3dmodels and texture them... the point of the article if about how to get the 6 textures you need for doing the cube map of your scene.
So, after doing all this I end up with an scene like this:

At this point, what you have to do is create a box on the middle of the scene:

And then, create a new material. We only need to put a Reflect/Refract map on the Reflection slot for this new material.

Going inside the Reflect/Refract parameters we wil find everything that we need there. As you can see, 3D Studio MAX has a batch texture renderer in this section (kind of hidden). If you check the opfion
"From file", then you will be able to specify where you want to save the textures and the prefix name (I've used frame01 as a prefix name). Then the last thing you need to do is after clicking on
"Pick Object and Render Maps"... well, select the box, and it will generate all the maps for you.

And that's as simple as it's. This will generate these 6 images:
frame01_
BK.png, frame01_
DN.png, frame01_
FR.png, frame01_
LF.png, frame01_
RT.png, frame01_
UP.png (which are the Back, Down, Front, Left, Right, Up textures).
Now if you want to see how it looks,
here you have the Source Code!
(this is just a small modification of
Carlos original source code, so say thanks to him! :D Also, these sources doesn't include the
PV3D AS3 classes)
You can also check out the .max file.Enjoy! Doing 360 panoramic views with Flash hasn't ever been that easy! :)
PS: As a side note, one of the things I thought that wasn't doable with PV3D is in fact
doable! Amazing!
#permalink
Share:Digg! ~
del.icio.us ~
Stumble ~
Furl ~
Reddit
so that's why you were rendering that tunnel :) really it's quite cool! the problem is how to add more objects to the scene which do not look fake after this super trick!