Not too sure what the correct terminology is, but I'm trying to apply a cube map in a non 'environmental' way- i.e. fixed to the mesh, and unchanging with camera movement.
essentially - cube mapping a sphere with arbitrary geometry. 1024x1024 x 6 Cube Map gives us the same resolution as a 4096x4096 spherical map, so I'm hoping it can applied in this way. I've got a material with a cube map loaded, but I'm not sure what setting would be needed to make the texcoords work statically. Although env_map cubic_reflection does show everything up as working, how do I make the cube map 'fixed' to the surface? Or is this not possible?
Any ideas?
'Static' Cube Mapping a Planet.
- Fost
- Gnoblar
- Posts: 17
- Joined: Tue Jul 05, 2005 9:32 am
- Location: UK
- Contact:
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
You can do this, yes. Your mesh will need to have 3D texture coordinates (uvws, which OGRE supports in its mesh format - use VET_FLOAT3 instead of the more usual VET_FLOAT2 for texture coords), calculated as the normalised vector from the centre of the sphere, through the vertex in question. Bind a cubemap of the world and use those uvw's to address the texture.
It is, however, more expensive than the traditional approach of using a distorted 2D atlas style texture. Less distortion at the poles I'll admit though.
It is, however, more expensive than the traditional approach of using a distorted 2D atlas style texture. Less distortion at the poles I'll admit though.
- Fost
- Gnoblar
- Posts: 17
- Joined: Tue Jul 05, 2005 9:32 am
- Location: UK
- Contact: