Had a try or two with normal map but anim8or crashes.update...that was with a subdivided sphere with spherical uv mapping.it worked ok with a basic mesh,i then subdivided the sphere afterwards and anim8or didn't crash.update 2 seems ok now...but it did crash the first two times...will play some more.update 3 perplexing just crashed again using a simple rectangular object.anyone else getting this?

Hey Steve, glad it's finally in there! Normal maps load fine for me. I do have a suggestion, and that is to allow more options to specify for the normal maps. It'd be nice if there could be a button next to the normal map load button, that points to a dialog like this:

The current issue is that Anim8or only supports Object Space normal maps. Tangent Space is best suited for models with repeated or changed UVs (such as most game models). If the object was, say, mirrored, the normals would look flipped in Object Space, such as in the video below (rendered in Anim8or). In fact, I'd say that Tangent Space should be the default mode in Anim8or (more reading here).

If Tangent Space was supported, it'd look correct (like in the image below)

Also, since not all models and normal maps will be created from the same source, their handedness might be different than Anim8or's default. Red might be flipped (X-) or actually represent Y+, not X+. I'm guessing Anim8or is X+, Y+, Z+. Some programs like 3ds Max is X+, Y-, Z+ or a different variation. Hence why the Swizzle option in the dialog box would be spectacular, since the user can adjust it based on their incoming files.

Couldn't get attachments to work, so click here to download the .an8 file used in the examples above.

Steve, Normal Maps, work very wellbut, only for test i create a new texture, a Bump Map texture based in your normal map "EC_Stone_Wall_Normal.jpg"(see attachments)but when i try render(raytrace mode and "antialias" ) the blocks with (normal map+another block with bump map)

"sometimes" the render stop, and not ends... is a bug?(demo in attachments)

Raxx: I thought Anim8or is using tangent space maps. They are transformed by the normal/bi-normal/tangent matrix before they are used. Object space normal maps are used as-is. I'll check my math and see if I'm doing something else wrong.

neirao and Raxx: I'll look into the crashes. If you have an example that reproduces a crash fairly reliably please post it.

Hey Steve, it could be correct afterall, except for the case shown in the sample I uploaded earlier. I assumed it was object-space because of that and some tests I made using other models found online gave weird results when they had textures with repeated UVs. I guess it's just the repeated UVs that's wrong?

Yes, I agree that options to support multiple types of normal maps is good.

Note: I've found a major issue when the normal map texture weight is less that 100% in the scanline renderer, and a very minor one in the GLSL code (but it's small so that you'd probably not notice it).

There are apparently a few visual disparities. One is that in some areas (like in the shoulder), it's washed out. It's certainly not as crisp in any areas as in the top two images. The other thing is that it seems that face normals are blending/influencing the normal map. There are polygonal creases and shading. Aren't they supposed to be completely overridden by the normal maps?

The normal map is rotated by a 3x3 matrix consisting of the normal, bi-normal and tangent vectors to align it to the orientation of the face. Theoretically these three vectors form an ortho-normal matrix.

Anim8or computes a binormal for each vertex based on it's normal and du/dv directions of the texture coordinates. Then the normals and binormals are interpreted across the triangle. Each pixel then computes the tangent = normal X bi-normal. These should be interpreted smoothly across the surface.

If these three vectors aren't more or less orthogonal, or if they aren't smoothly interpreted across the edges between adjacent faces, then the whole thing falls apart. My guess is that Anim8or isn't computing a good set of binormals.

So I'm looking into it. I downloaded the model in the link to work with.

On another note: does anyone have a good example of something that crashes or loops?

i can recreate a crash pretty consistently load a sphere ....load a diffuse and a normal map ....every thing ok here if i render.....pause there a moment........Now go back and reload the same maps again.....anim8or goes white screen and crashes for me at this stage even before i hit the render button, sometimes after i hit render[scanline]slightly different results depending on what maps i use.but it happens with just a basic sphere mesh,the EC normal map you supplied and any diffuse texture.