Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

[RELEASED] Super Fast Soft Shadows

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

  1. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    Super Fast Soft Shadows is currently on sale. Get it while it's hot! https://www.assetstore.unity3d.com/en/#!/content/38682

    @Haapavuo Sorry about the cookie texture confusion. We didn't realize our colored light cookie changes broke some texture configurations and it sort of got rushed to release along with the Unity 5.6 fixes. :-\

    On a somewhat exciting note, I've potentially come up with a way to do normal mapped lighting in SFSS using Fourier series instead of forward rendering. It should be also have good performance when rendering many lights, since an object won't require a separate rendering pass for every light. It, won't work for sure on GLES 2 mobile devices, but I'm optimistic about performance on Metal/GLES 3 capable devices.

    There's some more information on how it works here: https://www.shadertoy.com/view/ld2cW1
    [​IMG]
     
    Zehru and Haapavuo like this.
  2. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    Was wondering, how difficult would it be to not render any lights or light cookies when inside a fsplolygon? Where should I start about doing that? Any pointers are welcome. Thanks!

    Also, I wanted to praise your work, my game wouldn't look half as good if it wasn't for this!
     
  3. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    We just got a bug report where a user was getting garbage shadows when excluding polys and lights using the Shadowed Layers feature. The fix is to add the if and continue to SFLight.cs, line 135.

    Code (CSharp):
    1.     public Mesh _BuildShadowMesh(Mesh mesh, List<SFPolygon> polys, float minLightPenetration){
    2.         var segments = 0;
    3.         for(int i = 0; i < polys.Count; i++){
    4.             if( (polys[i].shadowLayers & this.shadowLayers) == 0){
    5.                 continue;
    6.             }
    7.             var poly = polys[i];
    8.             segments += poly.verts.Length - (poly.looped ? 0 : 1);
    9.         }
    10.  
    You don't really need to worry about this unless you're using the shadowed layers in your project and seeing problems with them. This fix and cleaning up some of the 5.6 warnings will be in the next point release.
     
  4. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @Lechuza Do you mean when a light intersects a polygon, the shadows can go haywire? Unfortunately there really isn't a good solution to that other than not letting lights go inside of polygons. I don't really know of a lighting system at all that does handle it, properly, or what the "proper" way to handle it is. :-\
     
  5. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    I just wanted to say thank you for such a great system you guys have built here. I particularly found it really easy to use and a breeze to integrate with other systems in our game, specially how easy it was to create SFPolygons from the collision data created by the Tilemap System. Lights are really easy to configure and setup too!

    Here is an in development screenshot from our game, hope you guys like it!

    [​IMG]

    Addendum:
    Couldn't help to make a comparison screenshot with the SFRenderer enabled and disabled. Let's play a game, you have to guess on which side it is enabled :D

    [​IMG]

    [​IMG]

    What a difference it makes!
    Thanks again for such a wonderful asset and a fast and efficient support!

    -The Aphellion Team
     
    Last edited: Apr 27, 2017
    Andy-Korth likes this.
  6. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    Very nice! :D Your art is good by itself, though the shadows certainly add a lot. Maybe I'm just biased though. ;)
     
  7. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    Is there a way to have shadows on any XY plane, not just the one where Z == 0?
    Working on orbits right now and they are on 3d, the spaceships normal always is (0, 0, -1) though, so it always looks along the Z. Just wondering if there's anything I can do about that? Parallax lights don't seem to work on my case. The camera always needs to be on Z < 0 to see the shadows.
     
    Last edited: May 5, 2017
  8. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    Unfortunately not yet, though it's basically at the top of the to do list at this point.

    I'm currently mildly crunching on a console contract for my day job, and we have a deadline coming up in 2 weeks, so I'm unlikely to look at it before then. Maybe @Andy-Korth wants to take a crack at it though. ;)
     
  9. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    Happy to know that it is planned and on top of the list! You guys are amazing! I'll wait for one of you to take a crack at it, you will definitely do a better job than what I can come up with messing around with it, so I will wait. Good luck with the contract!
     
  10. Epsilon2

    Epsilon2

    Joined:
    Apr 24, 2016
    Posts:
    7
    Hello, guys! Thanks for your great asset again!

    I am using it for about an year and I feel it very wonderful and confortable to use.

    One question: how can I have additional "stencil mask" input texture for SFShadowed and SFUnshadowed materials? I need to have my Sprites initially cutted by mask texture and then correctly lighted by SFSS.

    Do you have shaders modified for additional mask or may you tell me how can I add this thing?

    My first idea was to get your SFShadows shader and add stencil mask support to it. But I am very bad in shaders and also I think you could be already have better solution for this.

    Thanks.
     
    Last edited: May 13, 2017
  11. Haapavuo

    Haapavuo

    Joined:
    Sep 19, 2015
    Posts:
    18
    Awesome! :) Any news on that normal mapping feature? Will you be implementing it into SFSS?

    Also, are you going to fix the cookie texture bug any time soon? I am still waiting for a solution to fix the problem.
     
  12. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @Epsilon2
    Do you mean hardware stencil masking like in the UI system, where a separate game object masks your sprite? Or do you mean just having a second alpha texture on the material that also masks the sprite? Stencil masking is kinda complicated to do, your best bet would be to look at how the UI system does it and modify that to your needs. Adding an extra alpha texture would be a few lines of changes, I could walk you through that.

    @Haapavuo
    Yeah, I'm pretty excited about the normal mapping feature, but it's going to take a while. I have to rewrite about half of SFSS to do it, and I'm coming up on a lot of deadlines on a console game project at work. It's also sort of blocked by a couple Unity bugs with rendering to array textures. Until that's fixed, it would have to be implemented in a really inefficient way. :( When the game ships in August, I'll have some free time to work on it, and hopefully the Unity bugs will be fixed too.

    As for the cookie bug. You just have to change your texture import settings like was discussed earlier (as RGB(A) instead of an alpha texture). The "bug" was that we meant to make the transition seamless, and it's too late for that...
     
  13. davrm

    davrm

    Joined:
    Jan 31, 2017
    Posts:
    2
    Hello guys,

    First of all, tell you that you have a fantastic asset which is helping us to create a very good game. I was wondering how it would be possible to change the code so that the ambien light was a grayscale while the light zone continued to have color, like a type of fog war.

    Example:

    Original:
    [​IMG]

    With GrayScale:

    [​IMG]

    Thanks
     
  14. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    It would certainly be possible, but you'd have to modify the SFSoftShadow shader.

    Off the top of my head, you'd want to replace this line:
    color.rgb *= (lerp(light, _SFAmbientLight, _AmbientOnlyMix) + _Glow) *_SFExposure*color.a;

    with something like this:
    float grey = dot(color.rgb, float3(0.3, 0.6, 0.1));
    color.rgb = lerp(grey.rrr, color.rgb, saturate(light.r));

    Basically it uses the light level as a mask to let the color through. So you'll want to use plain white lights, and no ambient. You could also use something like the code above to make a variation that fades the alpha of a sprite that isn't lit. If you want to mix this effect with regular lights, that will require a lot more custom modification, but it could also be done.
     
  15. davrm

    davrm

    Joined:
    Jan 31, 2017
    Posts:
    2

    Thank you, Looks very good. Now I have to fix the problem you discuss with the alpha of a sprite that isn't lit.
     
  16. jonijoba

    jonijoba

    Joined:
    Jul 17, 2013
    Posts:
    7
    Hi!
    Got some troubles with the last version 4.0.2 on Unity4.7.2.
    Simply create a new project with only Super Fast Soft Shadows and try to launch a demo scene.
    I'm currently stuck on a black screen.
    Please let me know if you meet the same trouble, your asset is unusable at the moment.
    Thanks by advance for the solution,
    Joni
     
  17. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Hi jonijoba, Unity 4.7.2 is pretty old, the last version of Super Fast Soft Shadows that supported Unity 4 was the October 7, 2015 upload. Unity has changed their API very significantly since then, so new versions of SFSS definitely won't work in Unity 4.

    If you download the asset from within Unity, you should get the proper version of the asset for your version of Unity. I'm not sure if that actually works all the way back to Unity 4.7.2.

    The version number should be SFSS 1.4 for that unity version. If you aren't able to get that old version, let me know and I will send you the SFSS for your version of Unity. Keep in mind all the new features mentioned in this forum post aren't in the Oct 2015 version of SFSS.
     
  18. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Super Fast Soft Shadows version 4.0.2 was posted last week! It contains a bunch of warning fixes for Unity 5.6.x and adds a little bit of profiling information.
     
    Zehru likes this.
  19. Zehru

    Zehru

    Joined:
    Jun 19, 2015
    Posts:
    70
    Wow! this will be awesome!
     
  20. TFlippy

    TFlippy

    Joined:
    Nov 12, 2014
    Posts:
    20
    Is it possible to have SFPolygons with multiple sets of vertices, similiar to how does PolygonCollider2D have multiple paths?

    I'm trying to use it for a custom mesh-based tilemap system, where each 8x8 tile chunk is a GameObject with a polygon collider and a SFPolygon for shadows.

    I know that I can simply make a separate GameObjects for each "part" of the chunk, but having 33 GameObjects (in worst case scenario where the solid and non-solid tiles are in a checkerboard pattern) for a chunk solely to be used for shadows is a bit of overkill.

    Edit:
    Modified the plugin itself to support multiple paths per shape.

    [​IMG]
     
    Last edited: Jul 3, 2017
  21. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    Hmm. Shoot. We have a half finished branch of that sitting around somewhere. It was going to add multiple paths per polygon as well as the ability to switch between them like animation frames. Really looking forward to being done with my current contract so I have free time for personal projects again. :-\

    Glad you were able to modify it to your needs though. :D
     
  22. AndyKorth

    AndyKorth

    Joined:
    Oct 19, 2009
    Posts:
    17
    We're happy to let everyone know that the latest version of SFSS works in Unity 2017.1 without any migration and with no new warnings!
     
    Lechuza likes this.
  23. Tarienn

    Tarienn

    Joined:
    Sep 19, 2014
    Posts:
    1
    Hey, just wanted to let you guys know that after updating to 4.0.2, any sprite or mesh that I have scaled up, or not scale = 1, is not displaying correctly. All is well when the camera is still, but after the camera starts moving, all shadows move way too fast and glitch out. (See first attached) is a GIF with a fresh project with your asset imported unedited(the background is scaled 20).
    http://i.imgur.com/1Q1e3vV.gifv

    Second is a GIF of my project in which the background is scaled to 2. It worked perfectly fine with 4.0.1, but with the latest update, it is like this. I have tried using different renderers, Metal and OpenGL on my Mac and DirectX 9 and 11 on my Windows machine all with the same result.
    http://i.imgur.com/Tf7hkWw.gifv

    I hope this gets fixed soon, I love this asset and what I've been able to do with it :(

    But if it won't be fixed anytime soon, would it be possible to send me 4.0.1?
     
    TFlippy likes this.
  24. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    Was wondering how I can fix an issue I am having. Basically, when setting the SFPolygon opacity to something less than 1.0f, and the shape is concave I get weird shadow lines. Here is a screenshot:
    [​IMG]

    Any ideas how to fix that?
    Thanks a lot in advance!
     
  25. poliman

    poliman

    Joined:
    Feb 5, 2015
    Posts:
    12
    Yes, I have the same problem with moving camera , it ruined my game, pls fix it asap, any idea that older version work? if so, how to downgrade
     
  26. AndyKorth

    AndyKorth

    Joined:
    Oct 19, 2009
    Posts:
    17
    Oops, it seems like I wasn't getting forum notifications, but I got a PM pointing to this issue. I will take a look at this today. Are all of you on 2017.1? Or did 4.0.2 cause this issue on older version of Unity? Thanks- will follow up in a few hours or less.
     
  27. AndyKorth

    AndyKorth

    Joined:
    Oct 19, 2009
    Posts:
    17
    There was a matrix math error introduced in 4.0.2 regarding some changes to Unity's UNITY_MATRIX_MV that they did in 2017. I have fixed the error and am uploading it to the asset store. In addition, I am PMing those of you who ran into the bugs with a new copy immediately. Sorry about the bug!
     
    TFlippy likes this.
  28. poliman

    poliman

    Joined:
    Feb 5, 2015
    Posts:
    12
    Thx, great and quick support
     
  29. stuckwiththisname

    stuckwiththisname

    Joined:
    Nov 19, 2013
    Posts:
    8
    Hello! I just purchased a license after reading through this thread. I have SFSS loaded into my game and lighting and shadows are working properly. I've run into two issues that I haven't been able to pin down yet.

    1) Why are the shadows in the corners casting funny in this gif? http://imgur.com/7Kurj1u.gif This image shows the borders of my SF Polygon objects. http://imgur.com/4TdvMhA . The SF Polygons are configured with a 2.5 light penetration. If I reduce the LP to 0 then I don't see these weird shadows, but then the land is blacked out entirely, naturally. Any ideas?

    2) Are there any practices that you recommend for parallax scrolling background layers? My current solution uses a separate camera for each parallax layer and the camera is moved at a scaled rate relative to the main camera, which is following the player. The trouble is, obviously, that the light that the player is carrying is illuminating an area of the background that the camera is not looking at, due to the slower movement speed.

    I'm much more concerned about the first problem, but I'd appreciate any advice you could offer for the 2nd as well. Thank you!
     
  30. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    Hello! Same here, having the same two problems as you do. Getting weird shadows when two SFPolygons meet, also doing parallax scrolling with separate cameras and can't figure out how to integrate SFSS. Would also like to know how to fix the problem when a SFPolygon has less than 1.0f opacity and has a concave shape (like a mentioned in my previous post above) its projecting weird shadows.

    Any advice or pointer is greatly appreciated! Thanks!
     
  31. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Hi stuckwiththisname!

    1) Yeah, there are some cases where you can get artifacts with light penetration. Usually it's overlapping colliders. What appears to be happening here is that you've got several closed polygons, and the vertical edges that go into the earth are causing those extra shadows. You can redo the geometry so it's a single SFPolygon (they can be concave), that way you won't have those vertical edges. Judging by those gizmos that are on the surface, you probably have that data pretty readily accessible so you can probably programmatically create the SFPolygons fairly easily. (Not quite sure if your levels are dynamically made or what, so the exact approach might vary)

    2) Parallax effects can be a little weird with 2D lighting. I think the concerns are mostly stylistic. I would say you don't want things in the foreground casting shadows on the background, for example.. the sense of depth would be destroyed. So you can achieve that by making the material on the background unshadowed (make a separate material and adjust the sliders on it). Depending on your game, and how distant the background is, maybe they can still receive the lights.. otherwise it might be a better approach to use a non-SFSS shader on them so they don't interact with the lighting.

    You mentioned a separate camera for parallax scrolling. I've seen people do that in Unity though I'm puzzled why. Anyway, you can certainly add SFRenderers to multiple cameras, but maybe a completely unshadowed bacgkround is the way to go anyway? I thinkt here are some posts buried somewhere in the thread about what other people have tried.
     
  32. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Oh, I missed your post before Lechuza. It looks like you have a single SFPolygon that is getting internal shadows. (the green lines are a unity collider? And they go away if you disable the collider but leave the SFPolygon on?). I will need to check with @slembcke2 in that case.
     
  33. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Sorry to triple-post, but I discussed it with Scott a bit and have some more info:
    @stuckwiththisname: I still think combining the SFPolygons will fix your issue 1.

    Working with multiple cameras and getting things to line up across them won't work great, for the same reason image effects tend not to work well with multiple cameras. In Unity I think it's much easier to implement parallax by scrolling a background rather than multiple cameras. I don't really know why the multiple-camera parallax idea has caught on in the unity community.

    At least in your screenshot, @Lechuza- you might be able to fix that issue by setting the opacity of the SFPolygon to 1.0 and then adjusting the shadow blending options, so instead of this:
    [​IMG]

    You set the opacity to 1.0 on SFRenderer and change the material to get this:

    [​IMG]

    You might need to create a second SFShadowed material with different settings if your asteroids are shadowed differently from other things in your scene. It seems like there might be opportunity for some artifacts with the light penetration, but I didn't get any in my tests.
     
  34. Lechuza

    Lechuza

    Joined:
    Oct 3, 2014
    Posts:
    16
    Thanks Andy! both for the suggestion and the fast reply! I tried that, the problem with that is that the asteroid will be seen even if there is no 2D light. My intent is so that asteroids are only seen when there is light, when there isn't they will merge with the black background and only be spotted by that lack of stars there. I have the SFRenderer setup so there is no ambient light, the only way I can think of achieving that is by tweaking the opacity, but when the shape is concave I get those weird shadow lines, even if its only one SFPolygon.

    The green lines are indeed a polygon collider 2d, I get those shadows even when there isn't one.

    Apparently is also happening with lights and not just with shadowing:
    [​IMG]

    Here's the SFPolygon vertices:
    [​IMG]
    Seems to happen when the edge normal is close to perpendicular to the lights direction? Just a guess.
     
    Last edited: Aug 2, 2017
  35. ChrisTobiS

    ChrisTobiS

    Joined:
    Jun 15, 2017
    Posts:
    7
    Hi, I just bought this asset and it's working nicely so far. I only have an issue at the moment, it would be great if you could help me here :). (I'm also pretty new to game development with Unity).

    Is there a way to limit the length of the shadows? I'm making a top-down RPG and use a light from this system as the sun. I set it up to be really huge and outside of the map. It has a big radius for softer shadows, but the shadows are too long.
    This leads me to another problem: the shadows add up, so for every SFPolygon the shadows in that direction get darker. I guess this problem could be solved if the shadows were much shorter.

    I've tried to counter the long shadow with another light from the opposite direction, but then every shadow in this direction disappears, so that didn't work.
     
  36. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Hi Chris. The lights have a fall-off- you can control their size. Shadows themselves don't end, if something blocks that light, it stays blocked no matter how far away it gets. I think maybe what you are asking for is discussed here:
    https://forum.unity3d.com/threads/released-super-fast-soft-shadows.331154/page-7#post-2956793

    It sounds like you're using a directional light sort of style for a really big open world. That's probably not going to give you very good results, since you'll have a lot of offscreen stuff casting very long shadows. Directional lights work well in things like puzzle games or side scrollers or shooters, but not big open worlds. Instead of thinking about shadows that add up, think about how the lights add up. Shadows are the absence of those lights that you've added.

    Instead of a directional light, try a light on the player. You can scroll through this thread for some ideas of how other people did top down RPG lighting. Sorry it's not the answer you are looking for, maybe you could try the skew approach scott mentioned here:
    https://forum.unity3d.com/threads/released-super-fast-soft-shadows.331154/page-7#post-2959961
     
  37. Silverlode

    Silverlode

    Joined:
    Apr 9, 2013
    Posts:
    35
    Hi,

    I'm trying to work out of SFSS may be able to provide a solution for me, but I may asking too much in terms of performance. There is no way to try before I buy (right?) so maybe you could see if what I'm proposing is realistic? I'm targeting metal-enabled iPads. (Bonus points for iPad Mini 2 and up)

    The game levels are full of flat meshes + 2D polygon colliders (with between 4 - 8 vertices. These form the shadow-casting walls (cyan), the open floor tiles (blue, receive shadows but don't cast) and if the player mines into the level, the magenta tiles will come into play (one at a time, and this won't happen much).

    • The screenshot below shows perhaps only 1/4 of a level, but only maybe half the screenshot would be on screen at once.
    • No normals or bump maps, just color and texture information in their current shader.
    • One light, located at the player, and perhaps covering half the screen (say, 1/4 of the screenshot)
    • Non-moving static lights in some rooms would be nice, but just a bonus.
    • Doors may open/close, but the level shape generally stays static.
    • Most of the world will be in shadow, just the current room and parts the current/nearby passages will actually be lit.
    • Shadows don't need to be particularly hard/soft - whichever is most efficient.
    • Light/shadow data won't change while other effects play for the most part - the play is either moving OR acting.

    upload_2017-8-15_13-24-49.png
     
  38. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @Lechuza
    Hi! I'm back from vacation now. I think I have an idea of what's causing those seams to show up. Let me do some experimenting and get back to you tomorrow.

    @Silverlode
    I first saw your screenshot and thought "woah!", but then read the description. ;)
    Culling: Expected to be the most expensive since there will be hundreds of cyan polys at a time, but you aren't running on an iPad 1 so should have plenty of CPU available.
    Batching: Should be fine. Only one light, and sounds like only a few hundred polys will be visible at a time. That's a few kilobytes of memory to copy.
    Draw calls: Only one light, so only a few draw calls are needed.
    Vertex Shader: Only a few thousand vertexes, should be cake.
    Fragment Shader: Some overdraw since you have a lot of hidden faces, but with only one light it should be minimal.
     
  39. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @Lechuza
    I'm not exactly sure it's a related issue as I'm having trouble recreating quite the same problem, but try this fix.

    Near the end of SFShadowMask.shader there is a line like this:
    float occlusion = (values[0] + values[1] - 1.0);

    Change it so that it multiplies it a little bit extra, to ensure that the shadow is complete without a seam in it.
    float occlusion = 1.02f*(values[0] + values[1] - 1.0);
     
  40. vessen

    vessen

    Joined:
    Sep 29, 2016
    Posts:
    3
  41. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    Hmm. There's no shortage of rotating sprites in the demos. There has to be more going on there. An extra parent transform that makes that not a rotation around the global z-axis maybe? (or.. something?)

    Do the demos work for you?
     
  42. vessen

    vessen

    Joined:
    Sep 29, 2016
    Posts:
    3
    Hi! Demos work for me.
    Unparented gameobject's :
    http://prntscr.com/gcusjf
    What's wrong, I do not understand :(
     
  43. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @vessen
    o_O I'm completely stumped on that one. How much trouble would it be to make a replication project?
     
  44. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @vessen Sorry... one last thing to try. Are you on the latest version? We had accidentally swapped a matrix multiplication order a version or two ago and quickly put out a fix for it. That caused all sorts of weird, subtle issues.
     
  45. DeevStudio

    DeevStudio

    Joined:
    Jan 31, 2017
    Posts:
    2
    Hello, We have bought and used your plugin inside our game, which is a 2D platformer and it has been great so far, but recently we have encountered a problem:
    We have used Anima2D for character animations inside our game, This in turn has caused the sprites to change into meshes, and the meshes rotate while the animation is playing, the rotation causes irregular light effects.
    Do you have any advice on how to use your plugin to fix this problem? (specifically with Anima2D)


    [​IMG]
     
  46. slembcke2

    slembcke2

    Joined:
    Jun 26, 2013
    Posts:
    194
    @DeevStudio Make sure you are updated to the latest version. We introduced a shader bug a version or two ago. :-\
     
  47. DeevStudio

    DeevStudio

    Joined:
    Jan 31, 2017
    Posts:
    2
    I downloaded the plugin several times , I reinstalled Unity and tried it on other PCs too , but my problem still exists and nothing changed , also I may inform you that the change log file in the package shows changes of 4.0.2 and says nothing about 4.0.3 although Unity assetstore shows it as 4.0.3.
    As I mentioned before your plugin works correctly with my sprites , but I used Anima2D which converts sprites to sprite meshes , and these sprite meshes act strange with your light system in the way I showed you before .

    BugLight.jpg

    ps:
    I updated again several times. unity tells me it is 4.0.3 but the bug exists, I cleared all previous versions and reinstalled unity again but it doesnt help it.
     
    Last edited: Aug 31, 2017
  48. Andy-Korth

    Andy-Korth

    Joined:
    Jun 7, 2013
    Posts:
    131
    Hey @DeevStudio, I sent you a PM with a direct download link for SFSS 4.0.3. I have also had issues with upgrading in the unity asset store. (convincing it to actually download a new version seems to be the sticking point)
     
  49. holdingjason

    holdingjason

    Joined:
    Nov 14, 2012
    Posts:
    11
    Is there anyway to get the lighting to bleed off on a single sprite i.e. the tree? Basically what I want is regardless of the sprite size only light the part of the sprite based on radius of the light, not the whole thing equally. Also need the light to go behind the tree as it moves up the sort order, I got this to work using the SF sample but then you get this issue. Not sure if this is possible since the tree mesh only contains 2 tris. Our project has large buildings and I need to walk behind them, have the light disappear but when in front of them do not want the whole building to light up equally which would look pretty bad. Thanks.

    In this case would only want the trunk lite up.
    upload_2017-9-21_16-54-50.png
     
  50. kornel-l-varga

    kornel-l-varga

    Joined:
    Jan 18, 2013
    Posts:
    15
    @Andy-Korth , Hi Andy,
    We are a small company producing a 2.5D game. We would love to use your plugin, however before purchase we would like to try an evaluation version so we can make sure that it works well in our project. Do you have any trial version?
    Kind Regards,
    Kornel