Normal mapping only works inside 3DS Max viewport...

gamekill

25-05-2007 16:44:29

I was having trouble getting any materials that use shader to work outside the 3DS Max oFusion viewport (ie, when the scene was loaded by my own .exe game demo). I could not get normal map to display correctly, and also I couldn't get the vertexpaint-multitexture (new scene at ofusion site) to work.

Then I realized that I needed to put the .program and .source files for the shaders on the media folders of the project (duh).

But that only worked for the vertexpaind-multimaterial. The normal mapping is still strange.

Although it kinda worked, the lighting cast on the objects that use normal map is pretty weird, does not have a smooth transition. I get a very visible line between the "working great" part and the problematic part of the objects.

I cannot post a screenshot right now (or even today) but I hope someone knows what Im talking about and is able to help me out.

My guess is that it has something to do with the objects tangent vectors not being exported correctly? I set "TANGENTVECTORS = 1" and "_TANGENTVECTORS = 1" manually on the object's properties in 3DS Max. Is that correct?

:?: :x :shock: :? :cry:

Lioric

29-05-2007 17:39:09

See if in the log the TangentVectors were created for your object or if there is a related message

You need to have the shader specific for your object (as it will use a specific Texcoord channel for the tangent vectors)

The normal mapping shader example is not intended to be used as is (it should be tunned for your needs), its more an example for you to get familiar with the material system

In the next days more bump/normal mapping sample scenes will be posted, inlcuding the Monster shader, that will be more useful if you need an out-of-the-box usable bump shader

gamekill

01-06-2007 02:42:55

Solved the problem, had to remove (delete) Example_BumpMapping.cg file from the Media\Materials\Programs folder. It has the exact same name as the one from the oFusion Shaders folder, but is simpler. It doesn`t work correctly for the material on the ofusion normal mapping tutorial.