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

Volumetric Clouds

Discussion in 'Assets and Asset Store' started by Eideren, Oct 20, 2014.

  1. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Banner.png
    Asset store link

    // Description
    This is a fullscreen shader which uses raymarching through a texture to render clouds on screen.

    // Contains
    -A bunch of shaders and duplicates of Unity's cginc for compatibility's sake
    -A c# script to attach to a camera
    -Two materials, acting as presets for low and high quality
    -A manual
    -Four texture variant
    -A bunch of editor scripts for the material inspector

    // Requires
    -GPU supporting Shader Model 3.0 (most GPU made after 2005)
    -Unity 4.0+ (Older versions won't compile).

    // Limitations
    -Performances: this can be a fairly heavy shader, performance hit is comparable to an ambient occlusion postFX but there are a ton of controls provided to reduce it.

    Here's the online Guide.

    // Media
    ezgif.com-optimize.gif

    VC3_5_Sea.png
    VC3_5_Customisation_Before.png
    VC3_5_Customisation.png



    Change log
    // Version 3.5
    Shape
    • Cloud Flatness, controls the curve of the cloud to puff them out.
    • Old 'alpha' from 2.x is back as Local Scale, scales cloud vertically within their boundary.
    Shading
    • Direct and Indirect lighting computation can now be entirely disabled to help performances.
    • Base color is now effectively an albedo and Shading color now caps the minimum color.
    • Changed normal intensity to shading intensity.
    • Slightly changed how normals are calculated to retain more details.
    • Scaled direct lighting and point light contribution by density to more accurately represent real lighting model.
    • New silver lining feature and controls.
    • Sky Occlusion Normalized to manipulate the size of the occlusion gradient.
    • Occlusion Tint which, has its name implies, tint the occlusion.
    UI
    • Tons of property names have been changed to more accurately represent what they do.
    • Minor UI presentation changes.
    Raymarcher
    • Changed how each samples are blended together, it now uses a proper front to back blending.
    • Changed Step Size to min step size.
    • New 'Step Parallel Mult' control, this scales the length of each steps when the camera 'looks' towards the horizon, helps with rendering distant clouds.
    Breaking changes can be opted out of by clicking on the 'New Shading' toggle.

    // Version 3.0
    • Rewrote the raymarcher entirely resulting in lower amount of steps required to render in the same or at a higher quality.
      • "Step Skip" and "Step near surface" have been replaced by a single different "Step Skip" property which adapts far better to cloud volumes.
    • Most of the lighting as been re-written as well and as such properties related to those have all changed how they influence rendering, affects the following properties: base color, shading color, normal map, normalized and normals intensity.
    • "Depth intensity" has been changed to "Sky Light Attenuation" and expanded into a color property.
    • Indirect lighting is now independent of the normal-map switch since it is no longer influenced by it.
    • New property : "Post Blend", Controls how Distance Blend is computed, refer to the manual for more information.
    • New property for Screen Space Shadows : "Blend out of shadowmap", toggle to filter screen space shadows out of the shadowmap.
    • New property for Screen Space Shadows: "Volumetric", toggling it on makes shadows behave like previous versions, off will just use a projection instead which is far cheaper and slightly worse looking.
    • Renamed Density to coverage, it more accurately represent what the property controls.
    • Renamed alpha to density, same as above.
    // Version 2.4b
    Fix :
    • Screen-space shadows
    // Version 2.4
    Additions/Modifications :
    • Implemented spherical coordinate mapping as a secondary sphere mapping technique.
    • Axis of alignment selector, you can now define which axis you want the cloud plane to align to.
    • Clouds self-shadowing.
    • Basic scene-view controls.

    Fix :
    • Normals are now more accurate at high density as well as under grazing light.
    • A lot of minor shader and editor code refactoring.
    • Shadows casting onto the far plane.
    // Version 2.3
    Added/Modified :

    • Lighting computations are at least twice as fast now at the cost of an almost un-noticeable visual degradation.
    • Slight improvement of some raymarching functions leading to a very small overall performance improvement.
    • Variable to control clouds's bases flatness.
    Fixed :
    • "Holes" in Single Pass VR.
    • Compatibility with Unity 5.6.
    Removed :
    • Skip pixels controls ; was degrading most GPUs performance instead of helping because of how GPUs are architectured.
    // Version 2.2a
    Fix :
    • MainLight error, support for Unity 5.5 standard shader.
    // Version 2.2
    Added/Modified :
    • Support for spherical mapping, perfect for atmosphere and planet rendering.
    • Support for point lights for unity 5.4 and above.
    • Supports unity 5.0 and above properly.
    • Rendering shadows only is now possible.
    • Rewrote access to Unity's GI, should need no to minimal support for upcoming unity releases.
    • Created a new script called "CloudsEvent", fires user defined events when entering and exiting clouds.
    • Changed material display to Plane instead of sphere.
    • Added multiple fields to give more controls over clouds :
      • "Normals Intensity" under normal map.
      • Spherical mapping controls : position and stretch horizon.
      • Orthographic Perspective, fakes perspective when rendering in orthographic.
      • Render plane offset from camera's clipping plane.
    // Version 2.1
    Fix :
    • Issues with draw distance being capped at one thousand.
    • Toggle drawer drawing incorrectly on first inspector draw.
    • Lighting issues caused by very high cloud density.
    Added/Modified :
    • File replacement for Unity 5.4+
    • Texture based density.
    • Modified light attenuation inside clouds and exposed controls for it.
    • Further cleaned up the code.
    • Slightly reduced branching as well as operations on shadow sampling.
    // Version 2.0b
    Fix :
    • Mac and OpenGL platforms compilation.
    • <5.0 Shader Model compatibility.
    // Version 2.0
    Fix :
    • Texcoord not written by vertex shader.
    • Random compile errors related to GI.
    Features dropped :
    • Object space Mapping
      With the new rendering system, object space is actually local to your camera which is not very useful, you still have access to x/z position offset under Cloud Transform z/w values
    • Normals Direction inverting
      It caused confusion and was never used anyway.
    • Shader Forge Nodes
      Instead of giving you the nodes I'll actually write a tutorial on raymarching with shaderforge on the wiki in a couple of days, this means that you'll have access to it without the need to buy my asset.
    • Curved rendering
      Most of the optimizations I took to render the clouds at a decent framerate don't work as well if I render it curved, performance hit is more than 4 times the planar one.
      I still have a second way to curve them to try out but that's for another update since I don't really have much time left.
    New Features :
    • Slice based volume rendering dropped in favor of raymarching, this change comes with :
      • Better performances
      • Higher overall quality
      • Ability to render clouds from any angle
      • A whole bunch of variables to get an higher control over performances and quality
    • Ability to skip heavy calculations of 1/2 or 1/4 of the screen in a grid to help performances
    • Screenspace shadows

    Post below from page 1 through half of page 5 don't reflect the current state of this asset. Version 1.x had a geometry based rendering whereas 2.x uses ray marching, a ton of design issues encountered by the first are resolved by the later.
     
    Last edited: Feb 18, 2021
  2. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    looks interesting, can we get web demo??
     
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    The slight blur is emulating motion blur as clouds move ? Can it be disabled ?

    Also do the clouds receive lighting from the sun as it rotates ?

    Thanks

    The system looks very cool
     
  4. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Oh that's a good point, i post my question too soon without even let the gif finished loading.
    +1 for disabling the motion blur..
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    I suppose having it as option would be cool, but i agree it should be possible to disable for sure.
     
  6. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @nasos_333 and @rea
    The clouds aren't actual 3D geometry, it's a bunch of quads stacked on top of each other with a space between them depending on the volume size and the number of slices.
    The "motion blur" is actually the space between two slices, the more slice you give the shader, the less this effect will be visible.

    @nasos_333 Yes the clouds are lit using a normal map, the light color and intensity affects the clouds as well.
     
  7. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    Great, thanks.

    What will be the price of the asset ?
     
  8. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @nasos_333 I am not quite sure yet, what price would you give for this asset ?
     
  9. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,286
    That depends on a lot of factors and the performance/looks of a playable demo, preferably showing the lighting as well, so is rather early to tell.
     
  10. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    This package is now officially released and the main post has been updated.
     
  11. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Purchased it and I am working with it now! Looks like EXACTLY what I needed!
     
  12. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @garyhaus Thanks a lot for the kind words ! If you have any issues dont hesitate to report them in this thread, i'll do what i can to assist you.
     
  13. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    573
    is this package on the unity store
     
  14. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @paulojsam My bad, I forgot to had that to the 1st message, thanks.
     
  15. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Ok so first test with system in place. This is a 'test arena' I have for my project. Not much is optimized and there are a few random weird props in the scene. That being said... for my skies this ROCKS!!!! This is coupled with Skyshop and Time Of Day for atmosphere.
    Image followed by a build(OS X and Windows versions). Standard FPS controls.

    CAN'T SAY THIS ENOUGH! THANK YOU!

    OS X build!
    Win64 build!

    Gary
     

    Attached Files:

    Last edited: Dec 4, 2014
  16. MIK3K

    MIK3K

    Joined:
    Sep 10, 2014
    Posts:
    144
    What's in the package? Download size is really 470.5 MB?


    Edit - And I should say they look great. If you found a way to do cloud shadows that would be amazing.
     
    Last edited: Dec 4, 2014
  17. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @MIK3K Yup, that's the real size. The reason behind that is because there are four 4096^2 RGB+A channels raw PNG texture, it was that or giving you compressed texture.
    I added the source of those textures has well, two heightmaps which are in the Alpha channel of those four textures and two normals which are in the RGB channels, just to give you an idea of how you are supposed to make a custom texture for this shader.
    Of course, you could just compress them yourself after you download them or delete what you dont want, the "Sources" folder will be useless if you dont need any custom texture.

    I might try to use a projector to cast those shadows, it still won't be able to receive shadows though.

    @garyhaus Wow, your scene looks really nice, I love the setting and lighting, well done !
     
  18. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    This looks great, i suppose i have a couple of questions if you don't mind too much

    Firstly, i own several cloud assets but they're mainly intended for powerful gpus and directx11, i'm looking for something that's much lighter for webgl, so do you have any information on how they behave under ogles 2.0?

    Secondly, is the shader uncompiled source available? I'd love to have a tinker with it especially as i'd like to have the clouds move and be lit in other ways, most particularly being able to rotate rather that move in a single direction (eye of the storm) or maybe this is scriptable along with using cloud textures i create myself? Would it be possible to add textures to tint or modify density at particular locations?

    Great looking thing anyways! I'll prob grab it quite soon
     
  19. MIK3K

    MIK3K

    Joined:
    Sep 10, 2014
    Posts:
    144
    You have to forgive my noobishness - I saw the 4096 textures at 130 mb each. About the shadows - just meant like you said about the projecters letting the clouds cast a shadow on meshes or terrain. I can't find anything that does that and I'm too dumb to figure it out myself. :confused:

    Anyway, thanks for the great clouds. They looked funny at first and then I realized my directional light was set to a yellowish color. Now they are big fluffy white clouds just like your vid.
     
  20. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @lazygunn The shader is in itself quite lightweight, i got a low end graphics card and i dont see any significant impact on the perfs with the shader alone, the impact comes from the number of slices you generate with the c# script included and the number of pixels of clouds you have on screen.
    This asset could probably run on a phone if it supports SM3, has a low slice count and a somewhat decent texture size, didn't test it though since i dont have any devices atm.
    I didn't compile the shader, nor the c# script so you can modify them has much as you want. There isn't a lot of complex math involved, if you need any help figuring out what does what, send me a pm and i'll assist you.

    If you know a little bit about shader programming then you could probably do it yourself quite easily for the tint and density part but the eye of the strom part will be a little lot harder, this post should give you an idea of where you should start :
    http://forum.unity3d.com/threads/sh...sed-shader-editor.222049/page-49#post-1868263

    Love your stuff by the way !
     
  21. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @MIK3K It's alright, dont worry about it !

    Ok so i tried to create a custom shader for that projector thing and it really isn't practical at all for this case.
    I got three different problems with them, the first one beeing that once your geometry has any vertex offset in a shader, it apparently doesn't track that and project on the geometry as if it didn't move at all.

    The second one has to do with how it handles cutout/culled pixels on a mesh, even if the pixel isn't visible and shouldn't be, it adds the projection on top of it, which in the case of a grass billboard for exemple, shows the entire plane.
    Untitled-1.png

    And the third one is the fact that this projector can't easily reproduce a 1:1 real cloud size to projected cloud size because the size of the projection depends on the distance and FOV of the projector and in the case of an orhtographic one, it's size.


    So i think that after all of this, ill just try to create standard shadows and optimize them as much as i can.
     
  22. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    You could try use a light cookie
     
  23. Ebolinux

    Ebolinux

    Joined:
    Jan 23, 2014
    Posts:
    117
    Looks pretty nice. Have been looking for quite a while for some 3d ish clouds.

    Can the clouds be put into a certain area say around a mountain range? I have been searching for a way to get a sort of moving fog/cloud effect around larger mountains. Like you might see in skyrim mountain rangers for example?
     
  24. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @lazygunn Cookies are just textures, right ? So i'll have to rewrite a texture using c# at a fixed interval with the exact same style as the shader, that'll be pretty expensive on the cpu.
    I'm currently writting the shadow caster, i'll see how it goes from there.

    @Ebolinux Sure you can, they'll clip through it if you use only one stack though.
    You could wait 'till the next update if clipping is a problem, i'll add a depth blend (same effect has unity's soft particles) that should fix any of those issues.
     
    Last edited: Dec 5, 2014
  25. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    What is coming in the next update:
    • More optimisations.
      • You can now choose if you want the shader to perform complex lighting calculation or none at all.
      • Cleaned and rewrote the shader code
        • a lot of useless variables and computations removed - reduced the performance footprint by +-50%.
        • Added multicompile for functions used below.
        • Commented out the exclude_renderers since i can't test this shader on the various devices i excluded.
    • Custom color for the lit part and the shaded part.
    • Casting shadows is now supported, dont expect that to be lightweight, it cost more than 5 times the initial cost. (it already has been optimized, i am looking into other ways to optimize that further)
    • Depth blending now supported as well, i suggest you to not use it if you dont have anything going trough clouds since it does have some performance cost.
    • Zwriting turned off, didn't give enough for the cost it had, you can still turn it on if you desire by changing the "ZWrite Off" to "ZWrite On" in the source shader code.
    If you have any request, feel free to post them here, i'll do what i can to implement them.

    The update will be live in more than 4 days, one day to see if someone has a request and 3 for the asset store to publish the update.
     
    Last edited: Dec 5, 2014
  26. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    HUZZAH! Looking forward to those tweaks Eideren!

    Gary
     
  27. MIK3K

    MIK3K

    Joined:
    Sep 10, 2014
    Posts:
    144
    That looks like a great update. I got everything I wanted :)
     
  28. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    I cannot praise this cloud system enough, especially considering the price tag. I've paid quite a bit more for cloud solutions that severely underperformed comparatively. I've been messing with the clouds for a couple hours now, just to see the variations I can come up with, crazy stuff. The only thing that I really wish could be implemented is to have the option to have them render in a dome somehow. Even with the distance set pretty high, it's hard to make them blend nicely on the horizon. Maybe there's a simple way to do this and I'm overlooking it? I'd love to hear some tips about how others are integrating it.

    Anyway, awesome job Eideren! I'll definitely be on the look out for more of your stuff in the future :)
     
  29. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @ZedalisDesign Thank you so much ! I will see what i can do for the dome request, I think that it would probably perform badly (more vertices per slices to curve them) but i'll do some test to see if it is playable. In the meantime, you could use the fog color in your render settings with a color close to your sky to have a somewhat okayish blending.

    I'll add an option to make the clouds more transparent towards the edge of the mesh in the next update, that should do the job.
     
  30. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @ZedalisDesign The curved mesh performed a lot worse, I'll see if i can find something else to fake that but I can't promise anything.

    1.1 has been uploaded, it's now in the hands of the asset store guys, here's the patch note :
    Version 1.1 :
    New Features
    • Custom color for the lit part and the shaded part.
    • Casting shadows is now supported, dont expect that to be lightweight, the performance cost is around 5 times greater than without it enabled. (it already has been optimized, i am looking into other ways to optimize that further)
    • Depth blending now supported as well, geometry going through clouds will create a nice hole like effect around them when activated.
    • Position blending added, transparency increases towards the edges.
    • Standard and Normalized dot product choice.
    Shader Optimizations
    • Cleaned and rewrote most of the shader code.
      • A lot of useless variables and computations removed.
      • Added Multicompile to toggle computations of the following functions and wrote a custom inspector to support them.
    • Complex Lighting, normalmap and base shading can be ignored.
      • Depth Blending, texture grab, projection and alpha calculations can be ignored.
      • Position blending, gradient generation and alpha calculations can be ignored.
    • Zwriting turned off, didn't give enough for the cost it had, you can still turn it on if you need it by changing the "ZWrite Off" to "ZWrite On" in the source shader code.
    Texture Optimisations
    • Compressed the textures outside unity with a non-destructive algorithm - they are now roughly half their original size.
    • Changed the compression method inside unity's importer to RGBA 32bit, the other compression method gave worse results than lowering the texture resolution.
    • Toggled on Bypass sRGB Sample in the texture importer - Increase texture computation accuracy.
    Others
    • Commented out the exclude_renderers since i can't test this shader on the various devices I excluded.

    As always, if you have any request, feel free to post them in this thread !
     
  31. electroflame

    electroflame

    Joined:
    May 7, 2014
    Posts:
    177
    Wow, that sounds great! I've been following this asset's progress for the past week or so and I'm really liking what I'm seeing. Will definitely pick it up soon -- $10 is really good value.
     
  32. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    Just updated to 1.1 The blending options don't really seem to have any effect in my scene. I'm also receiving this compiler error, using Unity 5 B16.

    Assets/VolumetricClouds/Scripts/CloudInspector.cs(3,7): error CS0246: The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?


    On a side note, I think the clouds add quite a bit to the atmosphere. Thanks!
    https://www.dropbox.com/s/w777en3gvvpi8en/AMUN Unity 5 Test.jpg?dl=0
     
    Last edited: Dec 13, 2014
  33. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @ZedalisDesign Unity 5 seems to require you to put custom inspector script inside a folder named "Editor", do that for the script named "CloudInspector". Now your material should have four new toggle boxes, toggle on DepthBlend.

    Your camera has to render a depth texture for the depth blend to work, so either you change the render mode to deferred which will render one by default or you render one at runtime using this code :
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. [ExecuteInEditMode]
    5. public class WriteDepthTexture : MonoBehaviour {
    6.    #if UNITY_EDITOR
    7.    void OnDrawGizmos(){
    8.      setCameraDepth();
    9.    }
    10.    #endif
    11.    void Start(){
    12.      setCameraDepth();
    13.    }
    14.    void setCameraDepth () {
    15.      if(Camera.main != null && Camera.main.depthTextureMode == DepthTextureMode.None)
    16.        Camera.main.depthTextureMode = DepthTextureMode.Depth;
    17.    }
    18. }
    Wow, you did a fantastic job on the mood of that scene !
     
    Last edited: Dec 14, 2014
  34. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Shader not compiling after upgrading to 1.1(on Mac 4.6). Please help.
     
  35. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @garyhaus I PMed you !
    If anyone else is experiencing this error, pm me and i'll give you the fix.
     
  36. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Update incoming, this new update will include a shader forge node tree based on the original shader.
    It'll also fix two compatibility issues, the compiling error on Mac and the Custom Editor on Unity's 5.x beta.

    Do you have any request before I upload it ?
     
  37. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    Minor thing, I seem to be getting a deprecated shadow caster warning when using Unity 5.
     
  38. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Could you give me the exact error reported by Unity's console ? I'll try to get my hands on the beta but I can't promise much ...
     
  39. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Nevermind, it's in the patch note of the beta, I fixed it.
     
  40. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    AMUN Desktop Background.jpg Sorry I didn't see your reply last night. I don't want to hijack your thread but I've been wondering for a while why there has been such a disparity between what was showing on my monitor and other devices I've been looking at. Turns out I never calibrated my monitor properly :/ I've got a new screenshot for ya, showing off your cloud shader. I absolutely freakin' love it.

    I also wish every developer was on top of their game and willing to introduce more features as requested like you are. Props man!
     
    nasos_333 likes this.
  41. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @ZedalisDesign
    Thanks a lot !
    It's alright, dont worry about that, you are welcome to hijack it as much and as often as you want :).
    Its so satisfying seeing something you made beeing used in such a creative way !

    You really are getting that golden aesthetic going on, it's quite novel seeing such a bold choice of colors, i really do like it !
    It reminds me a bit of that 300 movie but yours is far classier, the 300 one is too artificial, it's probably to blend the cg and real parts together but the result just looks messy.

    I am proud of what you could achieve with this asset !
     
    Z43D likes this.
  42. hampa

    hampa

    Joined:
    Nov 12, 2014
    Posts:
    5
    I'm using unity 4.61 and the cloud material doesn't seem to work, it is just the default pink color. Anything I can do to fix it.
     
  43. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @hampa
    Does Unity report an error in the console ? It should work under 4.61, I'll download that version right now just to be sure.
    What platform are you running it on ? Is it a Mac ?
     
    Last edited: Jan 9, 2015
  44. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Package updated to 1.2, official version log :
    New Features
    • Created a Shader Forge node tree from the original code.
      • Shader Forge doesn't support multicompile, functions relying on it aren't connected but still exist in SF's window.
    Bug Correction
    • Custom Editor functions now compatible with Unity's 5.X beta
    • Fixed compiling error on Mac
     
  45. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    Update 1.3 almost done ! Guess what's coming ?

    So... I rewrote how the planes are generated and now the script can generate curved planes, you can control the curvature however you like, the shader seems to handle them quite well.
    @ZedalisDesign yeah, I know, your request took a while ... sorry about that !

    Shadows are finally useable, you have to use a second mesh and a specific shader but it's really fast compared to the old one !

    I also fixed an error with the normals calculations in the shader, it shouldn't shade the wrong direction when the lighting is horizontal.
    I hope you like those, i will upload them tomorrow. Since unity takes more than 3 days to review them, they'll probably be available next week.
     
    elbows likes this.
  46. Z43D

    Z43D

    Joined:
    Jan 2, 2013
    Posts:
    100
    I know what I'm going to be up to next week! Thanks!
     
  47. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Thanks Eideren! Looking forward to the update with curvature. Can you look at 1.2 under 5.0 Beta 19? The edge blend is doing nothing... (on mac version)

    Thanks,

    Gary
     
  48. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @garyhaus That's really strange, there's nothing special about how edge blend is calculated, are you using the standard hand written one or the shader forge one ?

    You might be talking about depth blend ? In that case, check in the player settings if unity is rendering in forward mode, you might need to render a depth texture. The script attached to this post should do the job, just put it in your scene wherever you want.
     

    Attached Files:

  49. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Doesn't work in Deferred?
     
  50. Eideren

    Eideren

    Joined:
    Aug 20, 2013
    Posts:
    309
    @garyhaus Deferred already creates one by default. You got anything special in the console ? Maybe a warning ?