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. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    I believe I have figured out what is going on.

    Basically Skyshop terrain shaders don't work on iOS at the moment and are just falling back to default shaders. For simple terrain thats: Marmoset/Diffuse IBL and for Terrain Diffuse: Nature/Terrain/Diffuse (Thats why no IBL gets added to this terrain type) and for Terrain Specular: Nature/Terrain/Bumped Specular

    A bit disappointing since I'm not clever enough to fix this but hopefully you guys can work some magic to figure out what's happening on the iOS platform
     
  2. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yeah that would do it. I'll try recreating it and see what is causing it to fall back.

    How does Unity terrain perform on iOS otherwise? I kind of figured it was a non-starter because of memory use.
     
  3. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yeah, you would need a different cube per room. It's a half-way step between realtime reflections and old-school environment maps.
     
  4. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    Terrain works perfectly on iOS iPhone 5 (or 4s) all run frame rates of over 30FPS. That's with post processing too. So more than enough oomph for games.

    Just getting the simple IBL terrain shader going would be more that enough for iOS at the moment, just so the ground is lit nice with sharp texturing...
     
  5. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    Hey,
    I've got a quick question.

    In my game, I rotate an empty object containing the entire level around. When I put a skyshop sky as a child of this, it rotates as expected in the editor, but when I build to a device, the sky is locked in place and won't rotate with the level.

    Is there something I should be pressing to let it rotate with the parent object? Or is the rotation of the sky locked in on iOS devices?

    Here's a video that shows the game, which may help explain what I'm after. Obviously there's no visible skybox in the video though.





    Thanks,
    Mark
     
  6. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    i already say it's the same think's about terrain shader on android
    it's bad because somethinks it's possible to get good result
     
  7. michalss

    michalss

    Joined:
    Feb 20, 2013
    Posts:
    5
    IS this pack of shaders any good for games? I seen many comments that it is not really good for games right now? Thx
     
  8. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Depends on your game. If your character/object is moving through very different lighting conditions, it might get tricky.
    If its a "closed" environment, where lighting stays more or less the same its like a dream come true :D
     
  9. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey Monkeyscience,

    I have a quick question involving the number of Sky objects in the scene. I am going to be doing an interior level and there are some areas that will require some box projection (such as hideaways and small cube areas) and I am wondering if I will have any issues using more than one sky object in the scene to allow me to use box projection. Do I need a sky object to do a box projection for a custom cubemap for each individual room? I am starting to think that if I add another sky, it may disable the sky that will be in the majority of the room.

    EDIT: Yup, it disabled the primary sky... one way around this could be the cube area I want to occupy could be a single material with the custom cube map
     
    Last edited: Dec 28, 2013
  10. StarHunter32

    StarHunter32

    Joined:
    Feb 10, 2013
    Posts:
    99
    Hello, I've recently updated to the latest versions of Skyshop and Unity. After many recompiles and backups I managed to get all the project working fine with one issue remaining: the simple glass shader does not work. It's like the mesh renderer is disabled. It gets fully transparent when I assign it to a mesh.

    Did anybody got this issue and could you hint me for a solution? Thanks.
     
    Last edited: Dec 29, 2013
  11. RogDolos

    RogDolos

    Joined:
    Oct 16, 2012
    Posts:
    42
    In regards to indoor scenes, it seems to me that Skyshop would be very useful as an ambient light, with variance and warmth that cannot be obtained from the single-colour ambient default with Unity. That would be especially valuable for dynamically-lit scenes, which are usually rather flat without lightmapping. Certainly nothing like a full real-time GI solution, but performance-wise real-time lights + shadows are already taxing enough.

    The big downside I assume is that it might be very overbright as ambient light. I haven't tried it yet (I'll probably squeeze Skyshop into my budget soon though), but would there be a reasonable way to create contrast between directly lit and shadowed areas? For a non-lightmapped scene, so not a blend with Beast lightmaps. Is there some way to keep shadows dark but lit areas still bright?

    I'd love to see example fully-indoor scenes, lightmapped or not.

    I realize I'm thinking outside of the box here. Shadows are nigh-important for my project (I'm on Unity Pro 4.3).
     
    Last edited: Jan 3, 2014
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Happy New Year (yeah, I'm late) to the guys at Marmoset... you have had a VERY strong year and I am looking forward to seeing what you guys will have next to show us... I am BURNING with anticipation... and while I am here, is there way to have more than one sky on at the same time... Could I use box projection without having a skybox and just use it as a custom cubemap?
     
  13. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Thanks Neptune! Happy New Year to all!

    Time to play catch-up with questions I missed this past week (thanks for your patience everybody!)
     
  14. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Sky rotation is disabled in mobile shaders for a minor performance gain. Enabling it is quite straight-forward however, open Marmoset/Shader/MarmosetMobile.cginc and comment out these lines:
    Code (csharp):
    1. #ifdef MARMO_SKY_ROTATION
    2. #undef MARMO_SKY_ROTATION
    3. #endif
    This should make all but the "Specular Fast" mobile shaders use sky rotation. Similarly, in the "Specular Fast" and "Bumped Specular Fast" shader files, make sure that these lines are uncommented:

    Code (csharp):
    1. //#define MARMO_HQ
    2. //#define MARMO_SKY_ROTATION
     
  15. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Not exactly, each material is going to sample one set of cubemaps. But you can now assign a different sky per object instead of per material, by scripting. You do this by calling Sky.Apply() and passing it a Renderer as a parameter.

    You can then define triggers in your world that bind custom skies to any objects that enter a room. You can even make the sky object itself a trigger, add a box collider component to it and set "Is Trigger" to true.



    Now, every object with a collider of its own will cause the OnTriggerEnter() callback to be called in the Sky script. Add this function to Sky.cs and it will bind itself to objects that enter the bounds:
    Code (csharp):
    1.  
    2. private void OnTriggerEnter(Collider other) {
    3.    if(other.renderer) {
    4.       this.Apply(other.renderer);
    5.    }
    6. }
    7.  
    I'm still working out the kinks with this approach to multiple skies but its a promising start.
     
  16. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    It is very promising... I am actually creating an interior level with small compartments (I guess I will have to make them separate objects instead of materials on a single room) and the cubemap for that little area is always present, but this will work. Will I have any performance issues if the sky is always present?
     
  17. omarzonex

    omarzonex

    Joined:
    Jan 16, 2012
    Posts:
    158
    wow

    very very reality owasome

    amazing nice Quality Systems Engine

    learn lession course here
     
  18. omarzonex

    omarzonex

    Joined:
    Jan 16, 2012
    Posts:
    158
  19. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    I've been playing with the box projected cubemaps all day, I love them! I have some questions about scripting multiple skys. I believe I have two rooms set up how you described. Everything in my scene is stationary except the camera. Would I apply a script with sky.apply to each of the objects in the room? Can you elaborate? Thanks.
     

    Attached Files:

  20. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Somewhere in a script you need to apply a room's sky to every object in that room by calling:
    Code (csharp):
    1.  
    2. roomSky.Apply( obj.renderer );
    3.  
    If you have a list of the objects in each room, you could you could iterate through them with a loop:
    Code (csharp):
    1.  
    2. for(int i=0; i<count; ++i) {
    3.    roomSky.Apply( objArray[i].renderer );
    4. }
    5.  
    But building a list of objects in each room by hand is tedious. You could write a script that gathers all objects within the room's bounds into one list and runs the for loop.

    You could also use Unity's collision and trigger system to do the gathering work for you. If you add a box collider component to the room and set it to be a "Trigger", Unity will call OnTrigger callbacks on every object within the bounds. Now you can run custom Apply code per-object in these callbacks, as per this post: http://forum.unity3d.com/threads/18...ols-RELEASED?p=1471936&viewfull=1#post1471936
     
  21. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Turning off the skybox does help performance by reducing fill-rate. It is worth optimizing out the sky if you are in rooms with no visible windows, for example.
     
  22. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    This is good information because I have a single room with two levels (stairs going up to the new level) and I want to have the elements in that level with cubemaps. These will not be triggered, but I want them reflecting something... And in this interior room, I don't use a sky cubemap at all :)
     
  23. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    592
    Cheers for the tip!


    One more question, is there a way to enable shadows from a directional light on the Mobile/Transparent/Diffuse IBL shader?

    I tried swapping between the normal Diffuse IBL and the transparent one when the blocks are between the camera and the bird, but when they become opaque again, and i swap back to the normal Diffuse IBL shader for the shadow, the shadow pops on. Would be nice if it just faded in and I didn't swap materials at all.

    Maybe it's not possible, but I figured I should ask all the same! :)



    Thanks again for the help,

    Mark.
     
  24. VenomUnity

    VenomUnity

    Joined:
    Apr 6, 2013
    Posts:
    29
    I'm yet not understanding what Skyshop is, so I have a few questions.

    1. Can you use skyshop in a real game and are there any demos made by someone?
    2. What about the HDR image. Can you hide it and add a 'normal sky', because I don't want in the scene to look mountains or other stuff in the background.
     
  25. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Venom,

    Here is a still from my asset test scene. This is a test arena for a game I am working on(Mac, Win, Linux fingers crossed hopefully console!). This arena is meant for evaluating game assets for look dev. It uses Skyshop for lighting(baked and otherwise) The Skybox is hidden and a different tool is used for the sky. I have also incorporated ProFlares in the Arena. I through some big rocks in here as an example(not showing my design content yet ;). Controls are FPS(WASD)

    $ArenaScreenGrab900.jpg
    Links to a win and Mac builds below that.
    HIGHRES SCREENGRAB!

    Mac Link!

    Win Link!
     
    Last edited: Jan 6, 2014
  26. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
  27. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    A friend of mine tasked me to find a way of bringing out the detail in a 1024 x 1024 diffuse map using Unity 3rd party shaders. Its understandable that seeing hours of detail work vanish when displayed in 1024 resolution can be very frustrating however this solution is not viable for a full-scale "playable" game due to performance restrictions. In a attempt to negate this I used the Mobile version Marmosets "SkyShop" shaders. Here's the result.

    $AIS .50BMG - SkyShop.jpg

    You can see that minute details are clearly visible while keeping that resolution firmly on 1024 px.
     
  28. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    monkeyscience,

    I'm interested in a tessellated skin shader that's based on distance. Is that something that you can implement when you have some time?

    Thanks.
     
  29. ganesh-pingale

    ganesh-pingale

    Joined:
    Dec 19, 2012
    Posts:
    11
    It is awesome!!
    but can please tell me how to lightmap interior scene using skyshop??
    thanks in advance!!
     
  30. jxxxxst

    jxxxxst

    Joined:
    Nov 3, 2012
    Posts:
    50
    Hey there,

    are the vertex-lit shaders supposed to work on mobile?
    I did a quick test on the Ipad4 but everything turns to black with the Vertex Lit/Specular IBL shader.
    I played around with the rendering path settings (Vertex Lit/Forward) as well as the LightMode Tag in the shader itself (Vertex/ForwardBase) but no success. Also I refreshed the current sky under the editor menu.

    Best Regards,
    HansBernd
     
  31. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    In this situation, you need a light source in the room, the env in beast set to none, and use a custom cubemap on the object. You can also use box projection.
     
  32. jxxxxst

    jxxxxst

    Joined:
    Nov 3, 2012
    Posts:
    50
    Nervermind, the occlusionDemo scene with vertex lit shaders works fine on mobile, something must have went wrong in my custom scene.
     
  33. StarHunter32

    StarHunter32

    Joined:
    Feb 10, 2013
    Posts:
    99
    When I switch to mobile all the materials got burned, oversaturated.

    Edit: Got help and explanation of my issue.
     
    Last edited: Jan 14, 2014
  34. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yeah, for those in the audience: the problem is mobile platforms do not support linear color-space rendering which means lighting looks saturated and "different". Not much I can do about it short of adding my own color correction math to mobile shaders; an appealing idea, the more I think about it.
     
  35. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I really only care about mobile so I hope you do add your own color correction math.
     
  36. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    i'd like to see a mobile bumped specular fast and mobile specular fast versions of the beta shaders, i really like the idea of being able to walk into a room and have objects dynamically change for the indoors.
     
  37. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    Has anyone else upgraded to u4.3.3f1 and received editor window errors?
     
  38. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Yes, I have updated and I can use Skyshop without any error.

    Bye
     
  39. PixelRouterVR

    PixelRouterVR

    Joined:
    Jan 6, 2014
    Posts:
    20
    Excellent work on SkyShop!

    Here is a video show me using PlayMaker to hook up a scene so that I can switch SkyShop environments during the game.

    I'm loving the look that I can get with SkyShop. There was a time, not long ago, that I would have been happy to wait 60 seconds or more for Cinema4D to render a frame that looks this good. I can't wait to see where I can push this.



    I also wrote a little blog post talking about the project.

    http://blog.pixelrouter.com/rift-harrier-using-playmaker-to-switch-environments/
     
  40. SteveB

    SteveB

    Joined:
    Jan 17, 2009
    Posts:
    1,451
    Thats very sweet Pixel, and I do like the influence and inspiration you have from Space Harrier. Hmmm, perhaps next for this is to get a character in there to follow behind! :D
     
  41. TheShane

    TheShane

    Joined:
    May 26, 2013
    Posts:
    136
    What happens when you add box projection to the mobile shaders? Looking through the code it seems like mobile shaders don't normalize the local normal which is later fed into the sky projection function. I'm not sure how much that will mess up the math, but you could give it a try. It might not be noticeable. I don't have a scene set up to try yet, but I hope to experiment with it soon.

    Worst case scenario you may have to add a condition to always do the normalizations when box projection is on even if "MARMO_HQ" is off. Which will make it even heavier for mobile so it might not end up working too well.
     
  42. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    Hi,

    First, Congratulation for Skyshop, it's a very good tools for Unity ! :)

    Second, I bought and tried SkyShop 104 to Unity 4.2.0 and it was very fast works well !

    Now with the Unity 4.3.0 and Skyshop 105 : impossible to launch a scene (in the game window) after load a panorama in the Skyshop window (Unity just freeze and ... nothing ...) :(

    Do you have a idea ? :(

    EDIT : I found the follow post on this thread :

    Fix it in the SkyShop 106 right ? ;)
     
    Last edited: Jan 19, 2014
  43. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    PixelRouter defenetly very nice scene and overall presentation of Skyshop, maybe only bit too much skybox reflection on water surface.
     
  44. PixelRouterVR

    PixelRouterVR

    Joined:
    Jan 6, 2014
    Posts:
    20
    Skyshop and the Oculus Rift are meant to be together!

     
  45. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    Hi there @monkeyscience !
    I´ve been receiving many requests that UMA (http://forum.unity3d.com/threads/219175-UMA-Unity-Multipurpose-Avatar-on-the-Asset-Store!) and Skyshop shaders could work together :)
    I´ve been doing some tests myself, and results seem promising, but I would like to know if we could expect having an official integration from your side or if it would be ok to share custom skyshop shaders that work directly for UMA .


    Cheers! Thanks for this amazing product =D
     
  46. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    A match made in heaven, very nice work :)
     
    Last edited: Jan 21, 2014
  47. PixelRouterVR

    PixelRouterVR

    Joined:
    Jan 6, 2014
    Posts:
    20
  48. brzozowsky

    brzozowsky

    Joined:
    Sep 12, 2011
    Posts:
    39
    Hi. I found a small issue on the IBL transparent shaders. If i use a texture with alpha transparency, no shadows are recieved on this material.
    To solve this set the Queue in the IBL transparent shader to AlphaTest:
    ...
    "Queue"="AlphaTest"
    ...
    Now the transparent material recieve shadows.
     
  49. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    What about casting shadows and dealing with the sorting with the planes...?
     
  50. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey MonkeyScience,

    Any word on the next awesome update of Skyshop? :)
     
Thread Status:
Not open for further replies.