Question

In Ogre, i'm projecting a decal onto a sphere. However, the decal shines straight through the sphere and projects another decal onto the opposite side! How do I stop that?

material planets/Planet_Earth { 
  technique { 
    pass { 
      texture_unit { 
        texture earth_surface.png 
        filtering trilinear 
        scale 1 1 
      } 
    } 
  } 
} 

I'm afraid neither of the below answers are working. I have tried every shadow setting ald explored blender's texture settings, but nothing seems to work. The decal just renders both sides! It even happens in Ogre Tutorial 6! Any possible suggestion appreciated!

Note: I'm editing someone elses code, and just discovered that it's not a mesh, the sphere is being created in the code :O sowwy :(

Was it helpful?

Solution 3

I just couldn't get it to work, as there is no uv map. I gave up and used a .mesh that looked like my decal and positioned it on the surface of the sphere instead. Sorry guys.

OTHER TIPS

Enabling some form of shadows should fix it. Ogre Basic Shadows

You have to use a texture that fit your mesh. Ogre uses UV mapping to map decals to meshes. Depending on what CG program you are using to create your 3d model, there are different ways to create it. Look at this blender tutorial for an example. You need also an exporter to get a .mesh file out of it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top