NormalMapping in entity with multisubobject

Blitz3D Forums/Blitz3D Programming/NormalMapping in entity with multisubobject

Pinete(Posted 2006) [#1]
Hi all,
I've a character textured with multisubobject and I'm trying to put a normal map texture that will correspond
with every texture of the model.
The problem comes when reading surfaces. Blitz seems
to allow various diffuse textures but just one Normal
map at channel 0.
It's possible to put various normal map textures to an
entity with various diffuse textures?

Thanks in advance!!


jfk EO-11110(Posted 2006) [#2]
Multisubobjects ? Are you talking about child meshes, a mesh hierarchy loaded with LoadAnimMesh?

Well basicly every surface may have it's brushes and every brush may have multiple texture layers and a total of 2 UV Coords sets per surface. In theory you should be able to assign an individual normalmap for every child.

You have to iterate recursively trough the mesh hierarchy tho.


Pinete(Posted 2006) [#3]
no, no, I'm talking about just an entity textured with various textures, but not its childs.
Imagine a floor with textures for sand, a road and some texture of grass... a common 3dsmax multisubobject...
Various diffuse textures in the same model.

some idea?


Pinete(Posted 2006) [#4]
Just image you make two cubes in 3dmax,
one of them have a brick texture of 256x256 and
the other one has a sand texture of the same size.
Now collapse them in one object.
The resultant object has two textures in diffuse channel.
That's the kind of object I would like to put normal mapping, but I can't because there are two materials and only one channel (0) for normal mapping...
My question is if there exist some way to do that...


jfk EO-11110(Posted 2006) [#5]
If you don't collapse it, but simply export it as a scene with multiple objects, blitz will load it as one mesh (using LoadMesh) with multiple surfaces. Each surface will have the diffuse map on UV channel 0. As far as I know 3DS doesn't support more than one UV set. You could export it twice, one time with the duffuse map and the second time with the normalmap. then import both in Blitz and read out the normalmaps UVs and set them in the other mesh.

Maybe if you use some export paths for the B3D format you can export both sets in one step. (b3D pipeline or something, or the max to dx8 to ultimateunwrap to b3d path). However, when you load a mesh, the order of the surfaces will not be the same every time, so you need to identify each surface by the filenames of the textues used by the brushes (see SaveB3D example in the code archives on how to determine the used textures)

Hope this helps.


jfk EO-11110(Posted 2006) [#6]
ehrm i was just reading your postings again. It seems you want to use LoadAnimMesh since it's a character, so my previous advice isn't that useful.

Currently I only see one solution: put multiple textures into one file to make it a single-surface thing.


boomboom(Posted 2006) [#7]
Blitz doesn't support normal maps does it?

not without middleware etc


Pinete(Posted 2006) [#8]
Thanks jfk,
I guess I understand your approach but could you
explain me a little more?

Thanks!
:)