Vertex paint in max to irrlicht

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Vertex paint in max to irrlicht

Post by ultramedia »

Hey everyone,

Is there a way the vertex painting from max can be brought into irrlicht on a terrain mesh, then used to do texture splatting?

Also, ahem, I don't know how to write (or read) shaders yet, can anyone point me at anything for the COMPLETE shader newbie?

Cheers
frostysnowman
Posts: 83
Joined: Fri Apr 11, 2008 3:06 am
Location: Beaverton, Oregon, US

Post by frostysnowman »

I would suggest rendering to texture a diffuse map for your object that has been vertex painted, instead of finding a way to import it into Irrlicht. I do not know if there is an existing way how to do what you are asking (and my guess is not).
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Hi Frosty,

It's for a very large terrain, so I can have higher definition masking in some areas by tessalating the mesh only in that area. More verts = finer blending.

The problem with an alpha texture is that it's one resolution across the entire mesh.

Nothing, and I mean NOTHING in 3D has given me such an endless amount of grief as trying to get simple vertex color masking going from max to a game engine.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Which format do you export to, and which vertex color is used now?
Lekane
Posts: 31
Joined: Thu Jun 01, 2006 7:07 pm

Post by Lekane »

i have it from blender to irrlicht using gandalf b3d exporter
not sure it'll help, just sayin :wink:
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

b3d has vertex colors, and they are automatically loaded. But only with the latest SVN code.
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

With the B3D export having vertex colors, is that only rgb and a? Or can you have more than 4 different textures?

My goal is to be able to paint a mesh in max with vertex painting, laying down multiple map channels each with a different vertex color mask painted in it, then export it as an x mesh, then find a shader that lets me do multiple passes in irrlicht rendering a different texture for each vertex color mask layer.

To be honest, I've just about had it with shaders and am thinking about figuring out a way to manually compile multiple bitmaps and masks on the fly in a geometry clipmap setup
Last edited by ultramedia on Thu May 15, 2008 1:57 pm, edited 1 time in total.
Lekane
Posts: 31
Joined: Thu Jun 01, 2006 7:07 pm

Post by Lekane »

blender seems to only allow rgb in vertex painting
edit: oh and it works in 1.4
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Vertex colors or textures? I'm a little bit confused now...
Yeah, could work with earlier versions, there had just been some changes regarding the b3d loader so I might not have found the correct place in the older code.
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

My main beef with vertex colors is only being able to have 4 different textures (the rgba channels). Max lets you create multiple map channels of vertex colors (not limited to four), I just wanted to be able to use these to build up masked textures on a terrain mesh.

Anyway, after doing an awful lot of surfing, I think I'm asking/expecting too much of vertex colors for masking textures, I'm going to do some tests this weekend with some other non shader based approaches/techniques I've been thinking about...
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, you want to define 4 256-steps alpha masks in one vertex color? Well, I don't think you can do more in one color, because vertex colors are restricted to 32bit. But you could also use less alpha steps and say 16 steps are enough, hence get 8 texture belnding possibilities. OTOH Irrlicht does only support 4 textures per material, so it would make more sense to ad some tiling to your terrain and use separate materials to mix more textures.
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Here's a guy who can explain a lot better what I'm trying to say:

http://tminus5.50g.com/terrain/terrain_a3.htm
Post Reply