Search Unity

[RELEASED] Super Fast Soft Shadows

Discussion in 'Works In Progress' started by Andy-Korth, Jun 5, 2015.

  1. luislodosm

    luislodosm

    Joined:
    Apr 26, 2016
    Posts:
    25
    Hello, I have this errors in the console when I click "undo" command or change other component after exiting play mode. Unity 2018.1.0f2 on Mac.

    Captura de pantalla 2018-05-10 a las 10.42.41.png
     
    Last edited: May 10, 2018
  2. luislodosm

    luislodosm

    Joined:
    Apr 26, 2016
    Posts:
    25
    Thank you. It works perfectly.
     
  3. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    836
    Hi there!

    I'm desperately looking for some sort of directional light (shafts+shadows) system, sprite based (that is, the sprite may have holes through which the light could bleed) and I was wondering if SFSS could possibly add such feature.
    This:



    is sort of the effect I'm looking for, but I'd need it to apply it to something more like the profile of a bridge, in a slanted orthographic setting (cavialier perspective). The light is supposed to be bleeding everywhere, shadowcasting only based on the bridge profile (and maybe some other foreground elements.

    I bought SFSS a while ago but never had such need. Do you think it what I'd need could be attainable with SFSS, now, or in the near feature?

    Best,
    Alex
     
  4. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    147
  5. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    836
    [OT] That's dope, thanks for making me discover it :)

    Are you suggesting to use a very far spotlight to fake a directional light?
     
    Last edited: Jun 7, 2018
    TanselAltinel likes this.
  6. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    That's the way we suggest to do it in the docs. SFSS doesn't have a dedicated directional light type.
     
    NeatWolf likes this.
  7. Ortan

    Ortan

    Joined:
    Mar 9, 2015
    Posts:
    1
    Hello. Got here such a problem (in the screenshots) on Samsung Galaxy Note 8.
    Gaps in the shadows occur not only between individual objects, but also between the vertices of one object. On other devices everything works as it should.
    Screenshot of the rendering settings in PlayerSettings I attach too (I do not know how important it is).

    Screenshot_20180606-221826_Pocket Rogues Ultimate.jpg Screenshot_20180606-221918_Pocket Rogues Ultimate.jpg Screenshot_20180606-221946_Pocket Rogues Ultimate.jpg Screenshot_92.png
     
  8. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    @Ortan I've had a couple people tell me that there are issues on the S8, but never got back to me when I asked for more info. Since that's the only hardware that has problems it seems likely it's a driver bug. I'm sure we can find a workaround, but can you send me some more info in a private message? (SFSS version, Unity version, Andriod version, etc)
     
  9. JeanBis

    JeanBis

    Joined:
    Feb 28, 2016
    Posts:
    2
    Hi there,
    I recently purchased this gorgeous plugin, but I ran into a problem.
    The "SFSample" script does not work as I would like, in the "FancyTreeExample" scene any value set to "Sample Position" results in this:

    S1.png

    The "Line Sample" is not displayed correctly, but if I change "Sample Position" at runtime (with the gizmo or from the inspector), it is displayed as desired:

    S2.png

    what am I doing wrong?
     
  10. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    SFSample works by duplicating the material when the scene starts. Making things live preview correctly in edit mode can be really tricky for a number of reasons, and I was never able to make WYSIWYG editing work for SFSample. You have to run to preview it. :-\
     
  11. JeanBis

    JeanBis

    Joined:
    Feb 28, 2016
    Posts:
    2
    I'm sorry, I forgot to mention it, both screens were taken during play mode u.u
     
  12. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    147
    Yeah, that's the way I'm using it. This game is now close to completion and the way I utilized SFSS was the day the game became more lively. I have changed little code and applied my system to create dynamic shadows.

    Shoutout to @Andy-Korth for creating this asset. It made a huge difference for our game.
     
    NeatWolf likes this.
  13. Rosa-Gao

    Rosa-Gao

    Joined:
    Dec 9, 2012
    Posts:
    13
    Hello, is any way can make Sprite Renderer overlay SF Light? Because I have foreground in my 2d game, I use SF Light as Player's flashlight. But I don't want to use shadow, I just want to overlay on top of SF Light.
     
  14. Dominic1978

    Dominic1978

    Joined:
    Apr 10, 2018
    Posts:
    2
    I was also wondering about the ability to order the lights in a specific layer so that it´s possible to have overlayed objects not effected by it.
     
  15. aquariusgx

    aquariusgx

    Joined:
    Jan 4, 2017
    Posts:
    1
    agree
     
  16. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    89
    I'd like to know, if there's a possibility to rotate the plane which projects the shadows on the sprites. I know the feature is being asked a few times. But I don't know if it's added yet. Because my isometric game uses a diagonal camera angle :/ And I can't change that. My sorting algorithm is based on the angle and I use native 3D collider. So I really can't use another angle for this approach. Thanks in advance =)

    edit: I tried to play around with the perspective example, but I move my objects on the other two axes. So I have to try rewrite the SFLight.cs to accomplish this behavior. Or is this feature on the todo list and will get implemented the next months?
     
    Last edited: Jul 1, 2018
  17. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    37
    Seems like the shadows are broken in Unity 2018.2.0f1. Anyone else having problems with that Unity version?

    My light masks seem to be clipping somehow causing the lights to be clipped. Everything was okay in Unity 2018.1.0f2.
     
  18. Derwish-pro

    Derwish-pro

    Joined:
    Oct 24, 2016
    Posts:
    2
    Textures stop shading when they touch the bottom of screen. Some objects at the bottom of the screen look raw (some without shadows, some without lights). Unity 2018.2.0f1. Please, fix it.
     
    Haapavuo likes this.
  19. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    37
    Yep. Still having problems with Unity 2018.2.0f2. No response from the developers. What's up?

    We are really close to our planned release date and wish to use 2018.2.0f2 + SFSS.

    I am using an orthographic camera with size 15 (occl. culling and MSAA allowed).

    SFSS uses Linear light blending, light map scale 8, shadow map scale 1.

    Here you can clearly see the clipping on the right side of the image:


    Also here you can see a weird rectangular artifact that wasn't there before (and both of these move with the camera):

     
    Last edited: Aug 1, 2018
  20. Derwish-pro

    Derwish-pro

    Joined:
    Oct 24, 2016
    Posts:
    2
    I confirm the presence of the same bugs in my project.
     
  21. Zehru

    Zehru

    Joined:
    Jun 19, 2015
    Posts:
    84
    Hello @Haapavuo and @Derwish-pro
    I'm using the same unity version as you and using SFSS as well, but my project is not having the same issues as your project is.
    So, I'd like to say that maybe, you should create a sample project replicating the issue and send it to the asset developer.
    Also, try checking your camera culling mask, parallax light on the SfLight Component and maybe the clear flags on your main camera/UI camera.
     
  22. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    151
    Hi there. I am trying to use unity's shader graph as well as this asset, but i as soon as i applied the scriptable render pipeline settings the demo scenes no longer work. Is there going to be support in future?

    Thanks
     
  23. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    110
    I'm curious about this as well. It seems like Unity is phasing out the built-in rendering pipeline.
     
  24. MedeirosMarcelo

    MedeirosMarcelo

    Joined:
    Jun 8, 2018
    Posts:
    1
    I'm using Unity 2018.1.3f1 and point sample is not working. I tested this in the tree demo scene by comparing with the same scene in Unity 5.6.4 (which seem to be working properly.) Is there an ETA for a 2018 update?
     
    y4my4m likes this.
  25. y4my4m

    y4my4m

    Joined:
    Jul 30, 2014
    Posts:
    3
    Have you found a solution to this?
     
  26. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    151
    I have not. I'm just not using the new pipeline now. which is a shame because i really wanted to use shader graph in my project as well. but its not a massive set back right now. hopefully it will be supported in near future
     
  27. y4my4m

    y4my4m

    Joined:
    Jul 30, 2014
    Posts:
    3
    You're not the person I asked the question to and I'm not sure it's even the same problem but ok :p
     
    Dominic1978 and Brogan89 like this.
  28. Gorgor

    Gorgor

    Joined:
    Apr 28, 2012
    Posts:
    49
    Is this plugin dead?
     
  29. y4my4m

    y4my4m

    Joined:
    Jul 30, 2014
    Posts:
    3
    Don't know if they're still updating it but it works with the latest version of Unity.
     
  30. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    151
    Hey I've just started to implement the lighting system in our game but there is a weird oddity with where the lighting is being rendered. It seems that its not full screen and even the texture cookies are cutting off on the left and right sides which differ from the texture which has a nice gradient fall off.
    I am using Unity 2018.2.2f1. Everything else is working quite fine though, it just seems to be the rendering script on the camera that needs to be updated. You can see what I mean in this video
     
  31. unity_zHFaHnEs2Lt1ng

    unity_zHFaHnEs2Lt1ng

    Joined:
    Sep 5, 2018
    Posts:
    4
    Hi guys !

    I wanted to know if it is working with Lightweight rendering pipeline or if I would have to modify lots of things to be operationnal ?

    Thanks !
     
  32. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    110
    It doesn't work with the Lightweird Rendering Pipeline yet, unfortunately. I'm hoping for an update as well.
     
  33. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    140
    My understanding at the moment is that supporting the new rendering systems would require a total rewrite of SFSS, and at this point, that's not feasible. There's still a lot of people using it in their current projects, but the income from the project definitely doesn't justify a rewrite. If anyone else can chime in with successful experiences of SFSS on the new rendering pipelines, that info would be really helpful! For now, stick to the legacy system.

    It looks like it's working pretty well in Brogan's video. Support in the scene view has always been a bit problematic, I believe there's a checkbox to turn off scene view rendering if the rendering effects are troublesome. It's probably better to stick to the game view for a sense of what it will actually look like. It does look like it's just the cookie that's messed up in 2018.2.2f1
     
    Brogan89 likes this.
  34. Brogan89

    Brogan89

    Joined:
    Jul 10, 2014
    Posts:
    151
    I can confirm that every works as expected in a build. However, game view in play mode isn't always accurate and the scene view is even worse (using 2018.2.8f1). It looks like a caching issue or something I'm not sure, I've tried deleting and Library folder but it didn't help so its probably not caching. On the up side, everything looks really good in a build and helps my scenes come to life, so I don't mind putting up with the inconsistencies, and I would still recommend this asset to others as long as you are happy not using the new scriptable render pipeline.
     
  35. DaviDeMo

    DaviDeMo

    Joined:
    Nov 13, 2017
    Posts:
    7
    Hi, Instead of a light I want to create a sun. Is it possible with this asset?

    EDIT: And ehm... is this working with tilemap? How can I add the material to a tilemap for cast shadow?
     
    Last edited: Sep 17, 2018
  36. TanselAltinel

    TanselAltinel

    Joined:
    Jan 7, 2015
    Posts:
    147
    @Andy-Korth

    Would you like to see how your great asset helped us shape up this game?



    Dynamic shadows in this game was achieved thanks to Super Fast Soft Shadows.
     
  37. _eternal

    _eternal

    Joined:
    Nov 25, 2014
    Posts:
    110
    @Andy-Korth I can live with Scene view inconsistencies, but I'm getting clipping in Game view as well, similar to @Brogan89's video. Game view screenshot: https://my.mixtape.moe/ptdrtd.png

    This is with the RadialFalloff texture that came with the asset, and I double checked that the pixels at the edge of the texture are indeed #000000. I'm on 2018.2.8f1. Perhaps it will render correctly in the build, but the clipping is not ideal, to say the least. It's fine when you're sketching out a scene, but it would probably make fine-tuning difficult because you can't properly preview what the scene will look like.
     
  38. DanielThomas

    DanielThomas

    Joined:
    Mar 30, 2013
    Posts:
    64
    I'm looking for a shadow solution for 2D projects, I see you can fake directional with a far away point light. But I'm curious, can you set the shadow length? Or will they always stretch all the way to edge when the light source ends?

    Thanks in advance!
     
  39. Dominic1978

    Dominic1978

    Joined:
    Apr 10, 2018
    Posts:
    2
    27D39B5D-6DE5-48E0-9488-57055C2F97E6.jpeg AC26F7F9-279E-439F-851D-2023152C689A.png
    Sorry for the late reply, I gave up on the package. Maybe this 30 euro package will pay off in a future project. If not, I know not to ever buy anything from the creators ever again.

    My game is pretty abstract/cartoony, so i created the light as a semi-transparent png and removed the package from my game.

    It means I don’t have the shadows, but for my game it worked.
     
    Last edited: Oct 21, 2018
  40. KJoanette

    KJoanette

    Joined:
    Jun 8, 2013
    Posts:
    58
    How sad that this is likely abandoned. I would have loved to see this in action.
     
  41. DaviDeMo

    DaviDeMo

    Joined:
    Nov 13, 2017
    Posts:
    7
    Hi, I want to make a global light with shadows that are not too much big. Any suggestion?
     
  42. DaviDeMo

    DaviDeMo

    Joined:
    Nov 13, 2017
    Posts:
    7
    Ok, what I really need is a "sun" :D
    Can you help me? I have seen you helped someone out with making a sun!
    The only problem I have is that my map is big... so maybe far away object will have a too much big shadow?
     
  43. zh4r0naX

    zh4r0naX

    Joined:
    Oct 30, 2016
    Posts:
    24
    I would like to buy this asset, does it work with the latest unity beta ? Or are there any problems, i need all features to work perfectly.
     
  44. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    @zh4r0naX It hasn't been tested with the latest beta yet. If it doesn't work, then it would be because of Unity bug(s) that we would neither be able to fix or take responsibility for. We already have workarounds for shader compiler bugs or specific platforms on older release versions. It's impractical to start making workarounds for betas too.
     
  45. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,357
    Seems to be working fine.
     
  46. Saijmon

    Saijmon

    Joined:
    Aug 8, 2017
    Posts:
    2
    Hey, is there a way to make this work for BoxCollider2D? I'm using Tilemaps and I don't have an option to copy/paste the shadow polygons, unless I use several SF Polygon scripts.
     
  47. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    @Saijmon I think it wouldn't be too bad. It's been floating around on the todo list for a while, but we've never quite gotten around to it. I think I'll have some time to look into it next week after new year's.
     
    Lars-Steenhoff and Saijmon like this.
  48. TreseBrothers

    TreseBrothers

    Joined:
    Jan 14, 2016
    Posts:
    4
    Do you have a stand-alone copy of this that works in Cocos2DX?

    Sorry, this thread is huge and I didn't read it all to see if this has been asked :(
     
  49. MercurialKid

    MercurialKid

    Joined:
    Aug 30, 2018
    Posts:
    21
    Hi - just pre-sales checking: is this asset working with 2018.3? And is it still live and being supported? I've noticed few people asking this, and want to check before purchase.. Thanks
     
  50. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    263
    Yup. The latest version became available a little over a week ago even.