Home Unreal Engine

Custom Gloss Maps

polycounter lvl 5
Offline / Send Message
Fogbrain polycounter lvl 5
Hello :D

I've just begun learning UDK this week and I've been playing around with the material editor, which is really cool, but gloss maps have me stumped.

I am aware you can make your own gloss maps within UDK using parameters and whatnot, but creating textures for my environment, I made my own custom gloss maps and height maps etc through ddo and NdO, and when I plug my gloss map into the specular power, it makes my metal beam texture look extremely harsh, how can I get it to look as enhanced as it does in the previewers for dDo?

Thanks for any help.

UDK.jpg

Replies

  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    just multiply it with like 100-200 or more with a scalar parameter or constant1.
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Yeah that seemed to have helped, cheers Obscura.

    Do you have any great resources for material/general tutorials in UDK? I have Hourences and the UDK official doc up at the moment.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    I think those are the best ones. I found the UDN ones very detailed and useful, I learned the most from those. There are good 3d motive/Eat3D ones, but you need to pay. But you can find good/free videos on youtube.
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    actually it's better to lerp than multiply.

    if you do a linear interpolate, with a low value of 8 (in channel a) and a high value of 256 (in channel b) and use your gloss map as the alpha, it'll give you a much cleaner result.

    the reason for this is that your gloss map has values of 0-1 with 0 being black and 1 being white. if you multiply the map by 256 (for example) then you're going to miss out on "in between" values.

    for example:
    0.01 = 2.56
    0.02 = 5.12
    0.03 = 7.68

    see how it jumps with even the smallest change in the base gloss value? whereas interpolation would give you a much smoother transition.
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Ah I see, Ill have to try that one out.

    Another problem I've just run into was that I have this light with a glass like material on it, which also glows, but the problem is that its made the entire mesh glass instead of just the globe like I want it to be.

    Here's the material properties.

    uzIt1n6.png
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Wow, by the way gir, you were pretty much dead on, it turned all my gloss into a much more elaborate transition, I can actually see all the details when my object is hit with specularity.
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    okay so...

    you've got a fresnel node multiplied with your alpha texture and the result plugs into opacity, there are two problems i see here:

    1. your alpha texture doesn't have any completely white parts, which means all of the mesh will be translucent. make any parts you want opaque completely white in your alpha.

    2. fresnel is a mathematical term that has the potential to equal zero. I'll explain the actual math:
    lambert shading = diffuse * dot(normal,light)
    fresnel (basic) = 1 - (dot(normal,light))

    with lambert shading you can expect that when light hits a sphere, the surface is lit at the point of incidence(where the light hits the object) in the shape of a circle that fades out to nothing at the edges of the sphere. because fresnel is exactly the same but with "1 - " at the beginning, it means it's the inverse of that. so where lambert is 1 at the middle and 0 at the edges, fresnel is 0 at the middle and 1 at the edges.

    what this means for your alpha, is that regardless of what your input texture says, the fresnel is multiplying it to 0 (black) at the middle of the rendered object. so you will always have this problem while fresnel is plugged in.
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    So I've gone back to my alpha in PSD and turned the parts to be seen completely white, and I've removed the fresnel in UDK because I basically don't really need it.

    Heres what my alpha looks like in PS http://gyazo.com/0b7cd041db09acc770049383c17198d8

    and here's the nodes updated.

    http://gyazo.com/59abe07f0037fb2c86eb9fa133b02cf2

    Still unfortunately the same result.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    One solution that I would use is to use two material IDs. One with phong mateial for the lamp, and an another translucent for the light bulb. Maybe there is a better solution, but I think you can't get opaque surface with just a translucent blend mode.
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Obscura wrote: »
    One solution that I would use is to use two material IDs. One with phong mateial for the lamp, and an another translucent for the light bulb. Maybe there is a better solution, but I think you can't get opaque surface with just a translucent blend mode.


    Yeah that'll probably work.

    It did solve this other problem had perfectly using materialinstances.

    Although one thing I find with them is, say if I wanna set my material instance diffuse to none, it doesn't seem to change anything, I had to basically create a 1024x1024 white sheet to disable like for example a glow effect. Is there an easier way around that?
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    Add a static switch parameter, connect the basic texture that the master material has to the true, and connect constant1 (0 or 1 depending on what you want) to false. Then you can disable the diffuse texture in the instance.
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    Obscura, you're the fuckin' man.

    It worked :D

    http://gyazo.com/c945adb3cab9f7014e35ac33887f78dc

    And it looks awesome. Thanks :)

    Is there anything that can be improved on that material?
  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    without seeing the full material grid i couldn't say how optimal it is. like for example, what is being plugged into the diffuse UV.
  • Fogbrain
    Offline / Send Message
    Fogbrain polycounter lvl 5
    A BumpOffset node with Height in order to slightly enhance the normals.
Sign In or Register to comment.