PDA

View Full Version : Bevel Trim and Texture Append Materials



JaredSmith
03-28-2010, 04:47 PM
Hey guys, haven't posted in a long time. Recently I've been doing some shader work with the UDK and thought I would share a couple ideas I came up with for materials.

Bevel Trim Material

I use tiled trim textures a lot for a number of different things, stuff like railings or curved trim surfaces. One thing that has always bugged me about tiled materials is when they wrap around corners, even if you bevel the geo, the hard edges always just look kinda crappy and ruin the illusion of the details of the normal map that's being tiled. Basically the two end up looking like they don't belong together. This material generates a normal map for beveled edges from the gradients of texture coordinates. The upside of using the texture coordinates to make the normal is that the quality of the gradient is better then what you could get with a texture sample, and the gradient ramps can be adjusted with constant values if you want to change the sharpness or size of the bevel. Also of note is that the bevel sample uses the third uv channel, the idea being that you can have your regular tiled texture samples mapped on uv channel one, uv channel 2 for your lightmaps, and then use uv channel 3 to map where you want the trim sample to be placed. Here's some screenshots of the effect below.

http://blog.rustywidget.com/wp-content/uploads/2010/03/BevelTrim_Screenshot01.jpg

Texture Append

The texture append material will allow you to copy and paste up to two additional materials into another material and adjust the scale position and mask for that sample. It's pretty common practice with most unreal developers these days to combine tile and trim sets onto a single 1024 or larger texture sheet. The idea being to reduce the number of sub-object materials being used. With this material it makes it possible to swap out a section of a tile or trim set for another sample. So lets say you map one of your modular environment sets with one of your tile / trim sheets and later on you decide you don't like the wood trim you've used in one instance somewhere and would like to replace it with concrete. Instead of having to create a completely new 1024 texture sheet to replace the one sample, you could use this material to place a new texture sample in place of the older one.

http://blog.rustywidget.com/wp-content/uploads/2010/03/TextureAppend_Screenshot01.jpg

This is a pretty short explanation, and probably confusing. I'm going to be doing a more in depth writeup on my blog to try and explain these materials better, but for now here's some links to the upk files so you can play with them yourself.

http://blog.rustywidget.com/wp-content/uploads/2010/03/UDKShared_BevelTrim.zip

http://blog.rustywidget.com/wp-content/uploads/2010/03/UDKShared_TextureAppend.zip

axelzellalex
03-28-2010, 06:59 PM
how do i open these ? lol
content browser - open - 'file name'
shouts out an error...?

JaredSmith
03-28-2010, 07:06 PM
What's the error it's giving you. The packages were saved on the march build of the UDK.

axelzellalex
03-28-2010, 07:27 PM
ah...probs need that new march version
ive stuck with the Nov, as the Feb one annoyed me-cant remember why lol
il get on to the march version

jorewe
03-30-2010, 03:37 AM
Jared, I like the idea and the result. I'd love the indepth description tough.

danimal'
04-02-2010, 05:29 PM
Wow, that's pretty f'n amazing. I second more indepth discussion of especially the trim/bevel. Is the above a comparison screen shot, where the one of the left has it applied and the one on the right does not (it looks more like a hard edge on the right). Hard to tell because it may just be lighting, I'd really suggest doing a proper with and without shot so people can see what it'll do. Very cool and thank you for sharing!

jorewe
04-08-2010, 07:04 AM
Hey Jared, had any time for the play-by-play yet ? :)