Hello Nao,

I tried the following code by Jean-Sébastien, and it worked great.  Thank you!

Great to know it was of some use.

- The texture on the skybox gets magnified quite largely.  If I use
512x512 image as texture, my entire screen gets occupied by probably
200x150 portion of it.  As a result, the image gets stretched, and the
quality suffers.  It is like the camera is too close to the skybox.
Is there any way to change this (make the skybox far from the camera)?

The skybox fills the full 360x360 degree cube, and the camera is in the middle of it, so "making the skybox far from the camera" makes no sense. What you can do is increase the camera's FOV, which will make more of the skybox visible at one time. But really, the best idea is to use a higher resolution skybox image.

- It seems that texture is shown upside-down.  At least I can tell
positive-y image is.  I believe I can fix this by rotating the jpeg
image, but is there a better (or more right) way of fixing this?

That's weird, the images were OK in my case, and if you're loading a vertical cross cubemap as I was they should be OK for you as well... If your vertical cross cubemaps are not in the same format as mine, you might have to tweak how they're oriented. You can find the code that extracts the faces of the vertical cross cubemap and changes the images' orientations in the function

osg::TextureCubeMap* loadVerticalCrossCubeMap(const std::string& filename)

which is in osgUtil.cpp that was sent in a later message. See where it says things like

    zminus->flipVertical();

and try out other combinations of flipVertical and flipHorizontal on the various cube faces until you get the right result.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to