Sperical mapping on boddy part
Blitz3D Forums/Blitz3D Programming/Sperical mapping on boddy part
| ||
Hello everybody I have a question I have a model made under 3DSMAX the model use one single texture This is a knight So i have to make sperical mapping on armor parts. But not on the face or one the cloth How to do that ? (in my model there is still no groups or hierarchy, only the bones made with character studio). Thank you very much It will help me so much (pleaz excuse this bad english) Thank you byebye |
| ||
If there are different texture files, you can simply add something like _sph_ somewhere in you texture's name, and add the following at the begining of your program:TextureFilter "_sph_",64This will apply spherical mapping to all the texture you load with _sph_ on their names. |
| ||
you mean it is possible to make 2 textures one with the no metal objects and another with the other parts ? |
| ||
You will need to do the sphere mapped parts as a separate material (and thus separate texture) from the rest. In 3D Studio Max this is done with the Sub-Object/Multi material type. |
| ||
thank you !! |
| ||
that ' ok now thx but i have another problem I love all the details i have on my body part i apply the effect I mean I can't keep the details and se the effect ? |
| ||
You're going to have to be more specific than "details." I am going to assume you mean textured details (ie. features painted on with texture) in which case you will need to do multitexturing. Apply a main texture map with your details on it and do NOT set this to spherical mapping. Now add a second layer of texture, this time set to spherical mapping. You will need to use a blending mode, probably "add," in order to see the main texture map through the spherical map. Unless you have B3D Tweak (I highly recommend that tool for working with b3d models) you will have to assign the second layer of texture in code. This isn't a big deal; just texture normally but keeping the parts which will get a spherical map on a separate material. In code stick a handle to this material/surface and then apply your spherical map texture. |
| ||
oki thank you for all your advises jhocking thank youi very much i uploaded a little test i made in oder to use this effet on a simple form :-) before a knight so I have two problems the first is i can't read what i wrote on the texture (that's want i explained above) The second is, i can't play the animtion, but the animtion plau in unwrap in B3D what's the problemm *Thank you so much BYEBYE use winrar to decompress http://geric.delaeter.free.fr/geric/test%20multi%20uv.rar |
| ||
if someone can modify my exemple so that i can understand how to work (code and model in the archive) i mean making spheriacal mapping on one of the two textures but not the two. thank you :-) |
| ||
I don't have winrar. Post it as a zip. |
| ||
I resolved my animation problem (i thought it was an export problem from character studio to B3D) but i made a mistake in code I emailed you the archive in zip format. I will reupload it this evening thank you !! |
| ||
First off remove the TextureFilter command. As I said you want the main textures to be normal, without any spherical mapping. The sphere map will be a separate texture applied as a second layer. Any image will do (although it will probably have to be darkened because of the "add" blending.) Here's the image I used: Now add this code right before your main loop: ;*********************************************** metal=GetSurface(cone1,2) envMap=LoadTexture("envmap.jpg",64) TextureBlend envMap,3 metalBrush=CreateBrush() BrushTexture metalBrush,UV1,0,0 BrushTexture metalBrush,envMap,0,1 PaintSurface metal,metalBrush ;*********************************************** And the line by line explanation: 1 - grab the surface you want environment mapping on and attach a handle 2 - load the environment map with spherical mapping 3 - set it to "add" blend mode 4 - create a brush to apply to the surface 5 - add the main texture (ie. the text) to the brush as the first texture layer 6 - add the environment map as a second texture layer 7 - apply the brush to the surface |
| ||
So i reuploaded he 2 archives http://geric.delaeter.free.fr/geric/test%20multi%20uv.zip http://geric.delaeter.free.fr/geric/test%20multi%20uv.rar Thank you |
| ||
GREAAAT ! THANK YOU ! (i 'm really really too bad, lol ) I will test with a knight now I will post the result |
| ||
Glad to help. Add me to the credits for your game :) |