Search Unity

Caustics?

Discussion in 'High Definition Render Pipeline' started by laurentlavigne, Feb 19, 2020.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Any setting in transparent lit won't do caustic so my guess is not yet.
     
    MP-ul likes this.
  2. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    yes caustic mainly for unbiased raytracers, not yet realtime as big overhead.
     
    laurentlavigne likes this.
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    path tracing is not anywhere near realtime so anything worse won't impact its usage envelope which is strictly offline rendering
     
  4. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    u can fake caustic with shader like on ocean floor, but for glass where ior =1.5 not yet sir
     
  5. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Caustics are indeed not supported in the current state of Unity.
    It is fairly complex but it is not out of the question with raytracing in the future
     
    fuzzy3d likes this.
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    What kind of path tracer is implemented?
     
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    you have caustics in reflection, it seems your transmission doesn't support them, i don't how you did that
    upload_2020-2-23_22-1-52.png
     
  8. again

    again

    Joined:
    Mar 3, 2013
    Posts:
    21
  9. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    SSAO artifacts on a path tracer :rolleyes:
     
    Last edited: Feb 24, 2020
    chap-unity likes this.
  10. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    alright everybody thinks caustics only happen through transparent medium so to speed things up I'll explain
    concentration of light = caustics, the easy reminder is caustic chemical burn, like when you concentrate sun rays with a concave mirror or a magnifying glass - I know you all did it, you ant fiends!.

    upload_2020-2-24_0-25-17.png
     
  11. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    no sir unity say caustics explicitly not implement, what u seeing is rtx edge bleed, also caustic only occur with specific ior mats like glass and liquids, image u post show ior for metal
     
  12. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    that I would believe
    wrong, look at the definition of caustics in optics, it happens with anything specular
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,790
    Unity does not do reflection caustics either. It would mean calculating bounced light in a non diffuse way and currently Unity's lightmappers only bounce light in a completely diffuse way.

    What you're pointing out is just bounced light diffusely, which is not the same as reflection caustics.

    I have asked multiple times for a feature like this, since I generally use dense enough lightmaps that they could accomodate caustics, but the lightmapper team admittedly has a lot on their plate.

    But maybe one day.
     
  14. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    specular with certain ior values yes or reflection caustic, in any case answer already provided.
     
    Last edited: Feb 24, 2020
  15. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Unity path tracer implementation is unidirectional with next event estimation.
    And caustics, even on the path tracer are specifically not implemented (meaning disabled) because you would need a significant number of samples per pixel to even have a satisfying result with a unidirectional implementation.
     
  16. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Your method is the Disney paper isn't it, it also does SSS. Did you also turn that off?
    There is no need to nerf a path tracer to manage OUR render times. It is a very slow render method and those who use it know what they sign up for so, instead, add a check box, options in the hands of the user is always a better way to manage expectations.


    I think this hot spot happened because of diffuse light bouncing, like when you bring two white sheets of paper at an angle.
     
    LooperVFX likes this.
  17. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    The reason caustics are disabled is because we can't, as of right now, even with an enormous amount of samples per pixel, converge to a result without noise.
    As for SSS, it is purely not implemented yet.
     
    Bordeaux_Fox likes this.
  18. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,362
    Noise is fine, PT is already noisy and, again, let us make the decision because you're making the wrong assumption.

    Here is why you don't want to assume too much: you think I want to make images when in fact I want to design optics. Caustics allow me to see convergence in the focal plane and, by lenses, optimize the optical train of a telescope. It's that or using complicated optics software.

    Unity is into non-game usage like car or architecture where slow performances are perfectly acceptable, add optics to this port folio of non linear thinking.
     
  19. GeorgeAdamon

    GeorgeAdamon

    Joined:
    May 31, 2017
    Posts:
    48
    ebaender, PutridEx, anamate23 and 2 others like this.
  20. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    I learned Maya in 2003 and waiting a few minutes for a render (of a single frame) wasn't a big deal.. going for maximum image quality, framerate is meaningless, in fact you can be pretty sure it will look better taking 10 minutes for that frame than 30 seconds and you will pick the settings for the 10 minutes/frame. Maybe someone wants to produce a movie in Unity? Real-time rendering at photorealistic levels isn't going to happen on the average computer for ages, but the average computer could render that movie already, since it doesn't matter how long it takes per frame, it will play back at 60fps or 29.97 or whatever you specified. There's also the aspect of being able to future-proof your work.. if a user cranks the graphics settings of a game up and enables something ridiculously heavy, right now it might go down to 5fps and so what - in 10-20 years maybe it runs at 60+ like nothing, your game was one of the first games to offer the feature at all (despite only 0.1% of people able to enable it at the time) and nobody has even touched the code in 10-20 years but it looks brand new with a checkbox checked.

    Anyway ..I don't personally need raytracing or realistic caustics any time soon if ever - but my opinion is maybe something like an Experimental tab of settings, warn of serious impact on performance by enabling whatever.. maybe do what Android does (hiding the Developer menu behind tapping 10 times on the About to unlock it or whatever). So it's available instead of hidden.. but just for people looking for futuristic / experimental stuff. Totally rambling now so that's it :)
     
  21. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    Any update of Caustics implemented in unity? (using RTX I mean)
     
  22. OlavAketun

    OlavAketun

    Joined:
    Aug 4, 2021
    Posts:
    44
    Don't mean to bring this old post from the dead but it seems we have some basic form of caustics with the Path Tracer in HDRP 14.
    Playing around in the newest alpha versions shows signs of caustics. Though I don't know if it was explicitly included or simply a side-effect.

    A few limitations to consider as of right now:
    • Only applies to refractions, or at least is most visible for refractions.
    • Only works with emissive surfaces and HDRIs. You can see caustics from the sun in procedural skies, but not from the light casting sun if that makes sense.
    • No spectral rendering, caustics carries the color of the emissive source and the medium it traveled through. You won't see any sick splitting of the lightrays into seperate colours of the spectrum here... yet.
    Caustics01Noisy.jpg
    Caustics01Denoise.jpg

    I did nothing fancy with this test, simply a sphere and an emissive surface visible through a gab between two large boxes.
    Used standard unity HDRP/Lit materials.
     
    Soahr, fuzzy3d and Ruchir like this.
  23. TOES

    TOES

    Joined:
    Jun 23, 2017
    Posts:
    134
    Well said, and a whole big part of using the path tracer is to create photorealistic cut scenes. Unreal already has very good tools for this. The correct way to handle this would be to let us enable/disable these features.

    Unity will lose a lot of devs if they keep forcing limitations and reducing creative freedom. Especially when the resposne to our requests is that the problem is how we use the tool!