Search Unity

Sprite DLight - Instant normal maps for 2D graphics

Discussion in 'General Discussion' started by 2DeeGameArt, Nov 21, 2014.

  1. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Hey guys,

    I would like to introduce the tool I am currently running a pretty successful Kickstarter campaign for:
    Sprite DLight on Kickstarter
    The project reached its funding goal within 17 hours and is now approaching the second stretch goal: a Mac version.
    Stretch goal #1 is already reached: A dynamic lighting preview window.

    The basic purpose of Sprite DLight is the generation of normal maps from 2D sprites in one click, which allows for quick and atmospheric dynamic lighting effects in 2D games:



    In the "Updates" section, there is already a pretty straightforward guide for the integration with Unity, including a step-by-step video.

    Click here for the Kickstarter project page, which contains lots of information, pictures, and a video preview of the stretch goal features!
     
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    I've always wondered why 2D games don't already do this.
     
    CarterG81 likes this.
  3. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Hey nicely done, you've taken the pain and effort out of producing 3d effects from 2d. Good job.
     
  4. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Thank you.
    @angrypenguin : I has simply been to much effort to do this by hand, respectively, the quality of automated approaches via plugins and common normal map generators has been poor.

    The quality of Sprite DLight's normal maps certainly depends on the input images, but I am also working on a way to provide an easy method for manual adjustments to the generated normal maps. (see stretch goal #4)
     
  5. Stoven

    Stoven

    Joined:
    Jul 28, 2014
    Posts:
    171
    When will this be available on the Asset store!?!? O_O
     
  6. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    You won't need a Unity plugin for this! The normal maps can just be dropped into the Unity editor, together with the sprites.
    The release of the tool is planned for Spring 2015.
     
  7. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    938
    Looks nice!
     
  8. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Thank you :)
    Feedback and ideas for additional features are still welcome.
     
  9. fmarkus

    fmarkus

    Joined:
    May 22, 2010
    Posts:
    181
    All right I'm in! Can't wait for the beta :)
     
  10. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Thanks a lot for backing!
    The beta-start is planned for mid-December, I am pretty busy with the Kickstarter and Steam Greenlight campaigns at this time, even though I can't wait to concentrate on the tool itself again.
     
    fmarkus likes this.
  11. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    We have just reached the second stretch goal, so the tool will also be available for Mac!
    This is a screenshot of the first Mac test build:
     
    fmarkus likes this.
  12. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Happy Thanksgiving everyone!
    There is a new feature: an animated dynamic lighting preview for sprite sheets.
    Click the image for the full update, including a video clip showing the new feature!


    "Selen Run Animation", ©2014 Lunar Ray Games, animated dynamic lighting preview of the sprite sheet in Sprite DLight
     
    Last edited: Nov 28, 2014
    Stoven likes this.
  13. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Is this better, worse, same, different than SpriteLamp?

    http://www.snakehillgames.com/spritelamp/

    Do you allow multiple input maps in order to convey more depth information?

    You definitely need to do some better demos.
     
  14. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    @ JohnnyA: It is different.
    Sprite Lamp combines 2-5 hand painted lighting profiles to a normal map.
    Sprite DLight calculates a normal map, based on a sprite.

    Regarding your second question: There are some stretch goals for Sprite DLight on the project page, right below the infograph, including a video. Stretch goal #4 could be interesting for you, as it provides a way to generate lightmaps from a normal map, which can be manually modified and serve as multiple input maps for a new normal map (this could be seen as the inversion of what Sprite Lamp does).

    What kind of "better demos" are you thinking of? Could you elaborate on this?
     
  15. SixEcho

    SixEcho

    Joined:
    May 14, 2014
    Posts:
    4
  16. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Thank you.
    A quick overview to show the difference of common normal map generators/plugins and Sprite DLight:


    1. Original sprite by AlbertoV (DYA Games)
    2. Normal map created by the GIMP plugin (same as PS plugin)
    3. Normal map created by a common normal map generator with the original sprite used as height map, followed by shape enhancement
    4. Normal map created by Sprite DLight in one click
    3. is the best result you can achieve with current automatic normal map generators combined with clever techniques, although the result is still pretty poor, it's more of a bevel effect, which is randomly concave or convex, particularly at the edges of the shape.

    I think this should answer your question, SixEcho :)
     
  17. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    I thought I'd make 2 comments here. One, I love the work being done on 2d. I saw sprite lamp and now this and it makes me realize (though I already new) that 2d is just not going to die. It doesn't matter what comes out, but in some way or other 2d is going to be along for the ride of modernizing games.

    And...I wanted to explain(from my point of view) why Sprite DLight works so much better than the random normal-map creators like crazybump for example. See, with normal textures, light is raised up, and dark is lowered(in general). With sprites on the other hand, not only can you be working with much smaller sizes(which don't work well in other programs because they depend on detail to create curvature), but sprites need to be fully beveled upwards, some spots more than others, without having parts dip downwards(normals). Sprite DLight appears to be taking into account these details, taking into account not only brightness levels but color changes/contrasts as well, and isn't doing all of the anti-aliasing and smoothing that other programs do, which would ruin those low level pixels in sprites.
     
  18. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    This looks great. I've never backed a kickstarter project before but I'll probably back this one.
     
  19. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    853
    Would Sprite DLight work fine with front-faced orthogonal sprites as well?

     
  20. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    So great to see people excited about Sprite DLight.
    Thank you, kburkhart84, you saved me a lot of writing ;)

    schmosef, I really appreciate that!

    c-Row, I'm pretty sure it would work very well, but feel free to send me some sprites, so I can try them with the tool.
     
  21. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    You are welcome. I'm no expert in the field but I call it how I see it. Feel free to correct anything I didn't explain right.:D
     
  22. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    Ok, it's official. I've backed your project.
     
  23. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    I am very glad to hear that, thank you.

    @kburkhart84: You nailed it! :D

    Update: Stretch goal #3 is almost reached, less than $450 missing.


    "Super Aged Warriors Alpha 2 HD Turbo Special", ©2014 AlbertoV (DYA Games), re-rendered for different environments with the normal map and lighting of Sprite DLight

    With this feature, sprites can be re-rendered for different environments or day and night cycles, based on the generated normal map, even for game engines that do not support shaders. I know this is not really something, Unity users care about ;)
     
  24. schmosef

    schmosef

    Joined:
    Mar 6, 2012
    Posts:
    852
    @2DeeGameArt,

    I just got a Kickstarter project update email from you and in it you mention something called Thunderclap.

    The link in the email does not work.

    What is it?
     
  25. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Unfortunately, the site appears to be down at exactly the wrong time :D
    Thunderclap is a platform that works somewhat similar to Kickstarter, I need 100 people to sign up with a Twitter, Facebook or Tumblr account before the deadline (Sunday) is reached. Thunderclap will then post the message of the campaign at the specified time through the account you signed up with.
    By sharing the message with a lot of people at the same time, it has a chance to go viral to some extent.

    A short update to all those who haven't heard it yet: Sprite DLight has reached stretch goal #3!


    "Wolf where?", ©2014 Kevin Chaloux, re-rendered for different environments with the normal map and lighting of Sprite DLight
     
  26. Boar

    Boar

    Joined:
    Dec 2, 2014
    Posts:
    1
    Hey 2Dee. Just found out about SpriteDlight yesterday and I'm very excited about it! We're developing a 2d point and click adventure and were thinking about going for something like Sprite Lamp, but the perspective of quadrupling our work was kind of scary.

    I have a couple of questions:

    - Does the software only work with spritesheets? Our sprites are...huge (2048x60), so we can't really go for sprite sheet (22,000...). Would it work with separate sprites, too? Do you have a suggestion about how we could maybe alter our workflow to integrate Sprite Dlight?

    - Will Sprite Dlight be available as soon as the Kickstarter is finished? Approximate pricing?

    Thanks in advance!
     
  27. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,125
    Hi! In our production environment we use texture atlases (single transparent texture with arms, legs, heads, etc) for our 2d fbx sprites - will this work for that as well?
     
  28. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    @Boar:
    I love point & click adventures, nice to hear that you are working on one.
    Sprite DLight doesn't only work with sprite sheets, of course it works on separate sprites, too.
    At the moment, the tool has a hard time with huge sprites/sprite sheets, but this will hopefully be fixed soon.
    What I don't get... 2048 - okay. But 60? What kind of character or object fits into these dimensions? Are you sure you are not talking about a sprite sheet with multiple frames?
    Maybe this is a misunderstanding or a matter of definition, but I need to know what exactly we are talking about here to be able to suggest anything regarding the workflow.

    The backer beta is planned for mid-December, so backers should get the first build in about 2-3 weeks. The final release is planned for Spring 2015.
    The Kickstarter backer prices are $20 for the Lite version and $35 for the Pro version. There is no final decision on the price of the finished tool, but it will probably be $30 for the Lite version and $50 for the Pro version, so the backers who made the funding and the stretch goals possible, are rewarded with a discount.

    @yuriythebest:
    Generally, atlases can be processed like sprite sheets, however the fbx format is not supported. Is it actually an image file format?
     
  29. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    I think maybe a way this could be improved would be to let the user provide a `depth map` texture along with the sprite, which tells the system how far from the camera each pixel is, like as if you rendered the 3d depth buffer to a texture... then it could really position further away parts e.g. the opposite arm and leg, further from the light, to give it a more three-dimensional normal mapping. Because basically what you're shooting for is to treat the sprite as if it is a fixed-camera-view of a 3d mesh.... trying to reconstruct the mesh surface based on the 2d image, having lost access to the original 3d surface data. You need a kind of `convert 2d to 3d` algorithm.
     
  30. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    imaginaryhuman:
    Thank you for the input. This is an interesting suggestion.
    There are two things that need to be mentioned:
    • Sprites often have some kind of shading already 'baked' in, which means that body parts like the opposite arm or leg are already darker than those in front of the camera.
      Sprite DLight takes these different intensities into account, that is why it works pretty well with character sprites.
    • Providing the tool with a "depth map texture" the way you suggested is possible!
      You can either use the depth map and convert it directly to a normal map, or you can use the depth map as the input sprite, which also leads to good results in most cases.
      This is what I did for the skeletal animation example in the video. I made a second version of the atlas with modified intensities, such as the eyes being brighter than the face, so they turn out convex and closer to the camera than the face itself. Then I fed this modified version, containing the corrected depth information, to the tool and had it generate the normal map.
     
  31. yuriythebest

    yuriythebest

    Joined:
    Nov 21, 2009
    Posts:
    1,125
    Cool, then everything should work!
    nope, an fbx format is usually used for 3d models, but we use it for 2d models
     
  32. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Maybe you could post an example, so we can see if/how it works for your plans.
     
  33. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    The final stretch goal is reached and the project has 6 more days on Kickstarter.

    This is the new feature of the recently unlocked final stretch goal:



    I'd also like to share a screenshot of the UI, which is currently being re-designed:



    6 more days to jump in at the KS backer price and to participate in the beta.
     
  34. Neoku

    Neoku

    Joined:
    Oct 27, 2014
    Posts:
    261
    Nice effect but is a incorrect light model for 2D representations of 3D objects.
     
  35. Emolso

    Emolso

    Joined:
    Sep 10, 2012
    Posts:
    6
    Will these work with Unity's 2D? As far as I know Unity Sprites have no option to add a normal map?
     
    CarterG81 likes this.
  36. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    Just made a pledge for the last Sprite DLight Early Bird special, really looking forward to seeing this project reach full maturity!
     
    Stoven likes this.
  37. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    @Neoku: I don't really get what you mean by "incorrect light model". Could you elaborate?

    @Rybo5000: As far as I know, normal maps are supported by Unity's 2D, but a Unity expert could probably tell us more.

    @lorenalexm: Thanks for backing. Somebody upgraded their pledge, so the early bird slot re-opened just for you ;)
     
  38. Neoku

    Neoku

    Joined:
    Oct 27, 2014
    Posts:
    261
    The 3D information that can be extracted from a 2D image is very few for making a realistic or minimal accurate 3D ligthing effect and a 2D sprite generally come with lighting then this religthing (or overlighting) can be result in a very random lighting effect, in the case of your main example the light of the candle in a real 3D scenary will be affect nothing or very few the broom because the shadow of the scarecrow inside in this area.
     
    Last edited: Dec 7, 2014
  39. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @2DeeGameArt:
    That's amazing plugin, can it worl with directionnal light or multiple light sources ?
    Keep up the good work.
     
  40. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Neoku: You are right, you won't get a perfectly realistic 3D effect only by processing a sprite, this has never been my intention with Sprite DLight.
    It is all about quickly achieving an impressive 3D-like effect in two dimensions, with little effort.

    zenGarden: Thank you. In the preview of the tool itself, you can set up ambient lights for the cardinal directions, and there is a spot light, which can also be reduced to its directional component.
    The generated normal maps can of course be used with any number and any kind of light source the used engine allows for.
    Oh, and it is not a plugin, it is a standalone software that generates assets (images).
     
  41. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    Dragon's crown by VanillaWare did this already.
     
  42. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    I googled it. The game looks pretty amazing, and there seems to be some basic flat lighting, but there are apparently no normal maps involved.
     
  43. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    738
    You sure? Try to get the game assets.

    There are 2 files : The Sprite parts, and the Normal map.

    The easiest to see is the Amazoness's hammer.
    amazon00_arms00out.png
     
  44. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    I don't see any normal maps in the image you attached. Could be a misunderstanding, though.
     
  45. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Almost there...
    Only 26 hours left to grab the tool at the Kickstarter backer price and to jump in for the beta.


    "Skull Plant", ©2013 Kevin Chaloux, normal map and dynamic lighting preview of Sprite DLight
     
  46. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    As far as I know Unity doesn't support normal maps for 2D sprites and you'd need a custom shader for this to work.
    I tried doing a similar thing. I ended up merging the sprite atlas and it's normal map into a single texture and writing a custom shader that would take the normal info from the same texture using an offset.
     
  47. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Have you seen the first update on engine integration?
    There was a link to a step-by-step guide for the integration with Unity (5 beta), made by Alex Hajdu, a backer of Sprite DLight:
    http://www.mrfoxandfriends.com/blog/devstories2
     
  48. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Just checked out the video. I'm not an expert in shaders, but I don't think it's a good idea to use the Standard shader for 2D sprites, as it's too complex and seems to have unnecessary calculations.
     
  49. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    Honestly, I have absolutely no experience with Unity, but I think the Standard shader could still be a solution for people who don't know how to write a custom shader.
    I know there have been efforts to get a custom normal map shader working for Sprite Lamp integration with Unity, I haven't had the time for a closer look into that, but, as the output formats of the normal maps are similar for both tools, this shader should do well for Sprite DLight's normal maps, too.
     
  50. 2DeeGameArt

    2DeeGameArt

    Joined:
    Mar 19, 2014
    Posts:
    28
    20 minutes left to jump in... ;)