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

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    thanks guys ! :) It's the IBL bumped spec material in the box projection beta folder
     
  2. Spartan_Boy

    Spartan_Boy

    Joined:
    Jul 8, 2012
    Posts:
    38
    Awesome work Florian, makes me want to have a go, really good scene and pfx set up!
     
  3. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Thanks a lot Spartan ! Glad you like it

    @monkeyscience: You probably already know but some Mac users showed me pics of weird artifacts in my webplayer, that behaves like additional geometrie...



     
  4. jr83

    jr83

    Joined:
    Oct 15, 2013
    Posts:
    2
    Hi MonkeyScience!

    Sorry for my english, hope you will understand what I trying to say :oops:
    It's about skin shader which is great, but I think one small but important thing is missed:

    Due to thin layer of liquid, human skin tend to has some special gloss, cold highlight in certain areas.
    For instance (maybe not the best example):

    http://www.hdwpapers.com/walls/noomi_rapace_wallpaper_6-normal.jpg

    Standart specular can be too "chrome-like" reflective at high values. Fresnel helps but it decrease highlight power.

    So I think it will be very handy iff you will add some additional specular layer (user defined color and brightnes, and maybe

    harshness etc). It will prevent skin from looking too silky or dull.

    Anyway Skyshop is the best !
     
    Last edited: Dec 20, 2013
  5. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,341
  6. yuenkay

    yuenkay

    Joined:
    Nov 12, 2013
    Posts:
    5
    Hi MonkeyScience,

    Loving the Skyshop so far. I am using Unity Pro and was noticing some visual artifacts with the advanced terrain marmoset shader when combined with the Image effects. It is pretty easy to spot if you have a mesh object (also using a marmoset shader) partially embedded in the terrain with the marmoset shader, and then turn on SSAO. You can then see the buried part of the mesh in the SSAO effect, as if the terrain did not occlude it.

    Similar artifact shows with the Sun shaft image effect too, you can see the sunshaft thru where terrain should be blocking it, as if the hill is "transparent" to the image effect.

    It is almost looking like the z depth in the terrain is not being passed or something?

    I can share screenshots if you are not aware of the bug. I did a brief search and didn't see anything pop up so I figured I'll drop you a quick note first.
     
  7. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    975
    Unity is freezing when I hit play, no error message. I haven't used Skyshop since the update. I've tried creating a new project, nothing but Skyshop, 4 meshes and 2 substances, and I have the same problem.

    I wish I had an error message or something to post. What are my options? Is there any way I can get the previous release if I send you my order number? I don't really have a lot of time for troubleshooting. I knew what I could do with Skyshop, I said 'sure, no problem', problem.

    Please advise, thanks.

    EDIT:

    I opened up an older file that I used to test Skyshop, and it froze also. My work PC is just about of HD space. I suspect that is causing my issues. :/
     
    Last edited: Dec 20, 2013
  8. niosop2

    niosop2

    Joined:
    Jul 23, 2009
    Posts:
    1,059
    I ran into a similar problem. As I understand it, many of the image effects use ImageEffectOpaque to render after opaque geometry. To determine what's opaque, there's a RenderType in the shaders. The latest version of Skyshop started using the RenderType to hold information for it's own use, and setting it to a value other than Opaque. This causes those Image effects to show the artifacts you are describing. Changing the RenderType of the shader you are using to Opaque (edit the shader file) should fix that problem, but may cause problems if you are using the HDR cubemap probe feature according to support. If you're not using that, you should be fine, and I was able to generate HDR cubemaps that looked OK to me even after modifying the shader. They are aware of the problem and are looking at better ways of solving the problem.
     
  9. yuenkay

    yuenkay

    Joined:
    Nov 12, 2013
    Posts:
    5
    hey Niosop2, thanks for the info! I'll try that out for now. We're not using HDR cubemaps at the moment so i'll give that a go. Good to know that they are aware and looking into it as well. I'm new to Unity and I'm really appreciating the community being helpful like this!
     
  10. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Hey Florian,

    I'm gonna look at mac bugs today, thanks for the report. Your work is looking mighty fine by the way!
     
  11. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Great reference, thanks! I've been experimenting with two-lobe (two-layer) specular reflection after reading and re-reading some Activision papers. There is definitely something more complex going on in this photo than the beta skin-shader can handle currently.
     
  12. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Yep, this is the cause, good answer Nisop2. It is a shame because custom RenderType flags are a very elegant way for me to specify what shader replaces what when doing render to HDR stuff.
     
  13. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Someone reported similar problems a couple of pages back: http://forum.unity3d.com/threads/18...ols-RELEASED?p=1453504&viewfull=1#post1453504

    It is a nasty memory bug and the work-around for now is to clear the input panorama field in Skyshop before hitting play.
     
  14. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    You can light any kind of scene with Skyshop and there are a few examples on this board of people using it for indoor scenes, though it is best suited for large out-door environments where lighting and reflections are the same over a large area.

    For indoor levels you would want to render a different reflection and lighting cubemap for every room and light each room with a different sky. This is all possible with the tools Skyshop provides: rendering cubemaps from your scene*, applying them per object, etc. You can even set up box projection and get spatially-aware reflections, provided your rooms are square-ish. But the indoor lighting process is a little tedious right now. I am actively developing ways to make Skyshop more manageable for indoor games.

    *(I should also mention that render-to-cubemap is a Unity Pro feature right now.)


    An indoor scene by GaryHaus


    A great example of indoor, box-projected reflections by FlorianSchmoldt
     
  15. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    ...thanks :)

    Capcoms "Remember me" used some fancy tech to blend between parallax corrected cubes. I'm not a tech guy but maybe it's possible to have some sort of "Lightprobe extended" and stitch Skyshop on it.

    http://seblagarde.wordpress.com/2012/11/28/siggraph-2012-talk/
     
  16. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    159
    I've been toying with your box projection shaders, they are very promising.

    Right now we need to setup the box using a sky prefab, could you use a separate dedicated prefab instead so we can have multiple boxes in one scene?
     
  17. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    one word!
    A I D S !!
    :D



    This is definitely very cool looking.

    I saw this on the Marmoset website, so I am wondering is this the same skin shader provided in the Marmoset workshop?

     
  18. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    975
    I had asked about blending from one sky to another for indoor areas a while ago. You gave me some ideas how I might do that by modifying the shader. I never did work through it. Is the workflow you described above outlined more specifically anywhere? Has a way to dynamically switch/blend been worked out? Thank you.
     
  19. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    Having more than one sky on at the same time does sound like a good strategy, and though it is tedious, it is the only thing we have right now... the only real limitation is that it has to be a square room, and it would require multiple skies in the scene, like a bounding volume for each section...

    EDIT: I referenced Killzone Shadow Fall for this technique.
     
  20. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    I just found out, that if you render probes of box projected cubes and use them as cube maps with box projection, the room becomes a reflection inception

    webplayer





     
  21. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    159
    Impressive work Florian
     
  22. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    This is sick :)... I would love to see this how you did this
     
  23. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    975
    Very VERY Cool! love the music and the ambient camera movement too!!
     
  24. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    920
    +1

    Your demo is really impressive!!
    Please, can you share with us any detail?
     
  25. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    Very pretty, would love to see what this looks like with Proflares too. Song is "Can't kill us" from The Glitch Mob. Love it. Preorder their new album
     
  26. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Thanks! Yeah! GlitchMob. I should have mentioned but the soundtrack came with an updated player
    ProFlares would indeed be nice. Probably it will make it look like a J.J. Abrams flick...which might be a good thing :D
    Would love to try them. Looks like a quality product but 76$ is still a bit expensive

    There are no secrets. I just dragged and dropped the GlitchMob.mp3 = instant awesomesauce :D

    My sciFi tiles are a bit polyheavy. Because there is no real lightsource in the scene, I used forward rendering + ol' school quality antialiasing. Without it, all the geometry details would be extremly noisy.
    The "lights" are self illuminated materials castings light to a lightmap. Subtle but it's there.
    Reflections are marmosets box projecting magic. The room is quite big so there's some very visible stretching on the ground.
    The rest is my classic post fx mayhem. Color ramps, vignette, chromatic aberration, Bloom, more Bloom etc :)
     
  27. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    It looks pretty damn realistic... I was actually wanting to know how to bake the room with Box Projection turned on. The reflections look very even
     
  28. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    Yeah I suppose it is a little pricy but I get the feeling it's one of those essential lighting tools, the best bit is each flare uses only 1 drawcall each so i'll be feeling free to lather them on thick.
    As soon as I saw your little demo scene there I started having a poke around your work with interest, you're a very talented man, keep it up!
    Particularly love your tumblr page :)
     
  29. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    Sorry for the odd question but, what is box projection exactly?
     
  30. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    My workflow was...
    1. putting a white diffuse map on it and bake a lightmap. White to have a bigger color range.
    2. Setting up Skyhop, bake a probe from selected. (Cam in the middle of the scene)
    3. Assigning the Box Beta shader, toned it down to dark grey, assigned the reflection, set up dimensions etc
    4. Baked another probe from selected with visible reflection...to have reflections in my reflections.
    5. instant wormhole :D

    Monkeyscience could probably explain that on a tech level. The standard approach would be spherical cube maps.
    This vid shows pretty good, what they are doing and why the don't really work http://www.youtube.com/watch?v=Bvar6X0dUGs
    Not sure if parallax corrected is just another term for box correction but the result is similar. The difference to standard cube maps is a box, that uses the dimension of the room, to project the reflection on it. This way it fits to a wall instead of behaving like a sphere, that gets carried around.

    ..and thanks for the nice words :)
     
  31. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    I see, well I'll be sure to do some reading up on the matter but cheers for the overview :)
     
  32. copenhagenjazz

    copenhagenjazz

    Joined:
    Oct 2, 2005
    Posts:
    45
    @Florian; That looks very impressive :) What lense dirt solution are you using?
     
  33. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    Thanks copenhagenjazz. It's this one with my own texture
     
  34. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    920
    Thanks a lot for the explanation! :)
     
  35. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,038
    Holy crap, Florian. That's insane. And extremely inspiring!
     
  36. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
  37. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    597
    Nice! Thanks for sharing. Made me smile!
     
  38. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    627
  39. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,484
    Dude, that scene looks like something out of Star Citizen.
     
  40. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    Any tips on using Skyshop terrain shaders with iOS?

    At the moment the simple terrain works with lighting but makes textures really blurry and using the other terrain shaders fixes the blurriness but doesn't get affected by IBL.

    I've been messing around trying to fix the problem but haven't come up with any solution other than use a mesh instead of Unity terrain which obviously works.

    Any help would be great :)
     
  41. Spartan_Boy

    Spartan_Boy

    Joined:
    Jul 8, 2012
    Posts:
    38
    THX so much for the insight Florian! Did you script your cam (for the breathe motion)by yourself or did you use an asset ?
     
  42. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    It's based on a procedural noise motion in 3dsMax, converted to a animated fbx. Position, Rotation
    Just put this on your player (Cam Position) and attach your Cam on it. It's christmas ! :D
     
  43. Spartan_Boy

    Spartan_Boy

    Joined:
    Jul 8, 2012
    Posts:
    38
    THX Florian, didn't realize you had done it with a noise controller, it works great. about your last scene with the bots, how can you have the lights reflecting on your surfaces ? is it the box beta shader ?
     
  44. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    It's just standard specular behavior :) Marmoset shaders don't use realtime reflections. The reflecting bot itself is just mirrored geometry
     
  45. FernandoRibeiro

    FernandoRibeiro

    Joined:
    Sep 23, 2009
    Posts:
    1,362
    I really liked this solution =D
     
  46. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Hmmm, this might be a bug. Do you have a screenshot to send us? And does the problem go away when you switch platforms to PC/Desktop?
     
  47. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    Yes switching back to desktop fixes the issue. Turning off graphics emulation also fixes the problem in the editor but testing on the iPhone 5 produces the same result. I can post a screen shot in a bit
     
  48. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    $terrainSS.jpg

    Here is a side by side comparison. All I am doing is switching between platforms Desktop / iOS. This is on the Mac running Unity 4.3.2 Pro.
     
  49. monkeyscience

    monkeyscience

    Joined:
    Dec 13, 2011
    Posts:
    705
    Standard cubemap reflection treats every texel of the cubemap as a backdrop infinitely far away. This is great for reflecting distant mountains and clouds but does not work well for small spaces, where reflections change greatly as you move around and get close to things.

    Box projection lets you assign arbitrary, rectangular bounds to the cubemap, and when the reflection math is being done every texel of the cubemap is treated as being on the walls, floor, or ceiling of this bounding box.

    In short, if you have a fairly rectangular room and match the bounds and orientation up to the room, a cubemap rendered from the center will reflect the walls, floor, and ceiling properly at any point from within the bounds. As reflective objects move around in the bounds and get closer or further from walls, the reflections will distort properly. The walls of the room can even reflect themselves properly, the floor reflects the walls and ceiling, etc.

    Box projection does not solve all spatial reflection problems. For instance a chair in the middle of the room, when rendered into the cubemap, would get projected onto one of the walls of the room. Its projected reflection on the floor would not line up with the chair itself. Reflections of objects outside the bounding box are also undefined, and hard to make look nice. Something you will notice if you try to move shiny objects from one box-projected room into the next.

    It is also possible to write projection math for other shapes. Spheres, for instance, give some of the look of spatially changing reflections without hard corners if your rooms are not strictly rectangular boxes.
     
  50. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    6,484
    This is very interesting... but wouldn't you need to bake a new map for each area? It doesnt seem like a very good solution for faking realtime reflections to me, is that the intent?
     
Thread Status:
Not open for further replies.
unityunity