PDA

View Full Version : Border selection blending?


Mr Whippy
04-10-2003, 03:25 PM
Hiya, I'm wondering if anyone knows of any kind of technique, or alternatively a plugin, that essentially borders a selection with the nearest neighbour colour, all the way around a given shape.

To get an idea of what it is being used for is a texture burned car body for a low-polygon model. I used Max 5 to export the texture, with no anti-aliasing against the background, so I have a nice sharp edge against the black background of my texture, and an alpha channel to select the geometry outline from also.

Now, since Max renders these "burnt" textures with no overlap at the edges, it leaves artifacts on the textured model, where the edges may have aliasing lines along them, or bleed the black background onto the actual model.

Obviously that is unsightly, and due to the random noise and delicate shading of a GI texture, it is very hard to remove the sharp borders effectively, without spending hours going around all the edges, cloning several pixels out of the edge colour.

Now, a plugin that simply detect the nearest colour, and then borders with that in mind would be great! It'd save me hours of delicate colour matching work, and make the textured model neater too!

I've already tried cloning and blurring the layer lots, and then removing the interior and exterior beyond 3 pixels, so I just get a band, but it is far from perfect, and tends to leave nasty artifacts which again, show up badly on the textured model.

Anyway, I'd appreciate any help, or ideas on this. Any plugins that might achieve an effect, even a half way one would do...

Odd why Max 5 developers never thought of this, since one of the main features of this texture burning is for low-poly modellers and game content creation...

Thanks in advance!

Dave

theGuest
04-11-2003, 09:13 AM
Sorry, i just have to ask... have you tried actually rendering the model with the applied texture, to see if it's just the preview image that looks like crap?

Also... i'm sorry, but i got lost in your explanation a little... you DID say you had an Alpha mask for this texture, right?

Marcel
04-12-2003, 04:22 PM
Maybe this works:

1. Use the alpha map of the texture to select the stuff you need.
2. Copy those parts to a new layer
3. blur that layer with a small gaussian blur.
4. Copy this layer 10 times, and then merge them into one layer
5. Make a copy of the original layer and place that on top.

Blurring the layer essentially makes the layer bleed a bit outwards, copying it a couple of times will make it the original intensity again.

Mr Whippy
04-12-2003, 07:11 PM
I've already done that blurr thing a few times, and it works the best of any technique so far... The only problem is that the last to outer edge has aliasing on, even though I turned OFF anti-aliasing against the background...

So I suppose I can try it from 1 pixel in from the alpha selection, but since Gaussian blur still has a density that is greater at the centre of the effect, I can still end up being left with a VERY faint band round the edges. In a game, with mip-mapping and such, these bands can flare up along sharp edges and look just weird!

I think I'll end up maybe rendering the output with particular edges drawn out a few pixels. That way I'm fooling the uvw mapping, but it took about 3 hours to bake the global illumination onto the texture....

Cheers for the help anyway... first time I've used the burning techniques, so I've hit alot of brick walls when I start editing in Photoshop!
Good old hand drawn is still the way to go :wip:

Seya

Dave

Marcel
04-13-2003, 01:28 PM
What about the edge padding option? I kinda remember it doing such thing. This is what the helpfile says:

Edge Padding—The amount, in pixels, that edges are allowed to overlap in the flattened (“unwrapped”) texture. Default=2 pixels.

If the baked texture shows visible seams when you view it in shaded viewports or renderings, try increasing this value.

Mr Whippy
04-13-2003, 04:40 PM
Hmmmm, I'll have to take a look at that... Thanks for pointing that out!
The tutorials don't cover that function much, which is strange. Perhaps the default value is sufficient for smaller textures, but mine is 1024x1024, so perhaps the value needs changing!

Thanks again, I'll post back if it's been succesful.

Sorry this is kind of under the wrong sub-forum, but I suppose it's helping answer my problem.

Seya

Dave

CGTalk Moderation
01-14-2006, 09:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.