panoramic view

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
RainBoy
Posts: 16
Joined: Wed Jun 01, 2011 8:08 pm
Location: United States

panoramic view

Post by RainBoy »

Hello,

I have an image with spherical panoramic view; I have to show it in 3D mode (like google maps view)
At this moment i can convert my images to skybox and show it; but i can't zoom 3D image in this case (zoom in/zoom out)
so i have to create something like sphere node; set texture to it from file and insert camera and light inside created sphere; Then i can change sphere size for zooming (or i can put my camera in another place into my sphere)

Can you help me, please - is this correctly? Maybe you now better way to do it.

Thank you.
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: panoramic view

Post by Radikalizm »

Why not just try your idea, see if it works out for you, and then come back to the forums for help if it doesn't?
RainBoy
Posts: 16
Joined: Wed Jun 01, 2011 8:08 pm
Location: United States

Re: panoramic view

Post by RainBoy »

I'm working with this right now )
I just want to clarify that i can put camera inside node - don't want to waste my time...
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: panoramic view

Post by Radikalizm »

Sure you can, why wouldn't you be able to? Skydomes and skyboxes use the exact same concept; they're just movement-bound to the active camera so it looks like the sky is at an infinite distance from the camera at all times
RainBoy
Posts: 16
Joined: Wed Jun 01, 2011 8:08 pm
Location: United States

Re: panoramic view

Post by RainBoy »

Thank you!
RainBoy
Posts: 16
Joined: Wed Jun 01, 2011 8:08 pm
Location: United States

Re: panoramic view

Post by RainBoy »

Ok, i've finished with sphere and all works fine.

Now i have to insert image with directions(like compass) at the bottom of the sphere
I've prepared needed picture but i can't find suitable node. i have to rotate this image with sphere.

Can you help me again?
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: panoramic view

Post by Radikalizm »

So you want to display a compass GUI element? Can't really make out what you mean exactly

If so, I believe there are some hacks provided somewhere in these forums on how to rotate 2D images (I think Lonesome Ducky posted this somewhere), since irrlicht doesn't support that natively
RainBoy
Posts: 16
Joined: Wed Jun 01, 2011 8:08 pm
Location: United States

Re: panoramic view

Post by RainBoy »

i've put cube on the bottom to the sphere, then i set scale to (1,0,1)
looks like this:

Image

but i can't set reallybig size for the cube, because my in this case image with 4 arrays is cute off out of my sphere with the texture...

Code: Select all

ISceneNode* sphere = smgr->addSphereSceneNode(430, 512);
sphere->setMaterialFlag(video::EMF_LIGHTING, false);
sphere->setMaterialFlag(video::EMF_FRONT_FACE_CULLING, true);
sphere->setMaterialFlag(video::EMF_TRILINEAR_FILTER, true);
sphere->setMaterialFlag(video::EMF_ANISOTROPIC_FILTER, true);
sphere->setMaterialTexture(0,driver->getTexture("......"));
 
ISceneNode *cube = smgr->addCubeSceneNode(800, sphere,-1,vector3df(0,-150,0), vector3df(0,0,0), vector3df(1,0,1));
        
ITexture *cubeText = driver->getTexture("......");
        
cube->setMaterialTexture(0, cubeText);
cube->setMaterialFlag(video::EMF_LIGHTING, false);
cube->setMaterialFlag(video::EMF_FRONT_FACE_CULLING, true);
//cube->setMaterialFlag(video::EMF_TRILINEAR_FILTER, true);
cube->setMaterialFlag(video::EMF_ANTI_ALIASING, true);
cube->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
Post Reply