Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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. DrewMedina

    DrewMedina

    Joined:
    Apr 1, 2013
    Posts:
    418
    I'm using DX11 and it works great... Just wish there was a detail shader! Is it possible for someone with no shader experience to cut and paste a detail normal pass?
     
  2. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Crisis averted! Bring on the pretty

    I have no idea how to help there though, sorry!
     
  3. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458

    Good to know :)
     
  4. Deleted User

    Deleted User

    Guest

    +1 for the parallax and detail shaders!


    And we really really need more video tutorials! Skyshop is such a fantastic asset, and it would be great to know how to truly master it. I'm sure you, monkeyscience, have so many awesome tricks up your sleeve that we are longing for to know. :) It's really a pity how few video tutorials there are at the moment. It doesn't do Skyshop justice.
    I'm especially interested in advanced workflows like the aforementioned scenario where indoor and outdoor are visible at the same time. Elaborating on box projection and efficient use of per object cubemaps is highly welcomed, too! :)

    Thanks!
     
  5. Beardbotnik

    Beardbotnik

    Joined:
    Jul 27, 2013
    Posts:
    49
    Any idea how much longer this will be on sale? I won't be able to get it until next week and it would be horrible to miss out :(
     
  6. Woodlauncher

    Woodlauncher

    Joined:
    Nov 23, 2012
    Posts:
    173
    https://www.assetstore.unity3d.com/#/sale

    5 Days.
     
  7. Beardbotnik

    Beardbotnik

    Joined:
    Jul 27, 2013
    Posts:
    49
    Hopefully I can manage to get it before then. After reading through this thread I feel like it's features fit perfectly with my needs for my current project. I guess if I miss it I'll just have to bit the bullet and pay more though.
     
  8. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    DX11 works great! :)

    If you do find DX11 bugs, please post screenshots and details, I will look into them.
     
  9. mcteapot

    mcteapot

    Joined:
    Aug 26, 2013
    Posts:
    7
    This might seem like a silly question, but is this scene included in the Examples folder of the Marmoset Skyshop unity package?
    $shaderballs.PNG
     
  10. Deleted User

    Deleted User

    Guest

    Hi monkeyscience,

    sorry I'm completely new to scripting. Can you tell me exactely how to go about assigning a Sky only to specific objects? Say I have two skies in the scene:

    - Sky_Sun which has typical daylight cubemaps
    - Sky_Room which, as the same suggests, has cubemaps which show the interior of a room

    Sky_Sun is supposed to light the majority of all scene obects. Sun_Room should be applied only to specific objects right away from the start, i.e. without hitting some collider first. Among these objects is the gameobject "room_walls".
    What would be the syntax to apply Sun_Room to room_walls right from the start and where would I place the code, i.e. in which script file and in which section (Update, Start etc.?) of it?

    Extending this, what would be an elegant way to assign the Sun_Room sky to more than just one object?

    Thanks a lot!! :)

    Sean
     
  11. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    In addition to whatever monkeyscience adds, I would recommend working through some scripting tutorials to get a good understanding of how scripting in Unity works. Without that, the answer wont even make any scene. I've been writing code for some time and setting up the multiple skys was a challenge. Enough so that I couldn't confidently explain it. It's a feature he's been working on, something many people want, and i'm sure there will be a clear workflow sooner or later.

    I did start to put together the steps, more so I could ask if that was the best way of doing it. I'll get back to it and post it if I can.
     
  12. jxxxxst

    jxxxxst

    Joined:
    Nov 3, 2012
    Posts:
    50
    Is there any quick way to have the specular sharpness of the vertex-lit shader controlled by a slider instead of the distance to the mesh ?

    Trying to wrap my head around cg, but I'm not getting far.
     
  13. Deleted User

    Deleted User

    Guest


    I should have been more precise. I am new to scripting in terms of the scripting that I did practically. But I already watched/read plenty of tutorials about C# scripting in Unity. I also have some basic knowledge in C# programming outside of Unity. I'm quite confident I can follow along as long as you guys don't come up with some complex solution.
     
  14. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Dear Monkey,

    I have another doubt. What kind of HDR image skyshop support?

    just Panorama?

    Vertical/Horizontal Cross - Mirrored Ball is supported?

    Thanks
     
  15. BradHerman

    BradHerman

    Joined:
    Jan 10, 2013
    Posts:
    21
    I saw a few older posts asking this question, however they where several versions of skyshop back.

    What is the current best practice for transitioning between different Lighting environments?

    For example being inside a house, perhaps with the new box shader, then walking outside into a full daylight scene.

    I know that I can set the static object to use the "correct" sky. However for my moving objects, such as main character, I'm still looking for the best methods.

    I saw that I could use a trigger to change the sky being used, however I would expect that to be a pretty hard cut.

    Is there anyway to have a soft region?

    I believe the old thread mentioned you could use vertex occlusion for the inside areas, is that still a recommended workflow.

    Is it possible or practical to calculate 3 or 4 skys along a path and transition between them?

    Thank you.
    -Brad
     
  16. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,291
    Hi

    I would like to ask if all or some of the assets found in the demo scenes can be used for a commercial product. Especially the tree and bark texture in the wilderness scene.

    Also is there a way to use my old Unity skies properly ? When i try to make a cubemap file out of them, and put it as sky, the sky gets all blurry for some reason

    Thanks
     
  17. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Make your two skies and set Sky_Sun to "Auto-Apply", this will be your default, global sky. Set Sky_Room to not "Auto-Apply", we're going to apply this to things manually.

    Now make a script and apply it to every object that could potentially be in the room:
    Code (csharp):
    1.  
    2.  
    3. public mset.Sky skyRoom = null;
    4.  
    5. void Start()
    6. {  
    7.    //hook these up manually through the inspector or use GameObject.Find here
    8.    GameObject go;
    9.    go = GameObject.Find("Sky_Room");
    10.    if( go != null ) skyRoom = go.GetComponent<mset.Sky>();
    11. }
    12.  
    13. bool IsInRoom()
    14. {
    15.    //write this function ... somehow
    16. }
    17.  
    18. void Update()
    19. {
    20.    if( IsInRoom() )
    21.    {
    22.       skyRoom.Apply( this.renderer );  
    23.    }
    24.    else
    25.    {
    26.       skyRoom.UnApply( this.renderer );
    27.    }
    28. }
    29.  
    Alternately, if you want to do this with the physics triggers as the Skyshop scripting documentation describes, here's a way to do it every frame instead of waiting for an on-enter trigger:

    Create a new script and add it to the room sky GameObject:
    Code (csharp):
    1.  
    2. public mset.Sky sky = null;
    3.  
    4. void Start()
    5. {
    6.    //hook this up yourself or let the script search for it
    7.    sky = this.GetComponent<mset.Sky>();
    8. }
    9.  
    10. void OnTriggerStay(Collider other)
    11. {
    12.    if( other.renderer != null ) sky.Apply( other.renderer );
    13. }
    14.  
    15. //Note: this function is already defined in the mset.Sky class, but here's what it looks like:
    16. void OnTriggerExit(Collider other)
    17. {
    18.    if( other.renderer != null ) sky.UnApply( other.renderer );
    19. }
    20.  
     
  18. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Vertex-lit shaders do not support mipmapped gloss currently. What you are seeing is distance-based mipmapping picking blurrier reflections. I think I'm going to fix this in the next version, or at least make a #define option for it.

    Meanwhile, if you are willing to getting your hands dirty, open Marmoset/Shader/MarmosetVertex.cginc and replace these lines:

    Code (csharp):
    1.  
    2. half3 spec = specCubeLookup(_SpecCubeIBL, IN.skyRefl);
    3. albedo.a *= 0.125*_Shininess;
    4.  
    with just this one:
    Code (csharp):
    1.  
    2. half3 spec = glossCubeLookup(_SpecCubeIBL, IN.skyRefl, exp2(8.0 - _Shininess) );
    3.  
    NOTE: This will not work on some platforms that do not support mipmap selection (Android, for example).
    You may also have to add a #pragma target 3.0 to the vertex lit shaders:
    Marmoset Vertex Lit Specular.shader
    Marmoset Vertex Lit Specular Occ.shader
    Marmoset Vertex Lit Specular Vertex Occ.shader
     
  19. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Skyshop has support for panoramas, horizontal crosses and cubemaps as input. No vertical crosses or mirrored balls yet, sorry.
     
  20. goldencruz

    goldencruz

    Joined:
    Oct 2, 2013
    Posts:
    94
    has anyone use this with unistorm just curious
     
  21. Deleted User

    Deleted User

    Guest

    Great, thanks a lot monkeyscience. Since I want to apply the room sky at every frame to specific objects I am only interested in the latter solution for now.

    Do I still have to apply this script:

    Code (csharp):
    1.     public mset.Sky skyRoom = null;
    2.      
    3.     void Start()
    4.     {  
    5.        //hook these up manually through the inspector or use GameObject.Find here
    6.        GameObject go;
    7.        go = GameObject.Find("Sky_Room");
    8.        if( go != null ) skyRoom = go.GetComponent<mset.Sky>();
    9.     }
    10.      
    11.     bool IsInRoom()
    12.     {
    13.        //write this function ... somehow
    14.     }
    15.      
    16.     void Update()
    17.     {
    18.        if( IsInRoom() )
    19.        {
    20.           skyRoom.Apply( this.renderer );  
    21.        }
    22.        else
    23.        {
    24.           skyRoom.UnApply( this.renderer );
    25.        }
    26.     }
    to all the objects that should be lit by the room sky? Any modifiation there?
    Otherwise I wouldn't quite understand how only the other variable of OnTriggerStay(Collider other) method would contain the set of objects that I want to be affected by the room sky.
     
    Last edited by a moderator: Feb 12, 2014
  22. Deleted User

    Deleted User

    Guest

    Another thing, monkeyscience:

    I think the Occlusion channel doesn't work as expected, because even with a very high contrast AO map I get too weak occlusion. For testing purposes I even filled the AO map with total black and still didn't get a fully occluded diffuse and specular ambient light.
    I know that multiplying against HDR values can easily make even dark and high contrast AO maps hardly perceivable, but this shouldn't be the case with complete black.

    Did I find a bug? Or can you shed some light on what the Occlusion channel is exactely doing?


    Sean
     
  23. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    100
  24. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,780
    On my new windows machine the following works just fine.

    On an Intel 4000 based machine the marmoset tree shaders display white images instead of the trees leaves.

    $Marmoset-Shader-Issue.jpg

    If I swap the marmoset tree shaders out for unity tree shaders it works just fine. You can see a combination of both in the embedded image.

    There is no issue with framerate - just the shader output.
     
  25. Deleted User

    Deleted User

    Guest

    Quick question, how do you stop the panoramic conversion stretching? It looks like the clouds for example have been stretched out, so they don't look correct and makes the skybox blurry.
     
    Last edited by a moderator: Feb 13, 2014
  26. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    Thought I'd share a few "target" screenshots of Skyshop working more as ambient light in a night scene. We use a dynamic light system (Time of day) so no lightmapping is happening. I am still searching for the perfect night sky Hdr image as the one I am using now isn't very good quality(its hidden too).

    Skin shader with a base skin texture on the test model. Few substances with bumped specular on the building. Night sky comes from the Time of Day plugin. Diffuse intensity and Specular intensity are turned down to match lighting. Images are a bit darker than actual gameplay (stupid fraps).



     
  27. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Heya Monkey,
    I was wondering if there is plans to support sending non-hdr images to beast lightmapper extended.

    Another tool was just announced today that will let you use non-hdr images to do beast lightmapper, http://forum.unity3d.com/threads/228353-ZF-Skylight-announced!

    The issue ive found is there are not too many "hdr" skys that dont have objects in them, and the small selection of them are $100 for a 10, or $20 a peice. Without the ability to try samples of those types.

    So im in a situation where i can only afford the cheap sky packs that are non-hdr.

    It would seem that if that product could do it, then marmoset should be able to send the ones that are non-hdr over to beast lightmapping extended optionally/automatically.

    Thanks.
     
  28. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You can use non-HDR images as the Skyshop Input Panorama, just uncheck the "HDR" checkbox in the bottom left corner of the slot. You can also send these non HDR images to Beast in the same manner. Once your scene has the Beast config files, you can click the "GI" button above the Input Panorama slot, and Skyshop will send your LDR image to Beast for baking.
     
  29. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Looking good! The blurry backgrounds can be generated by means of a hack:

    1) In the Skyshop tab, drag your skybox cubemap into the specular output slot.
    2) In the Advanced Options roll-out, uncheck "Build Specular Mip Chain"
    3) Set a very high "Specular Exponent", 1024 or 4096
    4) Compute

    Now the specular computation generates a somewhat blurry skybox for you. You may also have to lower the "Baked Exposure" multiplier considerably. The computation tends to get overly bright and out of control at extreme exponents like 4096.
     
  30. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    This looks like a bug :-(. I'll take a look at it and see what I can find.
     
  31. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    When using latitude/longitude panoramas as inputs, make sure your image is about twice as wide as it is tall, this will minimize pixel distortion.

    Also make sure it is a *full* panorama, meaning the sky, the horizon, and the ground should all be present. Many online sources provide hemispherical panoramas where the ground has been clipped entirely. These images should be edited to have as much empty space for the ground as there is sky. Leave the ground black if you don't have anything better to paste in there. That's the equivalent of a hemispherical light not illuminating from underneath.

     
  32. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Hmmm, seems to be working for me with a black and white test texture. Couple of things to keep in mind when working with AO:

    1) Occlusion only occludes ambient light, dynamic lights are only occluded by dynamic shadows.
    2) Occlusion maps use UV1 texture coordinates which have to be exported from your modeling app, and can get overwritten by Unity's lightmap UV generator if you have that option selected on your model asset.
    3) If you don't have any dynamic lights in your scene, Unity likes to add a default, "built-in" one. There's a little light icon at the top of the editor viewport to turn this off.
    4) Make sure you don't have a uniform ambient color being added to your scene. Set Edit->Render Settings->Ambient Light to black
     
  33. Deleted User

    Deleted User

    Guest

    Makes perfect sense, the last thing I want to cover is the shaders. Firstly the terrain shaders look awesome, the only thing I've noticed is some of the shaders (Bump diffuse IBL) tend to wash out color bases and in some scenario's don't seem entirely effective with point lights and shadows when used in conjunction with the panoramic IBL sky, so far I've messed around with the likes of the camera exposure and intensities (I suppose I can tweak more to see what effect's it brings). Now is there a quick setting to modify this? Or do the shaders need a bit of tweaking? I'm fine either way, but anything that saves time.

    I'll show you two examples (Most people probably won't be able to tell :))

    Appreciate your help.

    Our shaders at the top / Marmoset below.
     

    Attached Files:

    Last edited by a moderator: Feb 17, 2014
  34. wsz

    wsz

    Joined:
    Oct 20, 2012
    Posts:
    19
    All the time when I reopen my Unity Project and the scene using the Skyshop, i have to reconfigure the Sky Object. I set Diffuse Intensity to 2.0 and when i reopen its 1.0. Why?
     
  35. Deleted User

    Deleted User

    Guest

    Bump :) Monkeyscience?
     
  36. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Thats exactly what happens to my models that have over 1k polygons, using any of the shaders in mobile es2.

    the whitening of the entire object when any light is touching it.
     
  37. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Thanks, wow i didnt realise there was a second step. thank you monkey
     
  38. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,291
    Hi

    I am trying to create a sky from a 4096x3072 image (tif format, compressed in instactor/importer) and when i assign it in Skyshop, it constantly shows the loading icon and is non responsive, whatever i may press it does not respond.

    I have done nothing other than uncheck the HDR box after puting an image in the select box and is like doing something in the background before i have pressed anything else, which is very strange

    After about half hour i managed to press the new SKYBOX cubemap button, it still works, but is very slow because does something in the background

    Also when i create a sky from a non HDR image, should i uncheck the HDR box in the cubmaps before calculation ?

    And can we use the assets that come with Skyshop for a commercial product (skies etc) ?

    Thanks
     
    Last edited: Feb 18, 2014
  39. Jing777

    Jing777

    Joined:
    Jan 30, 2014
    Posts:
    9
    Can I use matcap shaders/materials in Marmoset? And if so, how? I just want to make a shape look realistically metallic or wood, etc. I bought Marmoset. I want nothing fancy right now, just real. And can I use/convert VRay or other type of shader/materials in Marmoset?
     
  40. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Unity said they wanted to do use Mental Ray materials in the future, but nothing about VRAY materials unfortunately. guess well have to wait and see.
     
  41. Jing777

    Jing777

    Joined:
    Jan 30, 2014
    Posts:
    9
    Do you know what can be used with Marmoset? I see that they have Toolbag but that creates from scratch. I'm looking for a library of pre made materials/shaders.
     
  42. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    Can this tool generate a texture based on a unity based skybox (ie, render skybox to HDR to use for lighting scenes)? I would love to have a feature like this!
     
    Last edited: Feb 19, 2014
  43. Acrimiens

    Acrimiens

    Joined:
    Dec 17, 2012
    Posts:
    2
    Hi:
    We are interested in buy your product, but we don't know if we can use (the materials) tbmat exported in toolbag 2 in this unity plugin, can it do it?
    Thanks for your time.
     
  44. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    well you would need panoramic skybox textures, you know a single picture "panoramic" texture skyboxes. but they do light the scene, and can be used to bake the lighting too, ive been at it 12 hours a day for the last 3 days baking, its very amazing stuff.
     
  45. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    Well you can use rust, that has many premade materials that are realistic, doesnt yet work for opengl es2 and they dont really tell you how to get it working with es3. but for desktop dx9 and 11 and opengl it appears to work good, and theirs a demo that lets you enable a marmoset skyshop skybox with skyshop reflections. as an option. its pretty impressive when you combine the 2.

    and that does have the materials for you soemthing like 50 materials, metals, wood...ect but it costs good money jing77 thats the price you gotta pay for having everything premade for you. If you search through these forum posts, they tell you some of the toolbag examples of how to use "specular" and fresnel to make your objects look like real objects, you gotta look for it, its like a grid of all of those values, i dont knwo which post it was sorry.
     
  46. Jing777

    Jing777

    Joined:
    Jan 30, 2014
    Posts:
    9
    Thanks for the info. Yeah, that was great about VRay. That library was free with tons of great matcaps. Really smart of them, creating a depository that all their users could upload to and create a great resource for everyone.

    Couldn't find "rust" that you referred to. But maybe it looks like I'm going to have to go the self-taught route. Just seems like a big undertaking to just get a simple effect.

    I think I read that Marmoset doesn't work with Unity shaders so you have to use Marmoset's stuff. Does that mean I have to buy Toolbag?

    Hey Monkeyscience, can you give me any advice? Thanks.
     
    Last edited: Feb 20, 2014
  47. Uncasid

    Uncasid

    Joined:
    Oct 5, 2012
    Posts:
    193
    I am using space for unity, I would like to be able to generate a skybox off of something I set up in scene. Space for unity is not a static image.
     
  48. OneShotGG

    OneShotGG

    Joined:
    Nov 16, 2012
    Posts:
    225
    I have kind of a theory question pertaining to Skyshop's current status and the future.

    From what I understand the beta skin shader uses spherical harmonics and the nature shaders do not. Is this why I am getting lighting differences between those two? This is particularly visible in dark night scenes when trees are almost black in shadow and the character is still perfectly visible (the same ambient lighting from skyshop seems to be effecting trees and the skin shader differently).

    In the future will all shaders use spherical harmonics? Or am I wrong in how this problem is occuring?

    The reason I ask this is because I just picked up alloy and they are only integrating skyshop sh because they claim that is the direction yall are heading.

    Thanks
     
  49. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    It looks like IBL is adding ambient light into corners and lightening up your shadows. This would also make the effect of direct lights less intense.

    If your scene is lightmapped, you can adjust how much IBL contributes to lightmapped surfaces with the "Lightmapped Diffuse/Specular Multiplier" sliders of the Sky.

    You could also use ambient occlusion maps or vertex occlusion to occlude the IBL contribution in dark corners, indoors, etc. to maintain shadow contrast.
     
  50. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Is your sky an instance of a prefab? Changes to those get reset when you open a scene or exit play mode. At least skies do, I hope this is standard Unity behavior...

    Select your sky and try using "Game Object->Apply Changes to Prefab" or "Break Prefab Instance".
     
Thread Status:
Not open for further replies.