I think you could probably do 4 different masks, so that would mean a base texture plus 4 "layers" so 5 sets of textures in total.
Each mask could have a corresponding, diffuse, normal, spec, emmissive etc... but to do all of those with 5 sets of textures you would have to pack channels so you don't run into the texture sample limit.
I recently did a material with a base texture and 3 "layers" of other textures because it was easier to pack my blending alphas into a single dxt1.
Would you be able to vertex paint those different textures with the method you mentioned?
I know the landscape materials can handle 4 sets of diffuse with normals and spec.
But what about a basic static mesh?
By packing channels you mean adding say 3 diffuse textures into each channel R.G.B of your targa?
I thought those channels only contained the spedific color information? So the Red channel only has red color in it? Atleast that is what it is like in Photoshop.
Well each channel is grayscale, and what I'm packing into those channels is blend maps so the texture doesn't blend simply with the blurry vertex information.
Yeh you just need to LERP them together like you did your 2 first sets of textures.
So you take the output of the 1st LERP you have and plug that into the A channel of a new LERP, and for the alpha of that LERP you duplicate the blending function, except now you use a different vertex colour, and then you plug in whatever diffuse you want to blend on that channel.
You need to remember it sort of works like layers though, so the 1st LERP will be the bottom layer, and if you paint a different channel it will be above it and cover up that portion of the blend.
I would show you my material but it is like spaghetti sine I am blending 4 sets of diffuse, normal and specular.
You could also look into gradient mapping if you are going to have lots of textures, that way each diffuse texture could be stored as one channel. You could have 3 diffuse textures using one dxt1 texture and a relatively small 256 holding your gradients. You could also store the height map as the blue channel (-1 to 1) of your normal maps and derivenormalz.
There are only 5 separate functions you can do with vert painting (including black), although I'd imagine you could work with the gradient of your vert colors to do even more if you really wanted to (like 0-.5 would do one thing and .5 to 1 something else). This is probably a bad idea unless each thing along the gradient is related. As far as variation to break up tiling, you can often do a decent amount of that without vert colors by lerping tiling textures with a mixmap alpha.
pretty sure you could blend as many textures as you want by using if nodes. ie if red is 0-50 then use texture 1 51-100 use texture 2. you get less range of colour information to blend with but as many textures as you want. realistically there's no reason you couldnt put 100 textures in each colour channel if you were being really exact with your vertex painting. obviously other limits would become relevant but theoretically it would work.
Eh? UDK has a limit call of 15 textures in DX9, you can't override that. Just like Lerp, you can use a If node and Blend between the textures in a certain number/way but it will actually 'add' the texture number towards the limit.
I would say the biggest challenge in UDK is getting a nice Vertex Blend going on with more then 3 texture groups (3 diffuse, 3 specular, 3 normal, that's already 9 textures) since anything more will quickly kill your budget, especially if you plan on adding Transmission, CubeMap, etc...
yeah of course udk has a texture sample limit but in theory there's no limit to the number of textures you could blend. assuming you put specular in the alpha channel of your diffuse and use b/w maps in single channels you could in theory use the vertex colour channels like i mentioned. i didnt say it was a good idea, just that it was possible....
Watching the Eat3d tutorial, I'm wondering is there much of a benefit to using vertex paint if you have unwrapped objects? If you have an object unwrapped you could just as easily put in the details you want using the UVW template, right? I can see the benefit when the object is a flat plane or just requires one texture. I might be missing something here
Watching the Eat3d tutorial, I'm wondering is there much of a benefit to using vertex paint if you have unwrapped objects? If you have an object unwrapped you could just as easily put in the details you want using the UVW template, right? I can see the benefit when the object is a flat plane or just requires one texture. I might be missing something here
For uniquely unwrapped objects you can create variation - for instance, take a statue that you are lining a temple path with - you could blend in moss and damaged textures to make them all look unique.
Texture blending is very helpful, the majority of environment art involves tiling textures - you can't uniquely unwrap a whole building.
Eh? UDK has a limit call of 15 textures in DX9, you can't override that. Just like Lerp, you can use a If node and Blend between the textures in a certain number/way but it will actually 'add' the texture number towards the limit.
I would say the biggest challenge in UDK is getting a nice Vertex Blend going on with more then 3 texture groups (3 diffuse, 3 specular, 3 normal, that's already 9 textures) since anything more will quickly kill your budget, especially if you plan on adding Transmission, CubeMap, etc...
what tharle meant was that theoretically there isn't a limit of vertex paint channels. I mean, of course there is, but as he said, you could for example use the red vertex paint channel and split it into two. Instead of having values of 0 - 255 deciding which 2 textures to blend, you could use 0 to 127 in order to blend two textures, and 128 to 255 to blend 2 extra textures ones.
It's essentially a way of sacrificing "steps" in the mask, for an entirely extra mask.
I'm also using this technique to "store" multiple 3d shapes in a single object's vertex paint for my 3d vector displacement stuff.
I mean I get the idea, but how would that be possible in UDK? I already get issues where a high-clamped masks in UDK, will make my Red Vertex Color Textures, 'run' away from my 'Blue' and 'Green' colors, so I have to use Yellow, which in turn makes the CMYK values run away from each other.
Mind showing me how you 'clamp' the textures from value to value as you mentioned?
EDIT: just to sum up whats happening here. I'm taking the red channel and splitting it into 4. Values go from 0-63, 64-127, 128-191, 192-255.
Then I do an "add" and a "multiply" to offset the values and scale them up so that they go up to a full 0-255 range, or to be more precise a 0.0 to 1.0 range.
This allows you to blend more stuff and you still have 64 "steps", which is more than enough! (probably)
You can use a similar technique to create a 16-bit texture in UDK with just two 8-bit textures. I explained this also in one of the vector map threads somewhere in the forum.
Sorry Norman, cannot seem to view the images (my ISP provider is extremely stingy with certain things), mind using a more common site for dirty peasants like me?
Sorry Normand, cannot seem to view the images (my ISP provider is extremely stingy with certain things), mind using a more common site for dirty peasants like me?
For uniquely unwrapped objects you can create variation - for instance, take a statue that you are lining a temple path with - you could blend in moss and damaged textures to make them all look unique.
Texture blending is very helpful, the majority of environment art involves tiling textures - you can't uniquely unwrap a whole building.
I see what you're getting at. It certainly seems like an useful method
Hey guys, very interesting posts. I was wondering if it's possible to show vertex alpha information in UDK... by that I mean showing a vert as 0% opaque all the way to 100%.
Hi Norman,
Ive also been looking for something exactly like this to paint a mountain terrain! I was just wondering if you could tell me what the nodes are called underneath the Clamp and Multiple? They just have a value for their names 0,1,4
Cheers
Hi Norman. Can you explain a little bit about your material setup for newer UDK users.
I've checked out your screen shot and rather then just copy your work, I would like to know a bit about the "why's" of what's going on with your method.
Replies
bit there is a limit of olny 4 colour channels to use with vertex paint.
Is this correct?
Each mask could have a corresponding, diffuse, normal, spec, emmissive etc... but to do all of those with 5 sets of textures you would have to pack channels so you don't run into the texture sample limit.
I recently did a material with a base texture and 3 "layers" of other textures because it was easier to pack my blending alphas into a single dxt1.
Would you be able to vertex paint those different textures with the method you mentioned?
I know the landscape materials can handle 4 sets of diffuse with normals and spec.
But what about a basic static mesh?
By packing channels you mean adding say 3 diffuse textures into each channel R.G.B of your targa?
I thought those channels only contained the spedific color information? So the Red channel only has red color in it? Atleast that is what it is like in Photoshop.
Then blending is like in this free eat3d vid http://eat3d.com/free/vertex_painting
I got it set up so I can blend two sets of textures with diffuse and normal. Now I want to try to blend more with that same method.
Is this possible?
So you take the output of the 1st LERP you have and plug that into the A channel of a new LERP, and for the alpha of that LERP you duplicate the blending function, except now you use a different vertex colour, and then you plug in whatever diffuse you want to blend on that channel.
You need to remember it sort of works like layers though, so the 1st LERP will be the bottom layer, and if you paint a different channel it will be above it and cover up that portion of the blend.
I would show you my material but it is like spaghetti sine I am blending 4 sets of diffuse, normal and specular.
Thanks so much for the pointers.
There are only 5 separate functions you can do with vert painting (including black), although I'd imagine you could work with the gradient of your vert colors to do even more if you really wanted to (like 0-.5 would do one thing and .5 to 1 something else). This is probably a bad idea unless each thing along the gradient is related. As far as variation to break up tiling, you can often do a decent amount of that without vert colors by lerping tiling textures with a mixmap alpha.
That sounds way over my head at this point!
Lol
Maximum number of textures in a material (DX9) is 15, 12 if you check static mesh as it's only function.
Maximum number of instructions (DX9) is 512.
I would say the biggest challenge in UDK is getting a nice Vertex Blend going on with more then 3 texture groups (3 diffuse, 3 specular, 3 normal, that's already 9 textures) since anything more will quickly kill your budget, especially if you plan on adding Transmission, CubeMap, etc...
I've been finding that 3 vertex sets for painting is more then plenty now that I test it out and plan my base diffuse a bit better.
Also decals could always be added if needed.
For uniquely unwrapped objects you can create variation - for instance, take a statue that you are lining a temple path with - you could blend in moss and damaged textures to make them all look unique.
Texture blending is very helpful, the majority of environment art involves tiling textures - you can't uniquely unwrap a whole building.
what tharle meant was that theoretically there isn't a limit of vertex paint channels. I mean, of course there is, but as he said, you could for example use the red vertex paint channel and split it into two. Instead of having values of 0 - 255 deciding which 2 textures to blend, you could use 0 to 127 in order to blend two textures, and 128 to 255 to blend 2 extra textures ones.
It's essentially a way of sacrificing "steps" in the mask, for an entirely extra mask.
I'm also using this technique to "store" multiple 3d shapes in a single object's vertex paint for my 3d vector displacement stuff.
I mean I get the idea, but how would that be possible in UDK? I already get issues where a high-clamped masks in UDK, will make my Red Vertex Color Textures, 'run' away from my 'Blue' and 'Green' colors, so I have to use Yellow, which in turn makes the CMYK values run away from each other.
Mind showing me how you 'clamp' the textures from value to value as you mentioned?
EDIT: just to sum up whats happening here. I'm taking the red channel and splitting it into 4. Values go from 0-63, 64-127, 128-191, 192-255.
Then I do an "add" and a "multiply" to offset the values and scale them up so that they go up to a full 0-255 range, or to be more precise a 0.0 to 1.0 range.
This allows you to blend more stuff and you still have 64 "steps", which is more than enough! (probably)
You can use a similar technique to create a 16-bit texture in UDK with just two 8-bit textures. I explained this also in one of the vector map threads somewhere in the forum.
thats pretty cool, i was trying to figure out how to do that a few months agao
what the... they are hosted at my site!
anyway, here are some mirrors:
http://i.imgur.com/f9ZL4.jpg
http://i.imgur.com/TLRoo.jpg
But seriously, you're awesome thanks!
I see what you're getting at. It certainly seems like an useful method
Ive also been looking for something exactly like this to paint a mountain terrain! I was just wondering if you could tell me what the nodes are called underneath the Clamp and Multiple? They just have a value for their names 0,1,4
Cheers
Dave
I've checked out your screen shot and rather then just copy your work, I would like to know a bit about the "why's" of what's going on with your method.
Thanks to all the contributors of this thread.