Multi-texture/vertex blending shaders?

Friendly conversations, and everything that doesn't fit into the other forums.
  • 1
  • 2
16 posts Page 2 of 2
JeffR
Steering Committee
Steering Committee
Posts: 721
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Jan 06, 2017 3:49 pm
Lets assume you have a wall that is juts 4 vertexes, how you gonna blend that?


It'd be like if you had a terrain block with only 4 verts. Each corner could have the blend effect applied on it, but it would influence the entire quadrant of the mesh in that corner.

I wonder how it works that you have one material? I mean you have multiple ones like with the terrain.
It looks a bit like the megatexture approach where you can paint it like you want and in the end it gets baked to one megatexture.


Sort of. You're still only using one actual material. As with the video, they weren't swapping back and forth between brick, water and sand. It was one material with multiple diffuse, normal and spec textures, each set associated with a vertex color value. You paint blue on the vertex and it blends the default texture with the sand texture for example. So you're only using one actual material, and you don't actually bake anything into a final texture, it's handled runtime in the code.
Duion
Posts: 761
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 06, 2017 7:38 pm
So how many textures can you blend with that method? One for each color? Red, blue, green?
JeffR
Steering Committee
Steering Committee
Posts: 721
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Fri Jan 06, 2017 8:42 pm
Yep. You basically get your base textures, then can do a sub material per color channel.
Duion
Posts: 761
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Fri Jan 06, 2017 9:14 pm
So you can only do 3 materials with that? Does not sound that good to me. Currently I use the vertex paint for adding diffuse color to the textures, this gives you an individual diffuse color tint for every polygon in the level without adding materials or textures etc. This seems to be a better use of the vertex paint to me.
Mitovo
Posts: 83
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sat Jan 07, 2017 3:08 pm
Azaezel wrote:Should note the vertx painting approach specifically (as oposed to a splatmap, which would be a 5th texture where you reference rgba for your blend ops) does require a higher than normal polycount for lookup, pretty much by definition.


I actually prefer the splatmap approach, as it gives far more direct control, but vertex blending works as well, though it can really look like vertex blending if you're blending across a large polygon. Not that anyone but someone who knows what vertex blending is would look at it that way lol.

I'd worked out a node setup in Blender that uses a splat map approach and it's awesome. Thing is, I don't know how to translate that into a format T3D would understand, and sadly baking to a single texture tends to result in really low resolution texturemaps, unless you make them all huge; especially on large objects.
Mitovo
Posts: 83
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sat Jan 07, 2017 9:58 pm
Duion wrote:So you can only do 3 materials with that? Does not sound that good to me. Currently I use the vertex paint for adding diffuse color to the textures, this gives you an individual diffuse color tint for every polygon in the level without adding materials or textures etc. This seems to be a better use of the vertex paint to me.


I've seen up to 4. Base texture, then R, B and G channels.

Also, it's not a binary, mutually exclusive matter of "which is better". Horses for courses.

If you're looking for the ability to change the coloration of the same texture across a surface, and that's all you need, vertex color is ideal.
If you're looking for having up to 3 or 4 different textures on a single object, multi-texturing is ideal.

If you want the best of both worlds, you could probably mix both together - use a splat map for the multi-texture part, and then vertex color to change the tinge. I've mixed these two in Blender, but again, not sure how that would apply to a material in T3D

A single project can use both for different things.
  • 1
  • 2
16 posts Page 2 of 2

Who is online

Users browsing this forum: No registered users and 1 guest