Multitexture, Howto?
BlitzMax Forums/MiniB3D Module/Multitexture, Howto?
| ||
What I am looking for is for a small example to paint one texture over another one on a surface. I want to create some kind of 3d level editor using MiniB3D, and have the option to paint in 3dmode with a brush over a surface with a standard texture applied and hope some of you can help me in the right direction. The leveleditor will be for landscapes only. |
| ||
I'd also like to know about this. I want to try and use the first texture layer as grass and then put another 'detail' texture over it. |
| ||
have you tried textureblend |
| ||
have you tried textureblend I'm asking for a small example, because I'm a beginner with MiniB3D. Some code with 2 textures on 1 surface. |
| ||
me too is looking at this now. when i find out i post code.. if i find.. |
| ||
|
| ||
the above dint work for landscape. its only shows how to blend 2 texture. in order to do this in a landscape you ned some kind of masking. (Iam still looking for answares.. there seam verry few that accaly knows about blending textures. more persones knows the alpha vertex method. ) |
| ||
I am finaly got something to work. http://www.blitzbasic.com/Community/posts.php?topic=77656 but i am not complete with it.. it has issue black border in the mesh. but it at least blends now.. How can i explain this.. Step 1) the mesh is white at beggining so draw the first layer is no match. Step2) now the mesh has ben textured.. we ned to nutrulize som part of it with wite color. so we can paint the second layer over it. so we apply a mask. a white mask that covers the part we want to fill with more colors. Step3) Apply next texture on that white mask. :D Done ! but as i said iam not 100% complete.. heres a screen shoot ![]() |
| ||
Here is some BB codes of how i did above.. hope it help some.. i am faling back to WOW some now.. http://www.tiberion.com/blend.zip ; Images and codes. |
| ||
Here herse one of those 2 milion tris per render... but i wounder how my laptop can run this... ![]() |
| ||
Thanks Warner and Wings, I'll go through the code when I get home from work to see if I understand it better now. |
| ||
No problemas Digital Anime just want to show off a little more here :D This is a pic of smoth blending example. You can always increese the resulution of the blending 2.0 or somthing this is still 1.0.. (by 2.0 i mean 255*2.0 = 500) Also one shold use Alpha to make the transition better looking. as greyscale also grayering things. ![]() |
| ||
Now when we know the secrets.. who do we tell about it ? |
| ||
Warner, I tried your example and it works fine. If I'm correct I could use a grayscale texture to go from grass to sand smoothly (just an example). Textureblend does the trick, I only need to change the modes depending On what I want. This really helped me understanding how it works. This is still a far way to implement it in my software, but this is something I can start testing with. "What does this button do?" ;-) |
| ||
A little problem.. Light information is lost on the blended layer.. it works like this, Oringal mesh with lightning Blends with Texture1 Wokkrs good as orginal is white. and lighting. Blends with Mask1.. Pure flatt white no light info in this layer. Blends with Texture2 oh nooo its pure white flat ! THis means that you have to add shade to the blending colors yor self.. i realy dont know how to do this :D |
| ||
(Se the above ligth problem as this) There is no more Z Errors :D |
| ||
well friends.. i gave up texture blend.. cause of light info not correct.. (i want dark place with camera light + tourche etc..) also bump map fails. |