Search Unity

Octane Lightmapping in Unity takes seconds, not hours

Discussion in 'General Discussion' started by sdutter, Oct 11, 2017.

  1. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Octane render is about 100x faster than cpu baker with Offline render quality


    We need an easy to use editor for baking workflow (i'm working to find a simple solution )


    photo_2017-10-23_12-42-11.jpg photo_2017-10-23_12-42-13.jpg
     
    OCASM and ftejada like this.
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Default
     
  3. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    is this working without combine meshes ? You have only one mesh ?
     
  4. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Current I've tested on a single mesh (combined mesh )
    Multiple meshes needs editor code to repeat steps for all mesh renderers
    Currently i'm learning light and render settings
     
  5. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Faster results, but similar quality to PLM?
     
  6. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Quality is similar to Offline renders

    Unfortunately all octane's classes are internal, so i can't access API in editor code to make workflow automatic
     
  7. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Bummer, does it bake specularity?
     
  8. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I don't know
     
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It just eliminates nearly everyone with a mac in the last few years, boot camp or otherwise... no biggie, right?
     
    AcidArrow and buttmatrix like this.
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    Last edited: Oct 24, 2017
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Looking forward to it so my artist can enjoy Otoy too on his bootcamp mac, which is a pretty decent machine. He tried it again yesterday to no joy.
     
  13. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
  14. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Create an separate material, render target and render texture for each mesh
    Then use Legacy-Lightmapped-Diffuse shader for materials and drag render texture into Lightmap Slot
    It''s simple to make an editor code to do all steps automatically, but all UnityOctane classes are internal and aren't accessible in scripts
     
    Last edited: Oct 24, 2017
    petersx likes this.
  15. OTOY

    OTOY

    Official Otoy Account

    Joined:
    Apr 2, 2017
    Posts:
    31
    Yes - position input in the baking camera is for guiding spectacular baking system. You can also use revert baking to 'bake' light probe lenses. We are shortly introducing OSL camera, which will allow you to procedurally define position, normal and more per texel in the Octane Baking system. Could be used for volume texture baking, or directional lighting etc.

    Also thank you for showing this off and providing feedback ahead of us pushing out official samples. The baking C# API is still WIP, but you will have huge control with the OSL camera system.
     
  16. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    thanks for very fast tutorial - is there's method to render once all PBR targets ? (maybe Otoy can give some advice ? )
     
  17. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    API codes is not available currently (must be done using Octane.Renderer but needs some more methods from internal classes)
     
  18. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I see, I'm sorry, I allways considered MAC as a leisure OS rather tan a production environment, not a win fanboy tho, just my background. Probably as the soft matures they'll add more platforms or some cuda emulator.
     
    lloydsummers likes this.
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Well Unity was for macs first, as I'm sure you know. So a lot of it's users have macs. I use a windows box at the moment with nvidia card. I express concerns for those who don't though, including lots of artists :)
     
  20. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    ?????Mac has been a production platform since PostScript was introduced...like last century. The OS X utility folder is loaded with high powered close to the metal dev tools. It runs on the same UNIX core that has run banks. Mind you they need to can the current CEO clown as he is not a visionary but a mere SJW functionary playing games with stock market valuations and destroying the core value of the company...it's innovation. What is your background?
     
    hippocoder likes this.
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think it's pretty hard to replace visionaries :)
     
  22. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Hey, wont start a war here. Its cool. I just matured in a win environment where scientific tools where developed for this platform, aswell as robust CAD tools etc. I saw MAC from my POV as a platform for leisure, doing artwork, music and such. Please no ofense.
     
    buttmatrix likes this.
  23. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    I don't think it's because he is a SJW, he is more like the tepid banker type like Eisner taking over Disney, which suffered the same problem (and was no SJW), or typical EA or Activision management. Visionnary manager aren't the one having the vision anyway, they just have a knack to recognize people who have one, Steve didn't made either break out or apple 2, it was Wozniak, the Mac is ideas stole from Xerox, he backed Lasseter's Pixar, and allowed Jonathan Ive to do the early crazy design of iMac and iPod. IF anything Jobs was a ruthless banker who knew to thrust Hippies' idea and penny pinch them to success. Another example is the Old president of Nintendo (who didn't play games), who had thrust another hippie who would rather play banjo than attend class, the rest is history.
     
  24. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    we can let the Mac vs Win conversation on the OTOY thread die now
     
    N00MKRAD, Adam-Bailey, QFSW and 3 others like this.
  25. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Baked


    photo_2017-10-26_15-04-06.jpg
     
    petersx likes this.
  26. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
  27. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    PLM:
    - Needs 32gb+ system RAM for large environments
    - Long bake time for Area lights and emissive materials
    - Lower path tracing quality
    - Longer bake time using cpou (cpu is limited compare to GPU upgrades)
    - Transparent and glass surfaces not supported properly
     
  28. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Right lol, these drawbacks are undesirable. Have you produced any screenshots with Octane [in Unity] that you think look as good, or better, than ones you have produced with PLM?
     
  29. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    What's the memory usage for Octane?
     
  30. Akshara

    Akshara

    Joined:
    Apr 9, 2014
    Posts:
    100
    With a single graphics card, whatever memory the gpu offers; with multiple cards, the amount of the card with the smallest memory capacity. So a single 1080Ti is 11GB, a 1080Ti with a 780Ti tops out at 3GB, while an array of twenty 1080Tis tops out at 11GB.
     
  31. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    Will scenes always fit in graphical memory? That's ultimately what I'm asking. Though I suppose it doesn't matter if it takes a few times longer when we're talking about seconds due to having less available memory. I'm just concerned about buying a graphics card only to discover that I needed more memory than I thought I did.
     
    Martin_H likes this.
  32. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Zero system memory usage because directly stored into textures and not into the ram for lightmaping preview (like Beast)
     
    N00MKRAD and TooManySugar like this.
  33. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    PLM was path tracer too ,but downgraded to lower quality and needs long bake time for area lights (and all indirect light sources)
    on the other hand Octane supports Area lights without different in noise amount and bake all indirect lights instantly with maximum quality (same as offline render quality)
    System Ram usage : 0
    GPU ram usage:
    512: 600 mb
    1024 : 700 mb
    2048 : 900 mb
    4096 : 1700 mb

    Webp.net-gifmaker (12).gif
     
    buttmatrix likes this.
  34. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Compared PLM with Octane again:
    We have two option (at least) for lightmapping :
    1. Path Tracer
    2. Direct light + diffuse illumination with maximum diffuse length(to get path tracing GI quality)

    In first option (Path tracer) bake time is same as PLM (GTX960 and 4790K) with same amount of the noise
    in second option (direct lighting + diffuse light ) we have ~3-10x more performance using octane compare to PLM because noise reducing is too fast

    So if you have a good gpu, octane is a lot better for baking, but with a good cpu PLM is better choice (and less quality + RAM usage)

    From Path tracer quality side, both are same
     
    Last edited: Oct 27, 2017
  35. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Quality comparison in a same baking time :
    GTX 960 (139$) + 4790K (380$) - You can buy faster cpu currently for 380$

    Webp.net-gifmaker (13).gif
     
    buttmatrix and hama-makoto like this.
  36. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Fast baking on 512x512 texture size


     
    petersx likes this.
  37. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    only working with legacy diffuse for now?
     
  38. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    You can add it into any shader
    Currently only bakes complete map (diffuse + GI)

    i don't know how bake only lightmap into texture
     
  39. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    You mean Albedo, right? There's no diffuse in PBR.
     
  40. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Yes
     
  41. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    I'm not concerned about system memory as that's easy enough to increase. I'm worried about graphical memory usage as your example scenes have been rather small yet the VRAM usage of one of them was close to 2GB.

    The Ryzen 5 1600X is faster than the 4790K. Cost is typically $230 USD.

    https://www.cpubenchmark.net/cpu.php?cpu=AMD+Ryzen+5+1600
    https://www.cpubenchmark.net/cpu.php?cpu=Intel+Core+i7-4790K+@+4.00GHz
    https://pcpartpicker.com/product/8hwqqs/amd-ryzen-5-1600x-36ghz-6-core-processor-yd160xbcaewof
     
  42. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Yes the only solution is that baking each one separately. Also baking textured models don't needs too high resolutions to get cleaner noise free look. we can bake on 512x512 image with fastest baking time

    I know new ryzen cpus are much faster but not from 1080ti gpus when you are using octane
    Octane has physically accurate lighting quality ( a lot easier than unity or other lightmappers). Just change sun direction and watch the result
     
  43. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    Here is the "Unite Austin 2017 - OctaneRender for Unity: Real-time Cinematic Raytracing" talk, which just became available on youtube.

    Join OTOY Co-Founder and CEO Jules Urbach as he walks through all the latest features of Octane for Unity 2017.2 and beyond. Jules will do a deep dive on key new features such as GPU light mapping and game mode support, and provide insight into exciting future additions like Open Shader Language and light field baking and streaming.

     
    julienkay, Akshara, Alverik and 2 others like this.
  44. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Nice, really promising.
    At some point, when AMD GPUs work with Octane and VRAM recommended size is announced it will be useful.
    Perhaps around February.
     
  45. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    @aliyeredon2
    hi,where can I down load and test octance with lightmap bake version?
    is that available download for public?
    still in unity 2017.1?
     
  46. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Hi

    Download installer from website, or download one of the sample projects from store and install after importing the asset from top menu (Octane->Install)
    2017.1 or above (only samples works on 2017.2 +)
     
  47. Shizola

    Shizola

    Joined:
    Jun 29, 2014
    Posts:
    475
  48. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    This is the most lightmappers problem
    Should be fixed by octane
     
    Shizola likes this.
  49. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    It does still require for backing that lighmaped mesh is all merged into a single one?
     
  50. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    my Vray test compare to Octane:
    - Vray has zero problem (bug free) without any lightmap issue
    - Too fast with proper settings
    - CPU,CUDA and OpenCL baking
    - Multiple Baking engine
    - Multiple noise filter

    Baked 10 min for House and 10 min for sphere (manually) in ~4K resolution on 4790 K)
    photo_2017-11-13_04-11-08.jpg
    photo_2017-11-13_04-11-14.jpg
    photo_2017-11-13_04-11-16.jpg
     
    Last edited: Nov 13, 2017