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

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    If you'd like to contact us directly, please send an email to support@marmoset.co.
     
  2. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Monkey I been waiting nearly 2 weeks for a reply and yet I still did not get one any reason why??

    Looking for a reply bout the lighting issues
     
  3. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yes, you can use directional lights with Skyshop. Every example scene uses one for the sun.

    Could you please post screenshots of Skyshop looking terrible? It's tough to troubleshoot this without further info.

    Are you having trouble with Marmoset shaders or with custom, Shader Forge ones?
     
  4. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    No I can't post screenshots due to NDA, Can I send it to you by email? Or Pm.

    Example scenes??/ huh, I don't see any , I never get any when I import, and I had this for nearly a year now and never seen a example scene.

    When I added a directional light the whole scene looks dull. When I do not add it looks amazing, I need the directional lights for my water shaders to work correct. and a few other things. So any reason that you can think of that may do this?
     
  5. Redbeetle

    Redbeetle

    Joined:
    Dec 20, 2013
    Posts:
    7
    Hi monkeyscience ?
    I have a problem.
    Sometime my game is start with black meterial.
    (skydome mesh is not use skyshop meterial...and other mesh is all use skyshop meterial..)
    When I click the window, finally all meterial is good.
    I think...this problem is sky manager loading problem.
    i want not black meterial start.




    How to do this?
     
  6. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Hello, I have bought Skyshop some time ago, but did not have time to learn and use it, now I wonder if Skyshop would be useful and helpful to make this I want

    I have been searching all the asset store and also on internet, but have not found a starry night skybox with many shiny stars, and if they could be animated even better.

    I have seen this music video that have some really awesome and amazing shiny starry animated night skies

    10 seconds after beginning (direct link here) there is one example of this


    But I want it to be black and not blue, so there is a better example shown at 2:06 minutes


    Please, can you be so kind to tell me if this can this be done in Skyshop? I know that it would need to make them with particles, but do not know how to apply them to the surface of the skybox if possible.

    I have also Shader forge that is compatible with Skyshop, could be possible maybe to make a starry sky in Shader forge and mix it with the the skyshop skybox?

    I also have Particles Playground

    Thanks very much for any help

    best regards
     
  7. latencio

    latencio

    Joined:
    Feb 9, 2015
    Posts:
    2
    Hi, great work you guys.

    Two questions:

    - Could you explain how the Specular Sharpness supposes to work now? in the old version i had, when you set up it to 1 it uses the glossy values stored in the alpha channel of the specular, but now I'm really confused about the new functionality.

    - I'm having an issue with the Transparent Simple Glass Specular shader, or maybe I'm using it wrong. Here are two pictures:

    https://twitter.com/lobachevscki/status/602874833836371969

    As far as I understand, the values in the diffuse alpha channel are controlling the opacity, but I'm having that weird sorting issue all over the geometry. The Cutout equivalente shader is too harsh for our purposes (but is the one we are using for now). The only solution I see is to regroup each transparent geometry (the red lights have a similar problem) into one and use the shader over it, but that means a lot of texture rework, I just want to be sure about the best option to proceed here and from now on.


    Thanks.
     
    Last edited: May 25, 2015
  8. MrMagoo22

    MrMagoo22

    Joined:
    Apr 13, 2014
    Posts:
    12
    Hey! Recently purchased and started using your shader package and I'm impressed! We have however, encountered an odd error and I was hoping you might be able to debug for us a bit. When I open the unity application and load the main scene, all marmoset shaders show up black with no lighting or texturing. I also get two error logs in the console window:

    -Shader error in 'Marmoset/Specular IBL': failed to open source file: 'MarmosetInput.cginc' at line 65 (on d3d11)
    Compiling Vertex program with SPOT SHADOWS_OFF MARMO_SKY_BLEND_OFF MARMO_BOX_PROJECTION_OFF

    -Shader error in 'Marmoset/Transparent/Simple Glass/Specular IBL': failed to open source file: '../../MarmosetInput.cginc' at line 63 (on d3d11)
    Compiling Vertex program with SPOT MARMO_SKY_BLEND_OFF MARMO_BOX_PROJECTION_OFF

    Strangely enough, if I then load one of the moped example scenes provided in the download, that scene will display fine with no problems. If I then RELOAD the main scene of the application, the marmoset shaders display fine without issues, until I close and reopen Unity where they revert back to black.

    Did I maybe forget to include some component or necessary object that the example scene has? My scene does include multiple lighting sources and looks just fine, after reloading. Any idea what could be happening?
     
  9. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    If developing for mobile, make sure you are using Marmoset/Mobile/ shaders in your scene. The Edit->Skyshop-> menu has a bunch of handy utilities for converting your scene or whole project to use mobile shaders if you need to.

    Black skies can also happen if the SkyManager does not find any game objects with renderers during the first frame. Make sure all your level objects are loaded by the time the first frame's LateUpdate() function gets called.

    If you cannot guarantee everything will be present during the first frame, you may have to tell the SkyManager to update manually. Call the following to forc
    Code (csharp):
    1. SkyManager.get().GameApplySkies(true);
     
  10. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Skyshop is more about taking existing skyboxes (full of stars) and lighting the models in your scenes with that data. There are probably better tools for generating the skies themselves.

    Although if you were clever you could set up some Unity particles in a blank scene and render them to a cubemap using Skyshop's probe capture system. See the first half of this tutorial:
     
  11. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Specular sharpness works as it always did. The values are in a range of 2-8 for technical and convenience reasons but Unity 4 used to hide them from the user. Unity 5 has added a text field to all sliders so now you see the weird numbers. We decided to keep the old value ranges in for the sake of backwards compatibility (otherwise all existing materials would break).

    Transparency draw order problems are a plight on all of computer graphics. Unity takes some internal steps to combat it but there's little Marmoset shaders can do to help you there. Your best bet is to split up meshes with transparency to give Unity's geometry-based sorting something nice to work with.
     
  12. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    These errors are caused by #include not finding certain shader headers (.cginc files). Be sure to keep the Marmoset/Shader/ directory structure intact, and if you are writing custom shaders in a different location, modify any #include paths accordingly.
     
  13. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Is this a possible future prospect, or have you discontinued any effort for this? I'm interested with what the challenges are with regards to implementing it at runtime?
     
  14. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    To be honest, it is not likely we will be getting to this feature as part of Skyshop.

    The trouble I ran into was in updating cubemaps and their mipmaps at runtime. Creating new cubemaps on the CPU and adding them to the asset database is reliable but slow. Updating existing assets on the GPU and at runtime was an uphill battle, at least in Unity 4. Not enough of the core render-target features were exposed.

    And then inevitably someone will want it to work on mobile, powered by their LeapFrog GPU on drivers written by Fisher-Price, lolol.

    In any case, Unity is in a much better position to swoop in and implement this into the core engine, fixing any technical short-comings along the way.
     
    Ben-BearFish likes this.
  15. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Ok, thanks for the explanation. I wish there was someone at Unity we could contact directly to get this implemented. I feel like it would really help with adding an extra layer of realism and customization to scenes, especially in AR/VR setups.
     
  16. MrMagoo22

    MrMagoo22

    Joined:
    Apr 13, 2014
    Posts:
    12
    Gotcha, so definitely don't mess with the location of the Marmoset shaders after import, that makes sense.

    We're running into a new problem now that I was hoping you could provide some guidance with. We've been applying the Marmoset shaders to some models exported out of Daz Studio with almost correct implementation, but we're seeing a weird visual layering issue with the hair occasionally. It looks like the scalp of the hair is rendering after the hair possibly? Here's a screencap:



    The daz models are all double-sided meshes, so to get them to display correctly in Unity I modified the shaders to Cull Off, but I do not think that causes the problem as the layering issue is still present even after I switch the shader back. I don't have a ton of experience with Unity's shaders, do you know if there's a setting that could fix this?
     
    Last edited: Jun 5, 2015
  17. wightwhale

    wightwhale

    Joined:
    Jul 28, 2011
    Posts:
    397
    What would be the best shader to use on mobile for water?
     
  18. sebastiansgames

    sebastiansgames

    Joined:
    Mar 25, 2014
    Posts:
    114
    Hi there-- just wanted to report that using skyshop 112.2, mobile simple glass bumped specular shaders do not show up when building for iPhone 5 (pre-metal device). Also getting build errors in Xcode:
    OpenGLES error 0x0502

    I'll probably use a non marmoset shader for transparency at this point since my project is nearing launch, but wanted to report the issue.

    Thank you!
     
  19. MrMagoo22

    MrMagoo22

    Joined:
    Apr 13, 2014
    Posts:
    12

    Posting a followup. As of upgrading to 5.1, the black texture error has returned. I tried deleting all files related to marmoset and reimporting, didn't change any settings, modify any shader scripts, and didn't move anything from its default location. Simply imported all files into the project, saved, and restarted Unity and they were black and textureless. I'm not sure how I could have done anything on my end to stop it from working correctly...
     
  20. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    any reason why i'm not getting an answer and being passed by again.... Would be great to get a refund if i'm going to not get support.... First time I can understand alot of posts, but there is not that many..
     
  21. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Recon03, I'm afraid we have yet to receive any emails or PMs from you regarding your issue.
     
  22. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    The issue here is that blending is order-dependent. You have one hair mesh inside another hair mesh and Unity is drawing them in the wrong order. I would recommend using an alpha-cutout shader on the inner hair mesh something like Marmoset/Beta/Skin Cutout, so that you can get the hair-line to fade decently and not conflict with the outer hair mesh's blending.

    Thanks for the report, I will be looking into Unity 5.1 issues in the next few days.
     
  23. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Interesting. A bit of googling turned up this on the forums: http://forum.unity3d.com/threads/ios-5-opengles-error-0x0502.108634/
    Someone at Unity seems to suggest the 0x0502 errors are caused by MSAA on non-32 bit back buffers. Worth a try maybe?
     
  24. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I would recommend Marmoset/Mobile/Transparent/Simple Glass/ of some kind. This will give you transparency and proper, additive reflections (with fresnel) on top of it all.
     
  25. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    Its on this post!!!! The questions were asked towards the top of the page over a month ago, and was never replied to///// This is not the first time this was done to me, I asked questions here and was never replied to, you just answered everyone else and went on and skipped mine..
     
  26. wei2lee86

    wei2lee86

    Joined:
    May 1, 2014
    Posts:
    6
    Thanks for your great product, I am enjoy using it !
    Currently I have an issue that My test android devices (Galaxy Tab S10, Galaxy Note8, XiaoMi4) render differently from My Unity GameMode/iPad3 screen ! Can you suggest a best way to fix it ? (The result should be as close as what appear in GameMode, with reflection)

    screen_ipad3.PNG material.png texture.png screen_samsunggalaxytabS10.png
     

    Attached Files:

  27. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Hmmm, I'm having a tough time spotting the exact difference in your screenshots but if I had to guess, things appear much shinier on Android?

    Android devices do not support mipmapped gloss reflections so surfaces that should have blurry, rough reflections will appear shinier than in the viewer or iOS. This is an unfortunate hardware limitation, Android GPUs do not support a needed openGL extension.
     
  28. wei2lee86

    wei2lee86

    Joined:
    May 1, 2014
    Posts:
    6
    The first screenshot is taken from iPad3 and the 2nd screenshot is taken from GalaxyTabS10.
    The specular sharpness and Fresnel Strength is set to a very low value to create a Blurry Reflection for the Cupboard door and kicthen section, however, on the Android device, the graphic render as Fresnel Strength is set to Max ( compare to GameMode)
    screen_ipad3_blurry_reflection.png screen_samsunggalaxytabS10_verysharp_reflection.png

    Can you point me to these documentation so I can better investigate ? like Android device leaking what kind of Hardware Spec ?
     
  29. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Oh! Heh yeah now I see. I was seeing those reflections as other rooms behind glass for some reason. That is definitely mipmap gloss not working :(.

    The extension is called GL_EXT_shader_texture_lod and it's what allows a shader to pick a specific mipmap level of a texture at sample time. Blurry versions of reflections are stored in lower mip levels of the cubemap and I need this extension to get them out according to a gloss map lookup.
     
  30. wei2lee86

    wei2lee86

    Joined:
    May 1, 2014
    Posts:
    6
    Thanks for your reply !
    What is my option to create blurry reflection on the device which leak GL_EXT_shader_texture_lod ?
     
  31. wei2lee86

    wei2lee86

    Joined:
    May 1, 2014
    Posts:
    6
    Can you show me a sample code to switch Material/Shader if current device is not support GL_EXT_shader_texture_lod ?
     
  32. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    I know you mentioned this a while back to me as well. The funny thing is that it something feels different about this on Unity 5 v 4 - Can't quite nail what it is but specular does feel different. Will try to investigate if I get time here.

    N
     
  33. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I think I responded to you over email about this but for the benefit of everyone, I would recommend making a separate sky with an blurry version of your specular cubemap, and assigning that sky to specific objects using the SkyAnchor. It is a much more robust method of controlling reflection blurs than hardware-specific swapping of materials.

    Making Blurry Skies:


    Attaching a sky to an object directly:
     
  34. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Interesting. Would love to see screenshots comparing the two, maybe there's a bug after all.
     
  35. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    For those of you with Unity 5.1 and pink SpeedTree shaders, I've found the solution and it's a real easy one. Comment out line 60 in Shader/Terrain/SpeedTree/MarmosetSpeedTree.cginc:
    Code (csharp):
    1. #ifdef LOD_FADE_CROSSFADE
    2. //uniform sampler2D _DitherMaskLOD2D;
    3. #endif
    This variable is now defined in a core Unity shader header. Not sure how I'm going to make the patch compatible with Unity 5.0.x though :-(.
     
    hopeful likes this.
  36. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Rereading your post and it occurs to me this is exactly what would happen if you did not have an active Sky object in your scene. In the editor, when you load up a scene with a Sky object, its parameters and cubemaps are bound to the global shader system. Those parameters and cubes are not changed until a) you load a scene with a different Sky or b) you quit Unity. When the example scene works and makes your own scene work, you're seeing an old Sky binding.

    When you see black objects in your scene, typically:
    - You are missing a Sky
    - You are missing a SkyManager (there should be alert windows about this)
    - You are running standard Marmoset shaders instead of Marmoset/Mobile/ ones on a mobile device (or WebGL)
    - In some complex applications you may have trouble with the SkyManager update not running before the first frame
    (See this post).
     
  37. Maeslezo

    Maeslezo

    Joined:
    Jun 16, 2015
    Posts:
    331
    Hello!!

    We are using Marmoset and we have some "black issues".

    Sometimes (not always) we have black object in the scene. It seems the problem is because we are loading the objects before the skyManager and the sky are ready.

    We were told by Marmosed Support to use
    Code (CSharp):
    1. SkyManager.get().GameApplySkies(true);
    .
    This reload all the meshes and works!!
    But the problem is the trees. Trees remain black. We have not idea how we could reload the terrain trees. We have try with
    Code (CSharp):
    1.  terr.terrainData.RefreshPrototypes();
    but we do not see any difference.

    Is there any way to refresh or reload tree terrain configuration??

    We look forward to your response.Thank you very much.

    Additional info:
    - Marmoset Skyshop 1.11
    - Unity 4.6.5
    - Candela 1.02
    - Marmoset shaders for trees
    - Asset bundles and load level additive
    - SkyManager box projection checked

    Edit: Could be any relationship with this?:
    Code (CSharp):
    1.         CBUFFER_START(UnityTerrainImposter)
    2.             float3 _TerrainTreeLightDirections[4];
    3.             float4 _TerrainTreeLightColors[4];
    4.         CBUFFER_END
     

    Attached Files:

    Last edited: Jul 1, 2015
  38. Jenkaro

    Jenkaro

    Joined:
    Nov 12, 2014
    Posts:
    5
    I have 8 textures on terrain, but color map works only on the first four textures, possible to extend this value to 8?
     
  39. NorthernVisionStudio

    NorthernVisionStudio

    Joined:
    Oct 18, 2013
    Posts:
    60
    Hi Marmoset folks,

    I'm upgrading our project from Unity 4 to Unity 5. Testing out the latest version of skyshop on 5.1.1
    I'm able to see some GI effects, but I can't get reflection probes to work.

    Any hints, explanations? Does Skyshop support GI and refl. probes like standard shader?

    Thank you!
     
  40. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I currently own Marmoset Skyshop, however, my project requires a double-sided shader for mobile (rather than doubling geometry). Is there a double-sided shader for mobile available for Skyshop?
     
    Last edited: Jul 8, 2015
  41. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I have also searched for an option to refresh terrain data on command and haven't found much :(. I have noticed tree billboards and such get recomputed when the active camera moves (rotates, specifically). Maybe a simple work-around for you could be to jiggle the camera after load?

    These complex scene loading issues can be tricky to track down and handle properly. Email us at support@marmoset.co if you are still having issues with this, maybe we can take a more thorough look at it.
     
  42. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Looks like this is a bug, I found an omitted #define in the shaders. Open Marmoset/Shader/Terrain/MarmosetTerrainAddPass.shader and uncomment the line:
    Code (csharp):
    1. #defineMARMO_DIFFUSE_BASE
     
  43. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Skyshop's shaders do not use the data from Unity's reflection probes. Skyshop predates Unity's probe system and needed to implement it's own. GI and diffuse bounced light should come through from Unity's probe system as one would expect.
     
  44. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    I'm afraid there is no custom shader for double-sided materials (there are lots of caveats and normal mapping changes needed aside from "culling off"). It would be simpler for you to duplicate your geometry and flip the normals yourself :-/
     
    buttmatrix likes this.
  45. IMD

    IMD

    Joined:
    Mar 21, 2013
    Posts:
    14
    Hey @monkeyscience - many thanks for your awesome software. So I'm getting the same thing as @Almakos when attempting to build to iOS. It seems to be happening is shaders using the folder directive ' ../ ' -- Do you know if this forward slash is environment specific and perhaps only works on Win filesystems, or have you tested Marmoset with iOS builds successfully?

    Cheers,
    Isaac
     
  46. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    404
    Hi @monkeyscience

    I am trying to override the skybox being displayed (Austria) to a different one (non iBL) in Unity 5.

    I remember seeing a video many moons ago about how to do this in Unity 4 with an earlier skyshop, but I cannot seem to figure out how to do this in Unity 5?

    Could you please point me in the right direction?

    thanks

    Nalin
     
  47. IMD

    IMD

    Joined:
    Mar 21, 2013
    Posts:
    14
    Hey @Almakos , I found the same issue when compiling to iOS. It appears to be due to the use of the Windows path syntax ' ../ '. To fix this issue I wrapped the include statements inside a compiler directive as below.

    #ifUNITY_EDITOR || UNITY_STANDALONE_WIN
    #include "../../MarmosetCore.cginc"
    #else
    #include "..\..\MarmosetCore.cginc"
    #endif
    Hope this helps.
    Isaac
     
  48. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    And ... that fixed it?? Is this like a new iOS/U5 thing I don't know about?
     
  49. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Select the Sky Manager object and uncheck "Show Skybox". This should allow Unity to render whatever it needs to as the background.
     
  50. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I was looking over plugins to improve Unity lighting and I'm on a budget. I was wondering if anyone could comment on whether Skyshop still produces a drastic enough quality difference in lighting from Unity 5's new lighting system that it justifies the price for Skyshop in Unity 5's current state?
     
Thread Status:
Not open for further replies.