Away3D Normalmaps Generation (2)

Flash

normalmapsMike and Dave Need Wedding Dates movie download

This demo shows the combination of a normalmap after its generation with a bumpmap.
The settings are of course overkill, but they should show you enough how powerfull and good looking this combination can be. Even with this amount of faces.

Two events for the monitoring of the trace are available, TraceEvent.COMPLETE and PROGRESS. Handy if you generate from very large models.
You can set the amount of polygons to be handled per iteration to avoid to crash the player as well and even add a little blur to smooth the results.

The demo shows also one of the feature the new NormalUVModifier class has to offer.

First a sphere is generated and the bump information is applyed to it with the NormalUVModifier class. (I will soon show more of what this baby is capable of)

normalmaps

Then the Dot3Material is generated with the following maps and of course the generated normalmap.

normalmaps
normalmaps

A Flash 10 dedicated version is in the make. And should be available soon in a good svn near you.

Away3D Normalmaps Generation

Flash

normalmaps

How frustrating is it to have a Dot3Material in Away3D and not be able to use it because you need to have a special map generated by some expensive or not easy to use tool? Especially knowing how smooth and natural surfaces can look like…
Wouldn’t it be a bit easier to ask Away to make one for you?

Like this:
var mapgen:NormalMapGenerator =
new NormalMapGenerator(myMesh, width, height);
var normalmap:BitmapData = mapgen.normalmap;
var mat:Dot3BitmapMaterial =
new Dot3BitmapMaterial(myColorBMD, normalmap);

Wow wow… please critics calm down!! I’m aware that the very concept of a normal map is to simulate high polygon look to low polygon models. You soon can write an Air app, load some heavy models into it and output a map in the same spirit if you want. BUT what if a normalmapped model was looking damn good with a map defined by its own low polygon geometry? That’s exactly the question I had while doing some F10 research. And best way to find out is to write a generator and see how it goes.

To be honest, I’m absolutely surprised it looks that good even with the few glitches I still need to fix. Look at the definition of the highpolygon model and the generated one. A lot less information is in there, yet it still looks good once applied. The next step will be to merge bumpmaps to it in order to get some detailing back.

normalmaps2
The highres output from highres model

normalmaps3
The Away output from low res model

Let me do some polish/clean ups, add a little system where you can make more of them without freezing Flash for a few seconds to that class before it lands into the svn and you will be soon able to try it by yourself.

Thx Arno! This one’s for you!