Jump to content

UE3/UDK materials


Niosop
 Share

Recommended Posts

Does anyone know how UE3/UDK handles materials? I love their system. Do they have one big "uber" shader that does different stuff depending on what inputs are passed, or does it dynamically pick a shader depending what's passed in? Are all the possible effects handled in the shader or does it go through some code that updates the shader with new values (for panning, sine wave generation, etc)? I think if a similar material editor could be added to LWE it would bring us one step closer to going toe to toe with the big boys. Here's some examples of cool stuff you can do with it.

 

http://www.hourences.com/book/tutorialsue3mated2.htm (example of the sine and time functions, UV coordinate scaling)

http://www.chrisalbeluhn.com/UDK_Asset_Position_Offsets_Texturet_Tutorial.html (texture offsetting based on world coordinates)

http://www.3dbuzz.com/vbforum/simplevideo.php?v=894&t=-0.5 (detail normals)

 

I don't doubt that that anything that can be done w/ the UDK material editor can be done in LWE using a custom shader and some code to pass values to it, but it requires deep knowledge of GLSL to do so. A visual system like this would open up a lot possibilities for us non-shader guru types.

 

So what do you shader gurus think? Would a single uber-shader work? What's the limit on shader size? Would it have a big performance impact? It seems that the current system is pretty much a couple of big shaders that have parts selectively enabled/disabled depending on which defines are passed.

 

Any insight on how this might be implemented would be appreciated. I don't mind diving in and getting my hands dirty with it, I just wanted to get some feedback from people who know what they're talking about before I waste a bunch of time going down the wrong path. For instance, can the shader handle changing values based on time, or would the program have to handle that by modifying a uniform?

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

Their system is basically a visual way of writing shader code. All the "input nodes" in their system are variables or texture lookups, and it probably uses that to generate a new pixel shader for each material created.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...