Home 3D Art Showcase & Critiques

UDK Physically Based Lighting!

13

Replies

  • shaderfx
    Options
    Offline / Send Message
    shaderfx polycounter lvl 9
    I wanted to ask if any of you are interested in getting your physical shaders into Maya LT ShaderFX?

    I can help do the conversion if you'd like or guide you through the process.

    I think it would be nice to be able to use the same shaders in Unreal and Maya LT, but since there is a bunch of different varieties of physical shader approaches, I would like to try and match it to some of your approaches.

    Let me know if that is of interest at all.

    Thanks!
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    hey man,

    i've got no problem with that happening, i'm just not a maya licensee. if anyone else wants to convert the nodes over, that's fine by me. the more streamlined peoples workflows become, the better!
  • Esselle
    Options
    Offline / Send Message
    Esselle polycounter lvl 10
    Does it make sense to bake lights with lightmass? or does it invalidate the whole shader?
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    as far as i'm aware, you can't bake lights with this shader as it uses custom lighting.
  • Santewi
    Options
    Offline / Send Message
    You can use lightmass, but to get bounce lighting you'll need to change the lighting model to phong and plug in the diffuse, after building you can just change the lighting model back to custom.
  • Esselle
    Options
    Offline / Send Message
    Esselle polycounter lvl 10
    ok so, thank you :)
  • Serial Lens
    Options
    Offline / Send Message
    Esselle wrote: »
    ok so, thank you :)

    Also, as far as I know custom lit materials like this one will only receive specular from dynamic lights.
  • shaderfx
    Options
    Offline / Send Message
    shaderfx polycounter lvl 9
    That is great almighty_gir,

    Can you ping me by email?

    kees.rijnen@autodesk.com
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    shaderfx wrote: »
    That is great almighty_gir,

    Can you ping me by email?

    kees.rijnen@autodesk.com

    done, look out for an email from lee_devonald@crazyferretstudios.com
  • polyneutron
    Options
    Offline / Send Message
    @almighty_gir: Thanks for sharing, man! But it looks like I have a constant app crash whether I'm trying to drap'n'drop a static mesh from the package you've posted, or trying to open any stuff there.
    UDK Log reading didn't help at all... Don't know why it happens. Any ideas why it occurs?
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Yeah, I just installed UDK july 2013, trying to fully load the package causes it to crash. Using 1.04 of your package.

    edit: Just downloaded 1.03 and it loads, although does give a missing cubemap warning.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    sorry for the lack of updates guys, been super swamped with work. i'll try to get an update out soon, and hopefully that will fix the crashes.

    cheers!
  • Serial Lens
    Options
    Offline / Send Message
    sorry for the lack of updates guys, been super swamped with work. i'll try to get an update out soon, and hopefully that will fix the crashes.

    cheers!

    Awesome, looking forward to this.

    Btw, I just discovered how to get custom lighting to work perfectly with lightmaps (while still maintaining custom specular).

    While it may not be ideal for memory, the trick is to use toggleable lights with indirectlightingscale turned to 1 in their settings (they default to 0, making it seem like global illumination doesn't work with them). These lights behave perfectly with global illumination & lightmaps, but with the added bonus of using dynamic specular via custom lighting.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    UPDATE TIME!!!
    00:08 - 27/09/2013

    http://crazyferretstudios.com/public/PhysicallyBasedLighting_v1_05.zip

    I STRONGLY RECOMMEND DELETING ALL PREVIOUS VERSIONS ENTIRELY.
    this will stop any cross over between the shader functions, and hopefully minimize any errors. there are a lot of changes under the hood in this update, so this is the best course!

    I've got good and bad news! i've managed to get IBL working the way the UE4 paper says they do, but it's WAY too intense for UDK. my rig is a beast, and it chugs so bad i had to abandon it. which means i need to figure out a better/cheaper way to do it... so here's hoping!

    until i've figured that out, the IBL is in the emissive slot, along with your emissive map.

    new features/functionality:
    four materials to blend between. each material has it's own normalmap, and albedo slot. they also have a metalness and roughness parameter. simply slot in your albedo, tell it whether that material is metal (1) or not (0), and define how rough it is with the slider. if you want additional functionality, you could put metalness in the alpha channel of the albedo, which would allow you to have more detailed materials, but you would need to swap the alpha and the parameter around in the shader. you can also adjust how much each layer tiles with a parameter, each layer can tile separately from one another.

    there is a texture slot in "Masks". this is your layer mask:
    R - black = base layer, white = second layer.
    G - black = combined first and second layer, white = third layer.
    B - black = combined first second and third layers, white = fourth layer.

    there are two "Global" map inputs:
    Global Normals - here is where you put your models unique normals.
    Roughness/Cavity/Emission - R = Roughness channel, again white is rough and black is glossy. G = Cavity, this multiplies lighting down globally, use this for very fine details you want to convey, things like cloth seams or similar. B = emission, multiplies over your albedo to give a coloured glow, there's an emissive parameter to strengthen this effect as desired.

    there is a "Cube" input. this needs to be the T-shaped cube texture. you can generate one inside UDK if you need to. currently UDK doesn't support DDS textures, so no custom mip-maps just yet =[

    enjoy!
  • supaclueless
    Options
    Online / Send Message
    supaclueless polycounter lvl 12
    Awesome job as always GIR!!!!

    Just wanna let you know real quick that the link is slightly wrongly linked

    Here is the correct URL of ur link, you accidentally added a /com instead of .com :D

    http://www.crazyferretstudios.com/public/PhysicallyBasedLighting_v1_05.zip
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Hahaha thanks man. Was really late last night. Fixed!
  • Santewi
    Options
    Offline / Send Message
    How many instructions was the shader with the IBL?

    And is the IBL included in this release?
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    it's not so much that it's a high instruction count. in fact the instruction count wasn't that much higher.

    it's the fact that it has to run a sample loop x times for every pixel the shader is rendering. where x = number of samples.
  • Santewi
    Options
    Offline / Send Message
    Ah. Were you using realtime cubemaps or something else?
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    it was a realtime sampling method. the one they said they used in the UE4 tech paper.
  • Lesswanted
    Options
    Offline / Send Message
    Lesswanted polycounter lvl 8
    almighty_gir, first of all thanks for creating and updating this post. I'm also really interested in creating a PBL workflow material in UDK.

    I've been following your post and tried every update. But I'm quite lost whit this four channel update.

    WHY?

    Seriously, why don't you use a normal RGBA one channel for layer?

    It is a pain in the ass update every texture to feet this requirements, and the point of PBL is get a more natural workflow, as long as a more realistic results.

    Mixing channels it's more than crazy. I always end up with layers mixed :(

    Anyway keep up the good work.
  • BARDLER
    Options
    Offline / Send Message
    BARDLER polycounter lvl 12
    I have some questions about getting this to work the way I need in UDK.
    Can I use a spec map to control the color of the reflections?
    Also is there any reason why I cant just plug in the maps where I need them? The masking feature is nice but is kind of creating some complications for me at the moment for what I am trying to do.
    Would it be possible to make a simplified version of the shader aswell with just the basic maps to plug in? I tried to navigate around your shader and got the Albedo and Normal to work, but I couldn't the other maps working.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Hi Bardler.

    Yes, i can change it so that you use a spec map to control reflection colour, it shouldn't be too difficult.
    Yes, you could use any maps you like to define things in the shader, if you don't want to use the mask map, just replace each output from the mask with the maps you've chosen.

    I'll try to do more work on this soon, but i've got a lot on my plate right now.


    @Lesswanted - hey man. the layers thing was just my way of trying to emulate the layers system in UE4. but it doesn't work quite as easily.
  • BARDLER
    Options
    Offline / Send Message
    BARDLER polycounter lvl 12
    It would be super awesome if you made a separate shader that just had a place to plug in albedo, spec, roughness, and metalness. I think it would make it a lot more straightforward for people to use and understand, and also be easier for people to build what they need on top of it. That is where I am at with it anyway, thanks for your time dude!
  • Stromberg90
    Options
    Offline / Send Message
    Stromberg90 polycounter lvl 11
    BARDLER: Did you make a material instance? from what I remember all the things you mention are there.
  • AlanSMitchell
    Options
    Offline / Send Message
    AlanSMitchell polycounter lvl 14
    OMG you are my hero almight_gir!
    I'm going to DL this and try it soon. This Shader looks fantastic though.
  • Randomself
    Options
    Offline / Send Message
    Randomself polycounter lvl 14
    I agree with Bardler. It's an awesome shader, but is there a way to disable materials 2 - 4? Overriding the LayerMask parameter with a different map in an instance of the shader still results in the same banding showing up.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    So, what is it you want to see done? no layer blending? or blending of a specific amount of layers? metalness or separate spec, etc.
  • FrostWolf
    Options
    Offline / Send Message
    Absolutely love this! It's awesome what you've done and thank you for putting it up here for us all to play with. Would i be alright to use a modified version of this in a personal project of mine? And also is there any particular consideration that needs to be taken with Decals with a material like this? As i assume it would look odd if say a rust decal was not utilizing a PBR system like this but was along side a metal container or something that was.

    I'm not that clued up on performance impacts in UDK with regards to Decal's, i just imagine 30+ of them in a scene with this fancy shader on them might be a cause of framerate woe's?

    Anyway, thanks again, this is awesome!
  • [Deleted User]
    Hi almighty, is this still in development? I'm wondering how closely this shader can be used alongside marmoset to produce similar results, making a more consistant workflow.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    i'm willing to develop this further, but i've asked a couple of times what things people would actually like to have in the shader, and gotten no response.

    i suppose i can do "as close to toolbag as possible", but they're using some pretty advanced wizardry for their IBL approach that i don't think i can do in UDK without source access.
  • BARDLER
    Options
    Offline / Send Message
    BARDLER polycounter lvl 12
    Spec map support :p
  • FrostWolf
    Options
    Offline / Send Message
    I agree, spec map support would be great
  • Sythen
    Options
    Offline / Send Message
    Sythen polycounter lvl 10
    Absolutely beautiful shader dude, considering the amount of development that went into this shader, have you any plans for commercial use?
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    no, none at all... i made it as much for me to learn as for others to as well.

    Just to let everyone know, for now development has stopped as i'm really busy.
  • MightyKaziu
  • Bruno Alysson
    Options
    Offline / Send Message
    Hello,

    the link is broken, it's possible to upload again ? I really need this shader ! Thanks.
  • almighty_gir
    Options
    Offline / Send Message
    almighty_gir ngon master
    Hello,

    the link is broken, it's possible to upload again ? I really need this shader ! Thanks.
    Hey!

    Unfortunately i no longer have the files for this, i'm happy to help you rebuild it if you give it a go yourself though.

    Out of curiosity, why not just use UE4?
  • Steven_Oconnell
    Options
    Offline / Send Message
    Steven_Oconnell polycounter lvl 7
    Hey!

    Unfortunately i no longer have the files for this, i'm happy to help you rebuild it if you give it a go yourself though.

    Out of curiosity, why not just use UE4?
    Actually I'm in the same boat as Bruno, I create custom content for a game called Killing Floor 2 which is a new game however it's still sitting on UE3, I've been relentlessly looking for a decent "PBR esque" shader and this is the only one I've been able to come across.
    So if your willing to help me rebuild the shader that would be great XD

    I also have a Discord server if you want to chat some more. B)
    https://discord.gg/BqTzzN6

    Edit: I also shoot you an E-Mail last night but i just saw another one of your threads where you said your inbox was exploding so my E-Mail probably got buried. XD


  • fearian
    Options
    Offline / Send Message
    fearian greentooth
    Maybe someone still has the files for this? If we bump this thread enough :)
  • Steven_Oconnell
    Options
    Offline / Send Message
    Steven_Oconnell polycounter lvl 7
    fearian said:
    Maybe someone still has the files for this? If we bump this thread enough :)

    I already rebuilt the shader on my end, I had to dump the custom nodes as they weren’t working properly in the Killing Floor 2 SDK I also got rid of the layering system and channel based greyscale maps.
    Doing that shaved off a few instructions as well.

     

    I’ve still got some adjusting to do, but everything seems to be working as intended.







13
Sign In or Register to comment.