Paint a mesh?

Community Forums/Developer Stations/Paint a mesh?

thelizardking(Posted 2007) [#1]
OK, I have looked for the awnser to lifes greatest mystery, and I cannot find it: how do I paint a mesh with a texture? (like what ALE does) not a single texture, but multiple textures, dirt at some areas, grass in others, and some snow too. I'm pretty sure it has to do with the VertexAlpha command, but thats all I could dig up. (You'd think BRL would put a tutorial in thier new book for stuff like ghis!)


Matty(Posted 2007) [#2]
This could be not quite right but I think it goes something like this:

The terrain mesh has 3 'surfaces' (blitz3d surfaces) which each is textured with grass on one surface, dirt on another and snow on another. Basically think of these surfaces being copies of the original base mesh which sit in exactly the same location, ie they overlap. At this point you won't see much other than lots of zfighting.

You then set the vertex alpha of the mesh, also setting the entityfx flag 32, at various points which lets the textures blend together depending on what strength you make the alpha value of the vertices.

There are some issues with zordering and zfighting that may occur to which I have no answer other than I never looked into it far enough. Although they can be solved.


thelizardking(Posted 2007) [#3]
so i basically take a mesh, copy it, but render all vertices invisable EXCEPT for the applyied textured vertecies?


Zethrax(Posted 2007) [#4]
What you're trying to do is called 'texture splatting'. Below are links to a couple of articles on the subject.

http://www.gamedev.net/reference/articles/article2238.asp

http://www.cbloom.com/3d/techdocs/splatting.txt


thelizardking(Posted 2007) [#5]
thats cool, but can I get some actual commands? lol


jfk EO-11110(Posted 2007) [#6]
FLE was an open source "texture platting" project:
http://www.blitzbasic.com/toolbox/toolbox.php?tool=167


AdrianT(Posted 2007) [#7]
I have a HLSL shader that lets me blend 3 materials by mixing R,G,B vertex colours. THat works very well for terrains and offers quite a lot more flexibility than vertex alpha to blend two materals.

Depends on what engine your using for rendering your graphics though.


IPete2(Posted 2007) [#8]
For the low budget people there is the excellent "Tattoo" by our very own Lee Page...

http://www.terabit-software.co.uk/


or if you have a couple of hundred pounds to spare ...Deep Paint 3d and Deep UV from Right Hemisphere will allow you to paint right onto the mesh in great detail - add bump mappiung too - lovely (I wish I could afford it).


www.righthemisphere.com

IPete2.