Hello, I was able to put texture on TextureCubeMap, using the code by Jean-Sebastien. Thank you very much, again.
Now, when I try to use a 2048x2048 jpeg image for the texture, I get this message (after viewer.run()): Scaling image 'skybox-1.jpg' from (2048,2048) to (512,512) And indeed the image seems rescaled to 512x512. It does not have the quality of 2048x2048 image. Is there a way to use the 2048x2048 image without rescaing? What component is enforcing this 512x512 restriction? Any help shall be appreciated, Thank you. - Nao On Thu, Aug 28, 2008 at 11:42 AM, Naomaru Itoi <[EMAIL PROTECTED]> wrote: > Dear Jean-Sebastien, > > Your advice worked perfectly. Thank you very much! > > Date: Thu, 28 Aug 2008 08:07:59 -0400 > From: Jean-S?bastien Guay <[EMAIL PROTECTED]> > Subject: Re: [osg-users] SKYBOX ? > To: OpenSceneGraph Users <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > 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

