Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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

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

  1. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    ups, the docs are older than the shader.
    i turned back to unity’s original tree shading in the end – as it was just too much work to handle the billboarding.
    so shininess is shininess and gloss is gloss.
    you will have to darken your gloss map and leave the shininess slider on the left side i guess.
    sorry,

    lars
     
  2. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Ah well that makes sense then. :) I guess I'll just try to tweak the shininess to somewhere in the middle where they're not washed out but the highlights aren't too sparkly.
     
  3. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    It occurs to me that using the Autumn pack is kind of making the problem worse too. If a tree has brown dead leaves, I expect them to not be shiny at all... they should be rough and have no highlights. But the Shininess slider only gives me the option of shiny or washed out with a giant highlight. I don't think it's Lux's fault; the same problem exists with the built in Unity leaf shader. Even a completely black glossiness map doesn't really help. With green leaves the shininess seems a little more normal.
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    well, a completely black gloss map will kill the specular hightlights:
    half spec = pow (dotNH, s.Specular * 128.0) * s.Gloss;

    so if s.Gloss = 0 = black --> spec = 0;

    have you checked the combined "trans (b) gloss (a)" map?
    it might have to bypass srgb sampling too (in case you use linear).

    lars
     
  5. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Would it be better to use the current version of AFS then, rather than Unity's or Lux's shaders (Even with oncoming update)?

    And in other news, i think i've got the Oren Nayar diffuse working a lot better, i was doing things in the wrong order, it's now separate from specular calculations. It looks very nice, i can say that
     
  6. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,524
    Yes. I am using the lux terrain shader for the material. It works fine. The error still fills the console though.
     
    Last edited: May 11, 2014
  7. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Thanks for the reply. :cool:
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    nope, lux is state of the art i would say: definitely better than the built in shaders, skyshop or current AFS as fas as linear color space is concerned. not to mention ibl...
    but the upcoming version of AFS will have even more enhances as far as linear lighting is concerned.
    so just go with lux for the moment and upgrade to AFS 3 when it is done.

    pictures, please!

    lars
     
  9. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    For some magical reason the black gloss map is working now.. maybe i left fog turned on last time I was messing with it. But yes! Now my trees look like I expect them to. Setting everything except diffuse to bypass sRGB and having a black gloss map looks good. I am using Linear lighting and HDR with a high intensity sun light. Maybe I will try setting some of the greener leaf textures to have a non-black gloss map but for now I'm satisfied with them not having any specular highlights.
     
  10. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    At the moment only forward seems reliable, and it wasn't particularly hard to implement, although gratifying to see work. There's probably a million things wrong with it and could be improved but you'd have to advise on that because i only slightly know what i'm doing. Getting something 'changing something' and getting it consistent with forward in deferred are two very different things! Works fine rendered as forward but as that messes up perfomance gains in a scene using the effect in deferred it seems pretty important to get right. And i don't know how to pass a _Roughness parameter into internal prepass at all and i don't know which value i could multiply it with of the options left in LightingLuxDirect_PrePass.

    EDIT: answered my own questions and gave up on the last it would look rather inconsistent otherwise.
     
    Last edited: May 11, 2014
  11. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I suppose additionally i noticed what seemed to be a similar idea to Oren Nayar going on in the Cook Torrance implementation (Smith's geometric shadowing), should both be employed? As I have it the diffuse/albedo is affected by the ON and the spec affected by the geometric shadowing part of the Cook Torrance implementation entirely separately and composed at the end
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    hi lazygunn,

    roughness is already passed to the prepass lighting shader – so there is no need to do it a 2nd time ;-)
    it is written to nspec.a, but it is smoothness so you might have to use 1 - nspec.a.
    and a lot of calculation you need for oren nayar are already done by cook torrance so you can save some instructions if you couple both.
    look for: float alpha = (1 - nspec.a); // alpha is roughness

    lars
     
  13. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Ahh yep i figured that out eventually, i'm slowly getting there
     
  14. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    It's also worth adding i haven't added the BRDF to the ambient lighting, which i guess i should do. At the moment i've got all the calculations in the lighting, should it be feasible to do much of this in the surface function and pass it on? Would mean not doing things twice with the ibl

    Now I seem to have things fine in deferred and forward stopped working! It may be that i use slightly differing calculations between deferred and forward as the internal prepass seems to require I figure out the surface properties inside it whereas in forward i have the surface properties but the internal prepass code doesn't seem very effective

    I'm also definitely repeating things unnecessarily but i'm not not sure how different the output of

    half cos_nl = saturate(dot(s.Normal, lightDir);

    is to

    float dotNL = max (0, dot(s.Normal, lightDir));

    and even the difference between the two NdotV and dotNV.
     
  15. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    I have no idea if this is frowned on or not but i've forked the Lux repo (I dont know about the rules regarding this) with the intention of continuing the Oren Nayar work until it's at least good looking on both rendering paths and plays nicely with with all the different setting. My initial impressions after finally getting it working are extremely good, it looks very pretty, what I thought was a loss of illumination seemed more to be the shape of rough surfaces becoming more defined, there's a significant filling out of the shading and the suggestion of dust when observed at lower angles

    Ive had a lot of different results behind controlling the 'modulating' of the roughness - the roughness that is also used as the gloss in spec can be attached to a very neat set of already computed values, specifically spec/nspec.a(in deferred) after they've had some deal of processing (Generally after the settings for SpecularPower and spec have been set), its a dramatic change but you can go to completely arid dry to intensely glistening with a range slider, it's hacky but the most convincing thing of that type i've seen and would, in fact, be extremely useful for my project - so far i've found other ways to drive the roughness a bit for Oren Nayar but they're very subtle - although that said, the ON result is for my eyes very pretty and particular, much less washed out than before it seems, sustains highlights etc (I get a similar effect with Cook Torrance where the shiny-friendy Blinn-Phong becomes a much more subtle and realistic thing in CT. As soon as I get it working in a stable consistent manner across the various combinations of settings and the more useful (to me) existing shaders i'll get a demo put up.

    The addition of ON is much less of an art-style choice than the choice between cook-torrance and bling-phong, those two seem miles apart. The ON is more of a fancy upgrade to your diffuse, which I think would usually be nicely complimentary to either specular BRDF. Now just thinking of re-adding that slider for getting that range of parched-to-soaking effect, its shading stays within the confines of the principles of PBR i'm quite sure (Might be wrong) but it's an incredibly useful art tool i think too - somewhat like a wetness/moisture parameter i guess

    Well, i'm probably looking at trying to sneak in one more single channel map, to drive the roughness for the ON, bit more variation across the surface in diffuse roughness and could be used to mask the wetness/dampness setting. Maybe I am going a little overboard aha, but there's so many options. If the map about is seen to be getting out of hand, i'm wondering if using the blue channel of the normal maps could be used for this, or do something crazy like using derivative normal maps

    If Botanika doesnt mind i'd like to implement work done with the box correction, im assuming it was them who did the thing a good few pages back. I'm basically looking at a system that will automatically assign dynamic objects a relevant environment as it reaches a new zone and blends reasonably quickly, if i'm being ignorant and your work has this covered, Botanika, then bless you.

    I noticed in your video the environment maps convolved extremely quicky, did you pause during or is that how fast the Lux probes are? If they're that fast I think something can be done about throwing them at directcompute, but much more ideally, at OpenCL as it supports a massive range of cards and works on a lot of platforms. I'm not really clever enough for that kind of faffing with maths and compute shaders but i know a man who could be.

    While I don't want people to really look at my fork just yet, it's a shambles, it probably wont be long until i'm asking for advice and people to look and tell me the million things im doing wrongly, in fact just fixing up yourself might be easier as i'm hopeless, you'll just get the basic idea. I'll get some pictures and a demo before all that however, might validate the whole thing, and motivate you to look!
     
    Last edited: May 11, 2014
  16. Botanika

    Botanika

    Joined:
    Nov 2, 2013
    Posts:
    60
    this looks strange indeed, the reflections look inverted, have you tryed inverting the Probe size ? (something like (1,2.25,4) to (-1,-2.25,-4)

    I'm curious to see how Lux and Candela work together, this scene was meant te be part of an environment pack for the asset store, but as there is a lot of stuff that need to be made or changed before the actual product completion, I'll just make the current stat of the project available for everyone to test. I'll try to strip out the unnecessary stuffs in the project folder, and upload it overnight, cuz my upload speed is just too low, and when I'm uploading I cant do anything with my internet.

    I used 64 Cubemaps, they convolve in like 3 secs, 128 cubemaps take around 12 sec, and 256 cubemaps take 1200 sec.
    but unless you have a large super smooth surface to cover, 64 or 128 are enough.

    As for cubemaps blending for dynamic objects, I found this very detailed article by Sebastian Lagade : http://seblagarde.wordpress.com/201...ng-approaches-and-parallax-corrected-cubemap/

    I was trying to implement something like this in my project, but cant seem to find an elegant solution, without a lot of code being run in the update functions, witch should be impractical if there is a lot of dynamic objects in the scene. I'll keep looking for a solution within my limited programing skills. ofc, If any of you guys managed to implement it, I'll be happy to test it.
     
  17. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    My programming skills are very poor but i'll take a look at that link and see what I make of it! I'm going to get some rest soon, been up too long, but when i get back up i think i'll be making a playground with the michael o pack he's just had on sale, and a few other bits and bobs, naturally replacing all the shaders with my own Oren Nayar version. Ive got it working successfully and reasonably consistently across rendering paths. Deferred seems to already have a very pronounced fresnel bright falloff which is rather different to forward.. i think forward looks possibly the more realistic but deferred is much prettier, so i got a sequence of images to show the deferred version of my Oren Nayar implementation, as it looks prettier and works more conveniently, of BP and CT mixed with the Oren Nayer. I'm probably doing it wrong but i already see improvements, small details are more defined, along with curvature as it seems to reproduce the effect of occlusion well, it looks especially nice with Cook-Torrance for the spec i think

    The forward version lets you tamper with the roughness amount with a slider per material which is nice, pity i cant figure a way of getting that into deferred

    here's a big wide pic (click on it if you have to), sorry it's my frogman again, he's been a mainstay of my graphical fooling this year. you may not notice a difference and i might be all excited over nothing and i'm not at all sure this is the best way to go about showing it all off but i should be able to have a navigable environment available soon in a webplayer, so you can run around as frogman or one of his cohorts (i have a frogman cohort ready already shes looks great, just needs a ton of texture work). The pics are made from Lux Bump Spec and Lux Translucency for frog skin which were obviously tampered with.

    $LuxPic.png
     
  18. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
  19. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    The included textures were probably created w/ the default Unity shaders in mind. You'll likely need to modify them to get the desired effect using any other shaders. Lux would look great once you tweak them a little, as would many others.
     
  20. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Hello, I've just found the box projection environment probe feature of Lux. Very nice!
    But, I've run into an issue when using it.
    I've set up the environment probe, baked out my cubemaps, and have them assigned to my Lux setup script. I also have the floor which uses it assigned to the environment probe. It all looks perfect in the scene view. Then, the moment I hit play, the box projection gets completely screwed up (in both game view and scene view). I stop playing, it goes back to looking perfect.
    Anything I could be missing?
     
  21. OneWayRoad

    OneWayRoad

    Joined:
    Jul 27, 2013
    Posts:
    26
    hey lars what will be the next update for your cool shaders?:D
     
  22. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Lazygunn: i don't mind the frogman, dude. any test model should do for a lux contribution. (well, except for a cube, that's too boring!) I would happily use a creature i found sitting on my HDD. Anyway, nice pics! I don't however see the difference between them...

    @PhobicGunner: does it do this when you run a build? that is a weird issue BTW...

    @ZJP: I would go Lux Bumped Spec, or the Skin shader for those. Not sure otherwise though!
     
    Last edited: May 12, 2014
  23. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    ZJP lux bumped spec would be fine for those, if you broke them into 2 materials the translucent shader can be cool for alien looking bits

    Quills, i can see the difference but i guess i know what i'l looking for, you only really understand the differences between blinn-phong and cook-torrance after you've flipped back and forth a bunch

    Its shown off badly there though, today's mission is make a good environment for things to play in - Michael O will come to the rescue (And some other guys)

    niosop is right however, you may need to tweak some textures and create others to get the full set for the shaders

    free programs like xNormal can be great, Knald is 99 dollars i think but kicks arse for getting those textures quickly. Spec and roghness/gloss textures can come down to a lot of hand-authoring however
     
    Last edited: May 12, 2014
  24. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    @FuzzyQuills @lazygunn
    Thanks for the reply. :cool:
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    hi there,
    the version from the asset store is not up to date and does not handle static batching which probably ruins the box projection.
    the latest version from the repo fixes all this and is much more flixible.
    you will have to replace the – well, get all files from the repo, replace the existing lux folder and reimport it while you go out for a litle walk ;-) takes about 30 min or so i guess.

    lars
     
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    @ lazygunn:

    thanks for the pictures!
    but i have to admit: i do not see that much difference either – accept from the lowered fresnel reflections on the shoes and the jeans when using oren nayar?! that seems to pretty weird as oren nayar replaces diffuse lambert lighting...
    so is it correct and worth making lighting double as expensive?

    cubemap convolution
    it takes around 4 seconds to convolve a diffuse and specular cubemap (64x64) on my 5 years old mac book pro and nearly a minute if i raise the resolution up to 128x128 for the specular probe. not real time at all but fast enough to lay out a scene in the editor i think.
    and especially as i have watched a video about geomeric’s enlighten and unity 5 (cube maps are processed on the cpu if i get them right) i would not worry about finding an open cl solution. things will just turn out well i hope.

    lars
     
  27. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @ZJP: You're welcome! And Lazygunn's suggestion sounds cool! I wouldn't mind seeing a glow-in-the-dark worm... :)
    ...Or that Spider's red bits GLOWING ON FIRE!!!

    EDIT: THat gave me the inspiration i needed. onto a GLOWING Chinese Dragon!

    @Lazygunn: I do know the difference between Lux Cook-torrence and Blinn-Phong: On my podracer model, the highlights are pretty bright on blinn-phong and are toned down on cook-torrence. Oren-nayar would be too tempting...
     
    Last edited: May 14, 2014
  28. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    @LazyGunn : which part of the frog that use ON?? i can't see it @.@
     
  29. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Same here. i did notice a very tiny difference, but it isn't obvious to the average person...
     
  30. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Exactly - I don't think Oren Nayer really matters at all just yet. Most PBS papers you see for games will mention that the visual difference isn't enough for the added cost.
     
  31. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Showing it on the frog guy isnt the best example and it's hard to tell straight up what changed, in some ways you can go 'stuff just got darker'. That's not really exactly what it does however and the best example i can give in those pics is looking at the frogs belly. The ON is of course part of the diffuse calculation and in this case a different BRDF is combined with it for the specular. ON seems to keep the absolute highlights but both gives shape to what would be very flatly shaded surfaces, especially as surfaces curve away from the view angle, the fresnel effect from specular increases reflection but the Oren-Nayar simulates light being increasingly less reflected back to you as a surface based on a microfacet model starts to occlude itself, which is somewhat counter to a specular fresnel but without such an obvious falloff, there is a good deal more definition around parts that are viewed at low angles where the surface starts to become perpendicular to the view direction, eyelids and such being examples. The last two are the most obvious with the frog model, the belly and curved surfaces are much more refined than lambert shading which shades things very 'blandly' - This is how I understood it anyway. Still it was a bad way to show it off

    At least it shows how good Lux's translucency shader is! (@Quills, translucent materials simulate subsurface scattering which is where light is seen to be passing into a surface a certain amount to extinction, i think you meant self-illuminated for shining things, but that said they could be combined possibly)

    I have the ON as a global switch now, just like the CT and BP, it works in forward and deferred more or less equivalently and just like CT and BP its a profound decision to make regarding your art. I might be applying it wrongly, examples show it to be applied to the attenuation, which i've done, and it makes a difference that is sensible to me, but im no expert so cant be sure, perhaps i can say 'it looks different in a way i like'

    I've been using it and cook torrence in deferred for the recreation of the demo scene in michael o's apocalypse model pack, generally replacing shaders in materials with my own ON-tweaked versions of lux shaders, its being an interesting experience, one of the most profound aspects being that if you want realism, then 'less is more'. The shading that is most convincing is the most subtly different, and to my eyes when ON is enabled the scene becomes a little less bright but already builds on an incredibly realistic impression able to be reached by Lux as it stands - it does make game graphics significantly more tangible and realistic, but with that you realise that things tend to look rather homogenous under realistic outdoor lighting conditions, no ultra-contrast, saturation and suchlike to give an image some gamey presence, just good ole real-looking things.

    I'm not going to be that surprised if people don't care for the effect of ON, it's an art decision. I've not noticed it make any significant impact whatsoever on my performance though but it is quite a particular look, just like Cook-Torrance and Blinn-Phong will have to be chosen early on-ish as they are pretty different and will affect how you author all your art. At least all of these can be turned on or off at will and are supported in all rendering paths (as far as i can tell)

    I'm hoping to have something like a webplayer soonish that will allow people to look at and explore the scene and switch between BRDF to see how they affect different things, and hopefully a good set of skies to switch up (Been making these over the night) and maybe even possibly attempt to properly partition the whole demo level into areas for accurate box correction (it's very large and outdoors), so i can learn as much as possible as i move stuff back into my main project

    This has been a very good thing for learning, Lux is a goldmine for an education in shader writing and keeping to the surface shader paradigm has definitely made the shaders easier to repurpose and understand. Now I just want to make something that grinds the rules of this approach into my brain, especially spec and gloss map creation, and hopefully give a good showcase for Lux as well as other things I may as well integrate, including an ON-augmented RTP

    @Phobic - the only production i've seen noting the use of Oren-Nayar for rough surfaces is Ryse by Crytek who said they used it for their diffuse BRDF just switching to Lambert on very smooth surfaces. It was this that got me off my behind to actually do something id thought about for ages, im sure Crytek did a much smarter job than I did but they obviously felt it was worthwhile. Watching videos of the upcoming MGS game has me convinced they're using similar trickery as their arid environments are very convincing. From what I can tell, other than the 'stuff gets a bit darker'-ness of it (I think the getting darker is my fault, in fact), it's a very subtle effect which really can make something look much more convincing nethertheless. That might just be me convincing myself however since i went to all the effort of implementing it.

    When it's a bit more shipshape i'll make it available if anyone wants it, but it does include further modifications to the Internal Prepass shader
     
  32. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    That's interesting, hey don't get us wrong it's not that we don't like ON, it's just mostly people are curious about it i guess. And if you really do planning to make it available for public and it works great in Lux (try ask Lars help for this :) and maybe you can also push it into LUX git ) that would be really great, more lighting model for us to play since it was something we dream of in unity rather than sticking with BP :)
     
  33. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
    I rank them as 4, 2, 1, 3 if your original order is 1, 2, 3, 4 but I only have a small picture, clicking does not open a new page with the regular size image for me.
     
  34. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,182
  35. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    edit: lengthy ramble alert

    They weren't really 'ranked', just different combinations of lighting/shading models, its a pity you can't full size the image and i should have provided a much larger image to look at anyways - under the same lighting conditions where the tone range could be considered acceptable for all 4 combinations there, i found cook torrance with oren nayar the nicest, with CT giving nice realistic specular reflections (bling-phong is over shiny, but this is an art decision, it's not empirical measurement of quality) and ON giving a lot of shape and definition to a surface, particularly at angles where a rough surface would self-occlude but also be illuminated by 'internal bouncing' much more - a frog guy is hardly an ideal example for a rough diffuse surface but i bodged it just to show. Hopefully the differences can be more apparent and explicable when i have a full environment on show with perhaps some better idea of performance in a full scene - hoping to have aforementioned demo sorted at some point, i should know better than to make promises though, esp as my inet just got turned off without warning cause of a bill i wasnt told i hadnt paid and vue is taking forever to render the skies at the quality i want, pesky vue. One day.

    I also should make a point of distinguishing between deferred and forward rendering, deferred is pretty limited in some ways when it comes to this sort of thing atm, Unity 5 may change this, and i think Lux will reposition itself effectively after Unity 5 has settled - Unity 5 might in fact be a huge blessing to Lux, providing some nice tools to make Lux even more effective

    @rea, as far as i can tell it's all working fine in forward and deferred, although i have it as a global setting in both paths when i think technically it could be per material in forward, lars would definitely have to look at it because i can say its working fine but that might just be 'it seems to be doing something new i can control', it could definitely be programmed more gracefully and at the moment the problem with multi compile permutations becomes further worsened the more options in lighting models become available. It could definitely do with some tidying, probably needs some fundamental change to its application as i do think the darkening is too much, something i'll look at when i next get up but may need help with, crytek's optimisation of switching to lambert on smooth surfaces should definitely go in there (or the brightness of the ON shaders made more equivalent to the other Lux lambert based shaders), atm in oren-nayar shaders there's specific controls i 'borrowed' from the lux detail shader (that i love) to tune the roughness, but i'll link to the github repo when i think it's ok to be looked at, while anticipating disaster as critique at my feeble programming hurts my feelings a lot aha

    If lars wants to take a look he's welcome, he might conclude 'this just makes stuff darker', although i don't really have it down as that - in terms of cost in instructions, its a LOT cheaper than the specular BRDFs as far as I can tell, with half the calculation already available/able to be repurposable in the spec (im just a bit of a newbie as to how to make things fit) and the second half just 4 or 5 lines with the traditionally expensive operations associated with oren-nayar replaced with functional equivalents. Really would need a more knowledgable second pair of eyes to go through it, implement it more correctly and perhaps give a more objective judgement as to its relevance to Lux right now (Although something of its type seems a logical addition at some point)

    sorry for all the rambling

    also @goat, thats a nice breakdown - from Lux, the translucent shader would be great for the snail-things body, to keep it to the same drawcall you can just paint the transmission texture by hand to be black on non-translucent surfaces. Stuff like the Oren Nayar model is around in general for things like a matte rough look, but keeping to current Lux, with appropriately created maps you could get what you described all entirely with the regular lux bump-spec. It's a wonderfully versatile shader once you get the hang of creating specular and roughness/gloss maps.
     
  36. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Also those who cant see close up, did you try right click and 'view image', in firefox anyways, then you can left click the new image to get full size. I think the best places to pick up the definition being gained is seen on the left (his left) trouser leg and belly, with additional definition at sillouttes around the face
     
  37. Dhialub

    Dhialub

    Joined:
    Nov 11, 2013
    Posts:
    41
    I'd like to try out physic based shading, but I can't import the package. It always stops at bumped specular metalness shader. I've 8 gigs of ram, 1 G video ram, and six-core cpu, so i don't think low performance lies behind this. Also, I've downloaded the package twice, but nothing changes. Can anybody help me?

    //sorry for my english, I'm hungarian//

    UPDATE: It just started working. Can't figure out what was the problem.
     
    Last edited: May 15, 2014
  38. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    It takes a REALLY long time to import because of Unity's shader compilation system. Future versions of Unity should help reduce the import time dramatically with an improved shader compiler (only compiles shaders for a given platform at build time IIRC)
     
  39. Dhialub

    Dhialub

    Joined:
    Nov 11, 2013
    Posts:
    41
    Last edited: May 15, 2014
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    hi chanhy,

    i am sorry. and the only way i can think of right now is to et the package from the github repo and importing it shader by shader.
    just let me assure that it DOES import and it DOES compile – even on much weaker platforms.

    lars
     
  41. Eriks-indesign

    Eriks-indesign

    Joined:
    Aug 15, 2012
    Posts:
    50
    Anyone have an idea why this is happening for me with the box projection shader? I have a Macbook pro retina Geforce 650m.
    $ktf9Xc6.png
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    do you use the latest version of the scripts and shaders from the repo?
    does not look so as you still have got those doubled handles...


    lars
     
  43. Dhialub

    Dhialub

    Joined:
    Nov 11, 2013
    Posts:
    41
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
  45. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Eriks.indesign: It looks like you tried to use the "RenderToCubemap" checkbox! This happened to me, and unticking it fixed my problem! This is because it appears that internally, RenderToCubemap uses RenderTextures, which are obviously pro-only! (you can tell, it's all garbled in unity free!)
     
  46. Dhialub

    Dhialub

    Joined:
    Nov 11, 2013
    Posts:
    41
    Ohh, thanks :)
     
  47. squared55

    squared55

    Joined:
    Aug 28, 2012
    Posts:
    1,818
    I found a major bug - playing a compiled .exe version of the game results in crippling frame rates if I use the box projected shaders. Any solutions?
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,856
    hi there,

    i can not confirm this.
    i had a look at the box projected shader and the env probe script, checked it in the editor using the profiler and created an exe: everything runs smoothly.
    so i wonder what is going there.
    any further information you can provide?

    lars
     
  49. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    This is probably a dumb question, but what is everyone using to get the textures they need for PBS? dDO and nDO, or something else?.. Do you have to use the mesh to get the proper textures? If your buying assets, how would a person go about getting the PBS textures we need for this to work? Havne't seen to many tut's on this info, and since I am completely new to the idea, I would love to learn.

    Thanks
     
  50. ludiares

    ludiares

    Joined:
    Jul 14, 2011
    Posts:
    242
    You can make them yourself, even in Gimp. Of course, getting real world data from Quixel's Megascans would be the best, but you can get the approximate values for everything by doing a little search on Google, and then paint them in Photoshop/Gimp/Paint.net, or import them into Blender/Max/Maya, add some filters and variations and bake the result.

    Oh, and no, you don't need the mesh to get the correct textures, nor to display them correctly. In fact, I'm working on a set of PBR materials that can be reusable for any mesh