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

    Psychon

    Joined:
    Mar 11, 2014
    Posts:
    17
    Hi monkeyscience,

    I just upgraded to the latest skyshop update and I'm having issues using the sky probe to bake out a new cubemap. I'll use the probe direct method and I'll see skyshop start the process of rendering the cubemap but once it reaches 100% it will crash unity without fail. I reinstalled the tool multiple times to make sure it wasn't a bad instal and even tried it on one of unity's default projects incase it was an issue with mine and I keep experience the same results. I'm not on the latest version of unity, I believe I'm one 4.4, any idea what could be going on?
     
  2. Tyrathect

    Tyrathect

    Joined:
    Jul 10, 2012
    Posts:
    38
    Hi Monkeyscience,

    I just upgraded to 1.1, and am having issues with direct lighting of the terrain.

    If I use a direct light and turn on shadows, I lose all direct lighting on the terrain.

    The terrain is not marked as a shadow caster.

    In the following screen shots, I've turned down the Sky/Master Intensity to zero, so there's no ambient light from the skybox. I'm using the Marmoset/Terrain/Terrain Specular IBL shader with a global normal map, and all the specular sliders turned down to zero. The terrain has 8 textures on it, so there's an add pass going on.


    Here's an image of the scene with the direct light set to "no shadows":
    prop1.jpg


    And here is the same scene with the light's Shadow Type turned to "Soft Shadows" (that's the only difference):
    prop2.JPG

    finally, this is the same scene with soft shadows, but using the default unity diffuse shader:
    prop3.jpg
     
  3. dhiraj2444

    dhiraj2444

    Joined:
    Sep 19, 2014
    Posts:
    2
    hi after using sheders and after creating build for ios the objects turns into black it is not giving chrome effects and others

    can someone help me.
     
  4. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Hi,

    i have some questions.... does skyshop is supported in ps4? my studio is considering of getting it... but we want to know whether it supports for consoles..

    also is there a way to transfer toolbag settings to skyshop?

    thanks
     
    Last edited: Sep 20, 2014
  5. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi Monkeyscience,

    How i can get boxprojection working in shader forge? What i have to plug to the skyshop custom nodes? conecting world position to W.pos of the Spec. IBL node its not working.

    And one more thing, when i have Sky Manager enabled, all static batching is broken. Using unity 4.5.2f1
     
    Last edited: Sep 22, 2014
  6. kaipau

    kaipau

    Joined:
    Jan 10, 2012
    Posts:
    8
    "Marmoset/Vertex Color/Bumped Specular IBL"
    "Marmoset/Vertex Occlusion/Bumped Diffuse IBL"

    These shaders didn't affect by fog, is it a exception?

    Edit:
    I found if renderpath switch to vertexlit, it will affect by fog.

    Why does deferred lighting not working?
     
    Last edited: Sep 22, 2014
  7. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I would recommend upgrading to Unity 4.5.4, 4.4 is not even a publicly available build (cursed?)
     
  8. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Found the fix for this bug and will be releasing a small patch soon. In the mean-time, find the file Marmoset/Shader/Terrain/Marmoset Terrain Add Pass.shader and remove "exclude_path: prepass" from the pragma.

    The line:
    Code (csharp):
    1. #pragma surface MarmosetTerrainSurf Lambert vertex:MarmosetTerrainVert decal:add exclude_path:prepass noforwardadd approxview nodirlightmap
    should look like this:
    Code (csharp):
    1. #pragma surface MarmosetTerrainSurf Lambert vertex:MarmosetTerrainVert decal:add noforwardadd approxview nodirlightmap
     
  9. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Make sure you are using Marmoset/Mobile/ shaders and that you have a sky and sky manager in your scene.
     
  10. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Skyshop will run on any console Unity supports. While we don't have access to a PS4 dev kit to test and confirm compatibility, I don't anticipate any hardware or shader problems. Modern consoles are basically beefy PCs with ATI/nVIDIA chips inside :). Skyshop also ships with shader source code which means your engineers are able to trouble-shoot and fix any issues that may crop up.

    There is no direct path from Toolbag 2 to Skyshop materials right now. Skyshop shaders, technology wise, lie somewhere between Toolbag 1 and 2, so a direct export of parameter values would be difficult.
     
  11. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    This looks like another small bug I'll be squashing in the patch. Meanwhile change line 94 in Marmoset/Skyshop/Extensions/ShaderForge/.../SFN_SkyNodeSpec.cs:
    Code (csharp):
    1. //group = 1;
    2. group = 2;
    Also don't forget to recompile your shaders.

    Yes, unfortunately Auto-Apply features in Sky Manager (edit: local skies and sky triggers) require applying shader parameters per object and will therefore screw up batching and fragment your materials into instances. It is hard to render two objects blending to different skies within the same draw call.
     
    Last edited: Sep 23, 2014
  12. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I found that Vertex Color/ and Vertex Occlusion/Bumped Specular IBL don't get fog. I don't know why, maybe bumped specular requires too many vertex interpolants and the fog coordinates don't fit? Surface shaders are supposed to handle fog on their own, generally.
     
  13. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    I changed and recompiled the shader, but this only works in the scene window. When I hit "play" the object gets the global sky. Something changes when the object hits the trigger of the sky probe, but 1 second later blend again to global sky.
    I tested it with marmoset shaders and works ok. Its something with the shader forge nodes.

    Example images (sphere is using marmoset shader, wheel is using Shader Forge Custom):

    On this one the wheel is on the edge of the trigger and its showing the correct probe: Skyshop1.jpg

    But when the wheel leaves the edges of the trigger blends to global sky:
    Skyshop2.jpg
     
    Last edited: Sep 22, 2014
  14. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Ok I am seeing the same thing in builds. That wasn't a good solution then. Make both nodes set group = 1; again and add box projection to both TryGetMultiCompilePragmas. The final function in both SFN_SkyshopDiff.cs and SFN_SkyshopSpec.cs should look like this:
    Code (csharp):
    1.        public override string[] TryGetMultiCompilePragmas( out int group ) {
    2.             group = 1;
    3.             return new string[]{
    4.                 "MARMO_SKY_BLEND_OFF MARMO_SKY_BLEND_ON",
    5.                 "MARMO_BOX_PROJECTION_OFF MARMO_BOX_PROJECTION_ON"
    6.             };
    7.         }
    8.  
    The problem is MARMO_SKY_BLEND_ON/OFF ended up in the multi_compile pragmas twice and apparently the Unity build doesn't like that. I'll report this to Joachim as well.
     
  15. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Ok, thanks for your fast resonse. Now its working fine.
     
  16. Venged

    Venged

    Joined:
    Oct 24, 2010
    Posts:
    500
    Is there a picture or video showing it demoed in Unity Free? How does it look without direct light shadows?
     
  17. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    About static batching, even if i disable blending and box projection in the sky manager its still broken...
     
  18. Redbeetle

    Redbeetle

    Joined:
    Dec 20, 2013
    Posts:
    7
    hi monkeyscience
    I have the latest version of the "skyshop" and latest version of "unity"
    If you use the sky after setting "probe Direct + IBL"or "probe direct "after the screen image computation came out,
    Unity is crash.
    And I moved to the unity bug report screen.

    unity is 4.5.4 f1
    skyshop is new version .
     
  19. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yes, a few people have reported this. It is an issue that comes up with capturing without the "Use Render-to-Cubemap" setting in the Sky Manager. I have it fixed and it will be resolved in the upcoming Skyshop hotfix.
     
  20. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You need to disable "Auto-Apply" in the SkyManager, which will disable sky triggers from binding local skies to objects. I misspoke in my earlier post, Auto-Apply affects local skies and sky triggers, not blending or projection.

    You can still use blending and box projection on global skies, but if you have two objects sharing a material bound to two different local skies, the material has to get instanced.
     
  21. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705

    SKYSHOP 1.10.1 HOTFIX
    Now available in the Asset Store!


    This patch addresses some of the latest glitches and problems that have cropped up:

    · Fixed shadows on terrains with more than 4 layers.
    · Fixed blending from local to global skies getting stuck at 99%.
    · Fixed probe capture crashing under certain conditions.
    · Fixed Shader Forge box projection code generation (requires recompiling old shaders).


     
    Last edited: Sep 24, 2014
  22. MrKushers

    MrKushers

    Joined:
    Sep 24, 2014
    Posts:
    3
    Hi!

    I seem to have an issue lighting skinned characters with sky probes. Despite being within the trigger box they are still being lit by the global sky. If I apply the character shader onto a sphere it lights fine, so it must be the skinned mesh.

    Below is an imagine of two skinned characters and a sphere all using the same shader with a global sky and a local sky probe

     
    Last edited: Sep 24, 2014
  23. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hi,

    I just upgraded from Skyshop 1.08 to 1.10.1 and I see 5 instances of this error:

    Assets/Marmoset/Skyshop/Script/Sky.cs(294,44): error CS0246: The type or namespace name `ShaderIDs' could not be found. Are you missing a using directive or an assembly reference?

    My upgrade procedure was 1) delete existing Marmoset folder 2) import new package

    Any ideas what's wrong?

    I have tried on 4.5.2 and 4.6 latest beta.

    thanks

    Nalin
     
  24. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Do you have another class named ShaderIDs in your project by chance?

    And do you have the file Marmoset/Skyshop/Script/ShaderIDs.cs? That's where mine's defined. You could try reimporting this or the entire Script/ directory, maybe build order messed this up.
     
  25. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    There seems to be a bug with binding local skies to animated objects, I'll get it sorted out.
     
  26. MrKushers

    MrKushers

    Joined:
    Sep 24, 2014
    Posts:
    3
    That's great news. Thanks for the response
     
  27. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    No other class named ShaderIDs

    Yes I have the ShaderIDs.cs

    What's the best way to upgrade?

    thanks

    Nalin
     
  28. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
  29. Pixeldamage

    Pixeldamage

    Joined:
    Sep 6, 2010
    Posts:
    52
    Here's a test I did on S3. I believe the same issues are happening on iOS (waiting for confirmation).

    https://www.dropbox.com/s/n5zy9c1jcd7dt1a/skyshop shader test.png?dl=0

    Note this image is taken from the Editor on PC (where the shaders are working). I've put ticks/crosses above them to show the result on mobile. As you can see, the only shader that actually works Is the one the mob bump diff. Seems most shaders are working on mobile atm. Strangely, skin shaders work on mobile lol
     
  30. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    To upgrade Skyshop to the latest version, I strongly recommend deleting the entire Marmoset/ folder from your project and importing it from the Asset Store window again. Your shaders and materials may turn pink temporarily when you delete the folder but don't worry, all the material references stay intact and will be fixed once you reimport Skyshop.

    If you wanted to reimport just the script directory of your existing version, right-click on the Marmoset/Skyshop/Script/ folder in your project view and select "Reimport". This will reload and recompile the .cs files from your hard-drive and hopefully resolve any compile order problems.

    The latest version of Skyshop is 1.10.1 by the way. The Marmoset/ChangeLog.txt file will tell you what version you are running.
     
  31. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You don't need a custom shader to do this, actually. Go to Assets->Create->Cubemap and Unity will create an empty cubemap asset with image slots for each individual face. You can use this custom cubemap for the skybox slot in any Skyshop Sky instead of a Skyshop-generated one. Just remember to uncheck the "HDR" checkbox on the Skybox slot because your cube faces are likely not RGBM-encoded.
     
  32. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Is it possible to integrate the asset with a day/night sky solution, like Unistorm one ?

    So the sky itself be of the other system and IBL affecting shaders from the Skyshop system, using the other system's sky colors.

    Thanks
     
  33. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Not easily because Skyshop cannot process the skies generated by Unistorm at runtime, sorry.
     
  34. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    I see. Is there a recommended or a hack way to implement a day/night cycle in Skyshop ?

    Maybe change between disabled skies for the IBL and using a textured dome for the sky would do the trick ? Is there a way to smooth out the transition from one IBL to the next for example (i mean even if i would have to program it ? )
     
  35. negativecap

    negativecap

    Joined:
    Jan 27, 2013
    Posts:
    99
    Fixed
     
    Last edited: Sep 30, 2014
  36. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Are we able to generate multiple versions of the same probe for example... to use with a time of day scenario? And somehow have those blend between the time of day as well as location based.
     
  37. daan87

    daan87

    Joined:
    Jun 4, 2013
    Posts:
    3
    Hi,

    I am working in marmoset 1.06.2

    I have a strange problem.

    I load cubemaps (I have to mention that the cubemaps are placed in assetbundles) through script into the sky object. However when the sky object is selected in the editor the sky object removes all the cubemaps. After this I can load them again as long as the sky object is not selected in the editor. Also the cubemaps do not make any difference to the lighting that is attached.
    When the cubemaps are placed in the resource folder and are loaded into the sky object there are no problems. Also the lighting then works.

    I guess that the sky object reloads on selection and it does not find the objects that are in assetbundles. However I wish to keep using assetbundles and not include everything in the resource folder.

    I have been trying to find out where the problem is but I can't find out what is going wrong.

    Hopefully someone can help with this.
     
    Last edited: Oct 1, 2014
  38. daan87

    daan87

    Joined:
    Jun 4, 2013
    Posts:
    3
    Okay just fixed the lighting problem, that was caused by disabling the skybox at a certain point (it is no longer disabled at any point now). But the other problem is still there.
     
    Last edited: Oct 1, 2014
  39. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    The recommended hack is to use sky blending. If you have skies for day, sunset, night, sunrise, you can set up a timer to occasionally blend from one to the next. You can also set the duration of the blend to take seconds or minutes. There's a simple scripting API for this in the SkyManager class too.

    You should know that blending is a performance hit. You are sampling twice the sky and lighting content while it's happening, so I would recommend a few seconds of blending and long stretches of using a single sky.
     
  40. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Thanks a lot for the details, i will try this out
     
  41. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    That was my intention, but @nasos_333's question has given me the idea to use this asset: Cubemapper to generate cubemaps of my dynamic sky with Skyshop. That would be the best of both worlds, right?
     
  42. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You can use the runtime-generated cubemap for specular but it won't be convolved into proper mipmapped gloss levels so all your reflections will look like polished mirrors. The cubemap also won't be processed into diffuse light at runtime.

    Does anyone know if Cubemapper works at runtime on mobile platforms?
     
  43. Redbeetle

    Redbeetle

    Joined:
    Dec 20, 2013
    Posts:
    7

    hello?
    skyshop is great good!
     
  44. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    AFAIK it does do runtime, but I was only going to use it to capture the cubemaps. Then process them further with Skyshop. That would be a good course of action, right?
     
  45. daan87

    daan87

    Joined:
    Jun 4, 2013
    Posts:
    3
    Well I fixed it, sorry for the posts, the problem was with the assetbundles. Because they do not have a path to refer to marmoset overwrites them with null and they are removed. The solution is to create a temp folder in the assetdatabase and put in the cubemaps. These are removed when the game stops.
     
  46. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    Would be nice if a complete workflow for this or a module addon for Skyshop was posted at some point, dynamic skies is something crucial i think.

    I would gladly pay for an extra day/night pack that is compatible with Skyshop as well :)
     
  47. OnePxl

    OnePxl

    Joined:
    Aug 6, 2012
    Posts:
    307
    I don't know when I'm getting to implementing this, but I'll document it when I do.
     
  48. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,288
    That would be great, thanks.
     
  49. kaz2057

    kaz2057

    Joined:
    Jan 18, 2011
    Posts:
    326
    Please anybody tested skyshop mobile specular material on iPad air?

    My client receive fallback shader (black flat).
    Meanwhile on my iPad 4 everything works fine.

    Can be an opengl ES 3.0 issue?
    iPad 4 has opengl ES 2.0 , while iPad Air has 3.0 .
    In PlayerSettings I use "Graphic Level = Automatic"

    Thanks,
     
  50. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    This could help you debug the problem, just asked something related yesterday
    http://forum.unity3d.com/threads/ho...on-on-android-es2-or-es3.271998/#post-1796999
     
Thread Status:
Not open for further replies.