Search Unity

Marmoset Skyshop - Image-Based Lighting Tools [RELEASED]

Discussion in 'Assets and Asset Store' started by monkeyscience, May 31, 2013.

Thread Status:
Not open for further replies.
  1. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,038
    I'm probably pie-in-the-sky dreaming here, but is there any chance of upgrading the box-projected cubemap and Sky.Apply functionality so that you can blend between 2 cubemaps?

    What I'm thinking is that if you walk from room to room, the lighting is going to change rather abruptly on whatever is moving, and I'd like to make it more subtle.

    It's possible I just missed a feature there somewhere, though. :) You *did* implement rather a lot of them lately. :)
     
  2. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    Greeeeaaaatttt! Thank You Monkeyscience! Importiiing NOW!

    First thing I'm going to see is the skin shader. It's a shame cician still didn't finish his pre-integrated skin shader for skyshop. AFAIK he encountered many problems with the light probes. But I will ask him to continue on it anyway, having more choice for the skin doesn't hurt, especially if it runs in Unity3 and mobile ;). Still maybe time to drop the price tho.. we knew You will make the skin shader at some point.

    Second to see is the looong awaited box projection for skies! Finally skyBOX steps inside!
     
  3. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Blending is not in yet :(, sorry. It's waiting on spherical harmonics to be workable so I have to blend between two cubemaps, not 4 >_<.
     
  4. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You are right! This seems like a Unity bug. I bet they force-disable mip-mapping for higher quality renders but this breaks mipmapped gloss. I will report it.
     
  5. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,038
    I don't think anyone thinks you're slacking. You've put a lot of work into this last release, and as I said, blending was a dream. I'm glad to hear it's on the wishlist already.
     
  6. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Sorry, missed this comment first time around :-(. Please let me know if this is still an issue with Skyshop 1.05, as it introduced a lot of little fixes for Unity 4.3.0.
     
  7. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    I'm playing around with the latest release, took me a hell of time to import, lol.
    Skin shader looks really promising. There is a bug in Unity 4.2.2 (on which I'm testing right now) probably regarding fullforward shadows. Same bug we had with pre-integrated skin shader. When you put more than one light with shadows (especially directional) all the scene renders broken. Nothing to complain on skin shader itself, just pointing out that it's useless in Unity 4.2 unless you turn off fullforward shadows (which we don't want). I will try it later in 4.3 to confirm if that is the actual cause.
    There is one more thing, the skin looks a bit darker than all other IBL materials I would love to have some possibility to change it's IBL strength.
    Would it be possible to implement such function in skin material the way we can crank up or lower the IBL level?
    The skin usually is hard to set up even in ray-tracing offline renderers figures for realtime, so usually artist have to spend quite the amount of time for make it look right in a certain environment, which doesn't mean it will look correctly in another one. So more settings we have than better.

    For dimensional skyboxes, it's great and will help to switch sky on the fly when character enters a room or something.
    I'm still looking forward for having in the future the possibility to have more skies at the time and blend them :) That would (will?) be pure awesomeness.

    Yaaayy making prefabs from sky works perfectly, now I can make some ready to use skies and switch them on an instant!

    Thanks for all the work You put in it. I'm looking forward for new stuff :)
    Oh, and excuse me for my crappy English..
     
  8. djweinbaum

    djweinbaum

    Joined:
    Nov 3, 2013
    Posts:
    523
    Count me in for another who is extremely interested in blending between cube maps for night/day or weather. You guys are doing an amazing job. Congrats on building something easy to use and state of the art.
     
  9. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Hello monkeyscience,

    Any chance you will be releasing a shader that utilizes substance pbr?
     
  10. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Is this a Substance 4 thing that just came out? I will have to check it out.
     
  11. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    The skin shader does take some steps to conserve energy, if light is scattering out the back of a surface, the front will be dimmer, etc. I'll take another look at the math. I would like it to work without the need for too many exposure hacks, the whole goal of PBR math is to get one set of material properties to look good in any lighting environment.
     
  12. wensk

    wensk

    Joined:
    Aug 9, 2012
    Posts:
    24
    Hi, I use unity 4.31f1 and skyshop 1.05, after baking the lightmap, run the game, the unity will stop and can't do anything. It's a bug?
     
  13. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,038
    Substance 4 introduced physically based shader support, yeah. I'd also love to have Skyshop support that, though I have no actual plans to use it yet.
     
  14. MoHoe

    MoHoe

    Joined:
    Nov 5, 2012
    Posts:
    566
    Yep it's a new Substance 4 feature

    You might want to look at Jove free shader . it's the only Physical based shader I got working with Physical substances.

    Note, You need to put the roughness into the defuse alpha channel.
     
    Last edited: Dec 6, 2013
  15. dzodzu

    dzodzu

    Joined:
    Nov 25, 2012
    Posts:
    46
    Yeah, I know what You mean, it would be nice to have it working correctly in every environment.

    Regarding fullforward shadows bug, I tried it in Unity 4.3 and it works fine.
     
  16. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    Just trying the beta skin shader on ios iPhone 5 and it seems really slow. I'm assuming that's because it's primarily a desktop shader. Any ideas or plans for mobile use?
     
  17. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yeah, it's mainly slow because of all the extra texture look-ups. It also pulls unity's spherical harmonics from the vertex program to the fragment side. Definitely room for improvement in a couple of areas and it is feasible to get the skin shader running on mobile.

    I'm working on putting together a skin demo for you guys as well, showing off proper content and such.
     
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    Will all of this work in Unity 4.3 free?
     
  19. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Render to Cubemaps is still a Unity Pro features unfortunately. Everything else, including spherical harmonics, will work in Free.
     
  20. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    Thanks for the confirm. Thought as much. look forward to any improvements you can implement. Until then I'll just use a combination of your other amazing shaders :)
     
  21. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    159
    Could you explain what those new shaders do exactly?
    What's their typical usage and how do we use them properly?
     
  22. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    A quick video of how to set up the Box Projection shaders would be great.
     
  23. SeanM3D

    SeanM3D

    Joined:
    Jul 24, 2013
    Posts:
    192
    Hi MonkeyScience,

    not sure why you often overlook my questions. :( Anyhow, it would be great if you could reply this time:

    - Are the Skyshop shader physically based? I.e. do they conserve energy as most important marker of physically based rendering?

    - Which specular reflection model do they use?

    - Is Skyshop, including the preprocessing, a pure GPU implementation? Or what part is using the CPU?

    - Does the preprocessing/convolution step use raytracing or doesn't it have anything do to with raytracing?

    - What exactely is being done more or is being done less if you change the "Quality" setting? Does it control the resolution of the convolved cube map?

    - What does "Convolution size" do?

    - Do you use a phong lobe for convolving the specular IBL maps?

    - What do the texels of the convolved maps exactely represent? Is it an irradiance value for texels in the diffuse map and an outgoing radiance value for texels in the specular map?

    I would really appreciate your support. I know these questions are probably not highest priority as compared to bug reports, but for me personally you would help me as much with answering these questions as fixing a bug I stumbled upon.

    Thank you very much!

    Sean
     
  24. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Sent you a long-winded PM just the other day ;-). Check under the "Notifications" tab up above.
     
  25. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,559
    Hi Monkey Science.

    I have tried new SH diffuse lighting shader but it comes out really dark, or almost completely black. Did I miss some process or is it supposed to just work out of the box like?

    I am thinking it is because I am not using HDR , but LDR... does SH lighting work with LDR? if not, how would I go about modifying it to work in LDR?

    And does SH calculation depends on all 3 cubemaps? (ie, do I need all of them? or if I don't have some of them, what happens?)
     
  26. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Been gathering tutorial content to show off all the new shader goodness. I've got all the screenshots together and tomorrow I'll post a full write-up of the skin shader.

    Meanwhile, there is a new file in the "Documentation" folder of the actual Skyshop package: Beta.txt. It covers the new shaders and parameters extensively.

    And now, a teaser:

    Art kindly provided by Peter Zoppi - http://www.zopfx.com
     
  27. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    SH computation is a little hacky at the moment and happens in the Sky Inspector when a sky is selected. To force it to happen on all skies in the scene, use the Edit -> Skyshop -> Refresh Skies feature (ctrl+shift+R).

    It should work on both LDR and HDR skies and look reasonably close to cubemap based diffuse. It can be derived from any of the cubemaps in the Sky. First it tries specular cube, and if that's missing, it tries the diffuse cube, and finally it tries computing from the skybox itself.

    There is also a confirmed bug with the skin shader, it will render things darker than it should, at about 75% intensity. The other SH shaders are not affected by this.
     
  28. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Oh dear ... skin shader on its throne of awesomeness.Thanks again for bringing Marmoset Toolbag into Unity.
     
  29. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,559
    Monkey science.. i think you should try sh lighting with ldr again. So far it doesnt work well for me. Hdr works fine. I could be wrong but i think i found a little bug. If you absoultly think ldr is working i will send you a small scene that you can take a look at. Let me know. Cheers.
     
  30. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Hei MS,

    can you share with us how skyshop shader approch BRDF? :)

    I take a look to Framebunker shaders and they optimize BRDF on mobile using a cook-tollerarnce with a LUT.

    Thanks
     
    Last edited: Dec 9, 2013
  31. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    Nice looking skin there man... I am looking forward to using the next version of this package... gonna hold off on doing characters for right now and search for techniques for interior lighting...
     
  32. SeanM3D

    SeanM3D

    Joined:
    Jul 24, 2013
    Posts:
    192
    Oh ok, sorry didn't see that! Thanks! :) I just sent you a reply. Can you have a look at it?
     
  33. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You are right! It looks like LDR input is rendered way too dark, or the SH computed from it is way too dark. Bug! Thanks for the report.

    As a work-around: you can compute HDR cubemaps from LDR input, so if you have some old sky probes around and they're LDR, compute HDR cubes from them anyway and it seems to fix the problem.
     
  34. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    Hey Monkeyscience,

    Do you think you could do an overview on the HDR captures?
     
  35. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,559
    Will do. Always glad to help.
     
  36. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    hi monkeyscience,

    may i know what is contain in the examples.rar shown in the asset store? also is the script used in the demo be available in the examples.rar too?
     
  37. Knil

    Knil

    Joined:
    Nov 13, 2013
    Posts:
    49
    I'm not having luck swapping between different skies during run-time using SetActive(), it stays stuck on whatever was the first sky even though I see them disabling and enabling properly. Is there some other magic to getting this working? I'd destroy and spawn them with prefabs but they get wonky as a prefab.
     
    Last edited: Dec 10, 2013
  38. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    It contains 4 fairly primitive example scenes:
    Moped Demo - The demo of a spinning blue moped on a pedestal
    Moped Probed - The same moped but with a gray material spinning between red and green walls, illustrating render to texture and box projection
    Occlusion Demo - Illustrates the various forms of occlusion maps, vertex colors, and vertex occlusion a material can have
    Terrain Demo - A large terrain mesh with textures generated in World Machine, illustrating the Marmoset advanced terrain materials as well as trees and grass set up with Marmoset shaders

    The zip also includes 4 sample skies, source images as dwell as the computed cubemaps and prefabs of sky objects you can drop into any scene.
     
  39. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You have to call .Apply() on the sky you want to enabled, and it will bind to the shader system and disable the previous sky on its own.

    Prefabs should be fixed as of 1.05, are you still seeing problems?
     
  40. Tzabbur

    Tzabbur

    Joined:
    Dec 10, 2013
    Posts:
    4
    Hello, maybe this is a noob question but does anyone can tell me why when i´m trying to bake a scene with IBL Light Emit Light option, with the difuse option checked, in the GI calculation step of the process (and only in this part) is using only one thread instead of the eight it uses on the rest of the process?. It only happends in this exact configuration.
    Thank you very much.
     
  41. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    In lightmap extended, the default options for CPU threads is set to automatic. You can change this, but i recommend leaving this at default especially while testing your lighting., can you post your settings for lightmap extended?
     
  42. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,559
    Talking about baking , what is good value for env multiplier when i bake using ibl. I tried 3-4 and it seems ok but it always leaves me this feeling of, "is this correct?"
     
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    I tend to leave this at 2, especially if you have a lot of bright surfaces... When there is too much ibl, it washes out my detail, especially with bloom enabled. For GI, a setting of two is sufficient...and for ibl 2 is good. Also, if you go that high, turn the diffuse sky lighting to 0. And also lower your directional light to something really low, like .15. The downside, if you have characters with lighter skin, you will have to turn down the diffuse color (still don't know why that is in the shader honestly), which multiples the base texture. Kinda saves you from darkening the texture itself in Photoshop.
     
  44. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,559
    In other words, lots of fiddling per individual cases. ;)
     
  45. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    in so many words, yes. I'm planning a new tutorial for Skyshop and beast
     
  46. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    thanks but for the 2nd question, the demo posted on the maromset website is the demo, im looking for, i mean just the script where the turntable is paused when user is obiting, pan zoom...
     
  47. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I'm afraid that specific demo or script is not in the example pack. The MopedDemo.cs script is very similar however, and the sky picking is done using the SkySwab.cs script, both of which are included. The camera orbiting, zooming, and panning are part of the FreeCamera.cs, also in the examples.
     
    Last edited: Dec 11, 2013
  48. Seikan1

    Seikan1

    Joined:
    Jul 8, 2013
    Posts:
    49
    Hi monkeyscience,

    I have a question about skin shader. Yesterday i have tested Toolbag 2 and i am very happy with the result. Any chance to bring that tech to Skyshop?
     
  49. Knil

    Knil

    Joined:
    Nov 13, 2013
    Posts:
    49
    Yeah prefabs seem to be working fine, I hadn't tried them since the newest version. Instantiating the skies seems to work well enough.

    I'm still getting these memory leaks though.

    Cleaning up leaked objects in scene since no game object, component or manager is referencing them Material Internal IBL Skybox has been leaked 2 times.

    It's getting so bad that I have to build my Sky then save and restart Unity or else I'll crash it with a memory leak when trying to play the game in the editor (ram usage gets over 3 gigs). I'm on unity 4.3.1.

    Edit: Not trying to bitch this is a great product, thanks for the great support :)
     
    Last edited: Dec 11, 2013
  50. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    Hey Monkeyscience, I just moved to Unity 4.3 and I am looking for the new stuff... I updated my copy of Skyshop, and I don't see the new shaders... am I missing something?
     
Thread Status:
Not open for further replies.
unityunity