Search Unity

Lux-an-open-source-physically-based-shading-framework

Discussion in 'Assets and Asset Store' started by larsbertram1, Mar 19, 2014.

  1. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    I agree. Super impressive! :)
     
  2. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Might be the best looking thing I've seen in Unity, period. Cant wait to see more!
     
    Sterner likes this.
  3. mfitzpatrick-1

    mfitzpatrick-1

    Joined:
    Oct 8, 2013
    Posts:
    31
    Hello, is Lux support for Unity 2017.1. I installed Lux and shader is currently pink. Thank you.
     
    Been_Maya likes this.
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it should work with 2017... you may check the github repo though.
     
  5. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello lars there is problem in unity 2017.1 materials are pink and thera are exceptions upload_2017-9-11_21-18-6.png
     
    Been_Maya likes this.
  6. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    I'm also using your ultra color map, and foliage shaders, when your plugins will be tested by you on unity 2017.1 ?
     
  7. Been_Maya

    Been_Maya

    Joined:
    Aug 12, 2017
    Posts:
    20
    Can anybody tell me the difference between the free version of Lux and the paid one?
     
  8. Been_Maya

    Been_Maya

    Joined:
    Aug 12, 2017
    Posts:
    20
    When I start the free version in Unity 2017.2.0b11, I get 73 errors. Does anybody know if the paid version works with this version of Unity?
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    the main features are the same. only difference:
    lux plus renders translucent, anisotropic and skin lighting in deferred – personal only supports standard lighting in deferred. all other lighting functions would be added using forward rendering on top.
     
    Been_Maya likes this.
  10. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i just tested the free version in 2017.1.0f3 – where it works fine (0 errors). i haven't tested it with 2017.2b – and will not do: no more beta testing.
     
    Been_Maya likes this.
  11. Been_Maya

    Been_Maya

    Joined:
    Aug 12, 2017
    Posts:
    20
    I tested it with the free version in 2017.1.1f1, and I even got 123 errors. :-(
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it seems as if you downloaded a wrong version from the assets tore?
     
  13. CoderGirlEx

    CoderGirlEx

    Joined:
    Sep 1, 2017
    Posts:
    9
    For the skin shader: Will you support Transmission maps as Knald generates them?
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    they are already supported.
     
    CoderGirlEx likes this.
  15. CoderGirlEx

    CoderGirlEx

    Joined:
    Sep 1, 2017
    Posts:
    9
    I'm trying to create a combined Translucency/Occlusion map as your.
    I stumbled over the following questions.
    Can you help?
    I'm just trying to automate the process and write a script that will automatically combine these images for me, but I don't really know yet what I should do. That's how these questions arose.
     

    Attached Files:

  16. CoderGirlEx

    CoderGirlEx

    Joined:
    Sep 1, 2017
    Posts:
    9
    Another question:


    You said that Knald transmission is already supported.
    Therefore I compared your transluceny map with my Knald transmission map.
    They look really different in aspects of contrast.
    Do I have to do anything here? I was hoping I could just drop in the Knald transmission map into the G channel.
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    just adjust the contrast. that should be all.

    photoshop does not show the alpha channel by default. it is part of the file of course even if it is unchecked and will get exported.
    you have to manually activate the alpha channel to get a preview of it. it will be overlayed using a color you may specify (ususally red). if you only activate alpha and deactivate rgb alpha will be shown as grayscale image.
    i hope that helps.
     
  18. CoderGirlEx

    CoderGirlEx

    Joined:
    Sep 1, 2017
    Posts:
    9
    May I ask you one more question from a programmer's aspect? When for example in the Trans / Occ map a channel isn't checked in Photoshop, like the R channel, is it filled with black?
    Still trying to evaluate what I need to do to create this combined image programmatically.

    Also, are the 2 images converted to grayscale so that they fit into one channel? I guess so.
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    no, it is filled with the color which exist in the channel. unchecking channels in photoshop only toggles their visibility for the current preview in photoshop. the actual data will remain the same. so if red is fully filed with white, but red is deactivated in photoshop, the final file written to disc will still have white in the red channel.
     
    CoderGirlEx likes this.
  20. CoderGirlEx

    CoderGirlEx

    Joined:
    Sep 1, 2017
    Posts:
    9
    What are the rules for the transmission map? You said that Lux supports transmision already.
    So I'm having a perfect transmission map which doesn't look like what Lux expects.
    If I insert it as it is, the results aren't life-like.
    I could change the contrast so that it looks a bit like yours, but that would falsify the transmission map.
    Can't you make it so that Lux accepts the Knald transmission map as it is?
    I've spoken to the developer, and he's the hell of an accurate guy, so I think his maps are the closest to physically correct as we can get.
     

    Attached Files:

  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    lux supports transmission.
    your transmission map has to be combined with the occlusion map – so of course you can not simply take the one that knald outputs. next to that it simply looks a bit too bright.
    the rules for transmission maps: the calculated trans light gets multiplied by the value from the map.

    no way. that would simply be a waste of textures and samples.
     
  22. CoderGirlEx

    CoderGirlEx

    Joined:
    Sep 1, 2017
    Posts:
    9
    That's not what I meant.
    I'm talking about the combined image. I'm asking that Lux should accept the Knald transmission map (of course in combination with the AO) without any tweaking. You said "Just lower the contrast", but that would falsify the transmission map.
    You say "It just looks too bright".
    Compared to what?
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    compared to what i know as transmission map.
     
  24. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    Transmission map are just an artistic hack to represent the amount of lighting going through a thickness of a solid, it's not a proper simulation of the real thing. There is no real right way to do it with Lux, he just follow standard. Thrust your artistic eyes with an understanding of what's simulated.

    For what I understand, knald take into account teh whole volume, typical transmission map is a hack that only take account the proximity of polygon. For example, the hood in knald would be darker in the inside because there is the head blocking light from the other side, meanwhile typical thickness map just an inverse mesh AO, they capture the interior of the volume but not the contribution of blocking mesh from the outside. Ultimately it depend on what you want to achieve. Transmission in the human body tend to have various material blocking light in a volumetric way, transmission won't capture correctly the blocking of light done by bone in the finger for example, but they wor reasonably well for the ears and and nose, along with small grazing fold on the surface of the skin. I would say look for reference and adjust/correct according to the limitation, in the end just make an pretty image that look reasonably realistic or whatever artistic target you have.
     
  25. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Hello Haver a wuestion is there
    GPU instancing avaliable for lux shader? Or it will be avliable?
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    since unity 5.6? you can simply activate it per material.
     
  27. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    I'm using unity 5.6.3 and lux shader 2.02 In standard unity material there is gpu instancing but I cant see it in lux material .

    This is lux
    Przechwytywanie.JPG

    And this is standard unity shader.
    Przechwytywanie2.JPG
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    oh, i meant the custom surface shaders. the lux standard shaders actually have not supported instancing – until now :)
    you may grab the modified files from the github repo:
    https://github.com/larsbertram69/Lux-2.02-Personal
     
  29. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    On github I see lux 2.02 I already have this version from asset store, Is it different on github? :)
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    yes. on github you will find version 2.02.1
     
  31. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
  32. vtentomms

    vtentomms

    Joined:
    Aug 28, 2014
    Posts:
    6
    there are no Tree shader in Lux? (for TreeCreator of SpeedTree)
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    no, you will find proper tree creator shaders in my advanced foliage shader package (as i can't give everything away for free :) ). and there are no speedtree shaders as speedtrees need some work (and a speedtree modeler license) to be lit properly.
     
  34. vtentomms

    vtentomms

    Joined:
    Aug 28, 2014
    Posts:
    6
    https://www.assetstore.unity3d.com/en/#!/content/68907
    Is that asset what you say?
    Is that asset possible snow blending?(Dynamic Weather)
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
  36. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    luxsetup.png luxpro1.png luxsetup.png luxpro1.png luxsetup.png luxpro1.png I just purchased Lux Pro because I wanted the translucent skin shader, and when I load the Skin Demo as usual, I get the following strange skin tones. I changed the settings to Deferred, and I deleted DX9. Apart from that, I didn't do anything, I just started the scene.
    Using the free Lux version, it doesn't look that strange.
    Can you advise?
    Unity 2017.1.1f1 Personal 64 bit.
    Lux Pro 2.02
     
    Last edited: Oct 12, 2017
  37. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    have you applied the custom deferred shaders?
     
  38. vtentomms

    vtentomms

    Joined:
    Aug 28, 2014
    Posts:
    6
    OK~ Thanks~
     
  39. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    I didn't because the custom shader slot was already occupied by another custom shader.
    Now that I used your custom shaders, the strange skin tone is gone.

    2 problems:
    1)
    No matter which light I use, I just can't get the ear to appear translucent:
    notrans1.png Do you see what I might be missing?

    2) As I explained, the custom shader slots were already occupied with other custom shaders. In my case, these were CTI/Internal-DeferredShading and CTI/Internal-DeferredReflections from Baldinoboy's Tropical Forest.

    How should I handle this?
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    go with lux as it should handle cti tarnslucency as well :)

    as far as the missing translucency on the ear is concerned – i have no idea...
    have you assigned and set up the lux lighting script?
    does the skin shader have a proper translucency texture assigned? is it imported properly? (you should most likely uncheck sRGB texture in the import settings).
     
  41. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    1) When I use the Lux translucency shaders instead of Baldino's CTI, so much of the nice translucency is lost. Can you explain that?
    I have recorded a video here:

    Please have a look at the leaf on the left border. In the beginning of the video I point on it with a yellow circle.
    You can see how the translucency of the leaf changes.
    baldino lux1.png

    2) I checked all the settings in the Lux Pro Skin Demo scene, and the sRGB for the Trans/AO map was already off.
    I played with the Lux Lighting script, but it didn't help.
    Can you perhaps provide a working sample? This would really be nice, also because paying customers could perhaps expect it and because it will help others.
     
    Last edited: Oct 13, 2017
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    well, i guess i have forgotten to update the cti shaders...

    in "CTI_TranslucentLighting.cginnc" find:
    outSpecSmoothness = half4(s.Specular.r, 1.0, s.Translucency, s.Smoothness);
    the value 1.0 defines the view dependency and 1.0 is rather high. try to lower it to smething like 0.6 or 0.5.
     
  43. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i just downloaded lux plus 2.02 from the asset store and checked the "Lux custom surface shaders" scene:
    Bildschirmfoto 2017-10-13 um 15.29.30.png
     
    OfficialHermie likes this.
  44. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Changing the value 1.0 doesn't seem to do anything. luxprobug.png
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    strange... i will have to test it myself then.
     
  46. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Ok, please note that I'm using Lux Pro (latest version from Asset Store).
     
  47. OfficialHermie

    OfficialHermie

    Joined:
    Oct 12, 2012
    Posts:
    585
    Do you already have any news how to make it work?
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i gave it a try – and it simply works (tested in unity 2017.1 using lux plus 2.02):

    translucency_power.gif

    using a power of 0.3 "widens" the translucent parts – compared to 0.8. so you may think of it as the old view dependency slider in the tree creator shaders.

    depending on which cti shader you actually use you have to make sure that outnormal is written like this in the lighting function as well:
    outNormal = half4(s.Normal * 0.5 + 0.5, 0.66);
     
    Alverik likes this.
  49. DaIndieTeam

    DaIndieTeam

    Joined:
    Aug 27, 2017
    Posts:
    7
    I would like to ask if you think your Skin Shader is superior to the Volund Skin Shader, and if yes, in which way.
    I'm a newbie at Skin Shading so I'd really appreciate a reply.
    Thank you.
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    does the blacksmith demo ship with a dedicated skin shader? it offers twinkle maps as far as i know – but no skin lighting.
    so i would propose to simply get the lux personal package a have a look at the skin shader yourself.