Spotlight in meshes....

mykeh13

08-03-2009 17:56:34

Hello !.

Maybe I'm wrong, but spotlights does not give me the same result in blender meshes than ogre created meshes...

E.X. :

The next image is a plane created with ogre, meshManager :



.. and this one is a mesh created in blender exported as a scene and mesh (this plane is enough big like before one)


As you can see, spotlight works fine in first one, but in blender mesh not....

Do I must to create the plane apart to get spot works?... or there is a technic to make get blender's meshes works in...?

Thanks......

bharling

09-03-2009 16:32:10

Looks like a problem with normals perhaps.

things to try:

1 Make sure the mesh in blender has normals pointing the right way up ( you can enable normals drawing in the mesh tools panel )

2 Make sure the plane has UV-coordinates in blender.

3 try re-normalizing in blender ( CTRL-N with the plane selected )

It looks like you're using stencil shadows on the plane so you can also try:

yourPlaneMesh.buildTangentVectors()
yourPlaneMesh.buildEdgeList()

mykeh13

11-03-2009 01:08:05

Thanks ! i'm going to try...

mykeh13

17-03-2009 21:29:50

i cant get spotlight working.... i dont know why... normals are ok... i flipped like you told me but textures vanished, so i supposed that normals was good before... recalculated normals too, and the same...

thats two las code-lines, is oriented to meshes, but since i use dotscene, how could i apply those lines to a concrete mesh if all them are into scene...

Did you try to put spotlight in ogre from blender's exported scene?...

Thanks again... !