lighting help

kneeride

18-01-2007 11:09:04

Hi, I'm having some lighting issues.

I've added a Free Direct light source to my scene. The scene looks OK in max, but the objects in the ofusion are completely white. ie too much lighting.

I've edited my object materials so that they are darker and render properly in the ofusion viewport, however they are now very dark in max and difficult to model.

any ideas on how to get the lighting in max and ofusion similar? thanks.

Lioric

18-01-2007 15:52:40

Are your objects scaled?

kneeride

18-01-2007 23:31:47

Yes, I believe they are. Does this cause problems?

Should I remove the scale?
Maybe convert to mesh will do this...

Chris

19-01-2007 11:57:59

Scaled objects have problems with normals and thus mess up lighting information. You should Xform your objects and see how it looks then.

kneeride

20-01-2007 04:49:17

How should I do that Chris? Reset XForm?

I've applied Reset XForm but am getting a strange problem where it sometimes works and it sometimes doesnt work.

ie most time i apply the xform, it scales my model back to its original size. (I still want to keep the scaled size).

but just a couple of attempts, it has kept the original size and set the scale back to 100%. I however can not repoduce this consistently.

Does anyone know what is going on here?

kneeride

20-01-2007 06:54:16

I've tested Reset XForm on a single scene (ie a box). It seems to work ok.

Maybe there's something wrong with my model or a bug in 3ds max.

Lioric

20-01-2007 15:18:43

Additionally you can reset the scale of your objects (so the current scale becomes the unit scale) in the hierarchy panel

kneeride

21-01-2007 18:39:46

Good tip! Thanks, Lioric.

I used the reset transform to ensure I removed translation, rotation and scale transforms.

Would it be good practise to do this to every object that does not have a unit transform before exporting?

Lioric

23-01-2007 16:39:02

Yes, in Ogre engine, lighting depends on the scale (it affects the vertex normals)

If you really need a non unit scale for your obejcts (only recommended if you have a reason), you should use the "setNormaliseNormals" method for your scaled objects when loaded in your application

But as a general rule, if you wont use the object's scale in your application, then you should set a unit scale for your objects