Sprite DLight - Support ?

Discussion and feedback on Construct 2

Post » Wed Nov 05, 2014 9:08 pm

@shinkan , where is this other shader which actually makes normalmaps on the fly without a need of additional objects?

Are you referring to the Normal mapping shader by GamesWarp studios ?
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Wed Nov 05, 2014 9:51 pm

@eli0s Yes. It works quite nice. Also I made a few modifications for my personal use so I get more params to set (like: glow radius, falloff radius, light intensity, light color and most important effect is not visible on transparent pixels of the object)

But like I said, until effects of that kind can't accept multiple sources you can't really make fun stuff with them. For example you can't have 5 lasers illuminating background wall...
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Wed Nov 05, 2014 11:19 pm

sprite d light seems to render in object space instead of tangent space. I like the result so far, specially for the occlusion map.
If not, there's Knald that in my opinion is better than crazybump and also you can use XNormal.
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Fri Nov 07, 2014 3:37 pm

Hi everyone, Sprite DLight guy here.
Pretty exciting to already see that much interest in my tool, even before launch.

I would like to elaborate a bit on things that have been discussed here.
First of all, I have to point out that the output of Sprite DLight is (among other assets) a normal map, which can be used in any engine that supports shaders.
So the question is not if C2 could make use of this, as it already can.
Engine integration of Sprite DLight's normal maps is the same as for any other normal maps.
For Construct 2, the developer of Sprite Lamp is already working on a solution, together with some guys of this forum.
I found a link on the Sprite Lamp website, seems like I cannot post it here... okay, type "sprite lamp construct2" in google search and it should be among the first sites.

On skeletal animation integration:
Generating normal maps for body parts or for an atlas in one is absolutely possible.
In the KS video, there is an example of a character, seen in a Spine-runtime, with dynamic lighting from a shader, written by a friend of mine.
As the principle is basically the same, this shouldn't be hard to implement for Spriter, too.

To FraktalZero's question: Sprite DLight's normal maps are in tangent space, which seems to be standard for normal map generators.

Last but not least, I would like to point out the difference to other normal map generators again, as people keep asking over and over after reading "normal map generator":
Common normal map generators like CB & co simply cannot create voluminous shapes, they just produce a bevel-like bump effect from a surface.

LemonDROP has posted a nice example for this, I will upload a normal map made by Sprite DLight for the same artwork and a shader preview later, so everybody can see the difference.

And then you have tools like Sprite Lamp, that actually can produce great normal maps, depending on the skill of the artist who draws the required 2-5 lighting profiles.
The downside here is obvious: For larger projects, this means a HUGE amount of work, and you need at least some basic artistic skills to paint nice shading for multiple directions.

Long story short: Sprite DLight generates a normal map for a sprite or even a sprite sheet by only using this sprite as the input image.
Load a sprite, press a button, if you want, adjust the result with sliders and options, save the generated map and enjoy.
You won't have as much control over the result as you have with Sprite Lamp, but the simplification and time saving payoff is beyond compare.
B
4
S
1
Posts: 21
Reputation: 394

Post » Fri Nov 07, 2014 4:06 pm

There you go....

Normal map for LemonDROP's sprite, created by Sprite DLight:
Image

Dynamic lighting preview, recorded in the Sprite Lamp shader:
Image
B
4
S
1
Posts: 21
Reputation: 394

Post » Sat Nov 08, 2014 5:27 pm

"Looks cool but I don't know how heavy it is if it is being used in runtime. I'm all in for something like this, but it seems like a big support request."

I appreciate Dee explanation of some of the information. However I would also like to clarify on top. That DLamp does not generate Normal Maps at run time. Normal Maps are generated outside C2 and added to the project by other apps.

"Without a proper shader or a sprite object that supports the separate maps, I find it hard to believe that this is actually feasible. Don't forget that for each Sprite object that we want this effect to be applied, we need at least one extra sprite overalyed, that will hold the "bump" effect. "

Elios as a good point here. First it's feasible, but we have to create a little mini system to support this. It would be nice to have Sprite plugin to support Maps or a Behavior to support Maps. As it is right now. The best way is to create a MapLayer under/over? the sprite layer. Pin the Normal Map to the sprite. And set the layer to which ever layer it needs to be. There are samples of light mapping on the C2 forums here and there. However it's not as convenient as other systems, which attach the map to the texture groups or objects. But maybe some requesting to Ashley.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,028

Post » Sat Nov 08, 2014 6:50 pm

Right, the tool does not provide plugins for runtime-calculation of normal maps, it just provides the maps as images, which can then be used in game engines.
Doing plugins for game engines separately would require me to rewrite the tool for various different engines, in multiple programming languages, which would of course be cool, but this exceeds the scope of the project by far ($2,2k funding goal and estimated delivery date by April 2015).
Another reason making runtime-generation of normal maps in the quality of Sprite DLight very unlikely is that the shape volume effect is pretty performance-heavy.
This effect is one of the major things that separate the generated maps from the output of other tools, like CB (you saw the difference in the animations), and dropping that for better performance would make the whole thing kind of pointless.
B
4
S
1
Posts: 21
Reputation: 394

Post » Sat Nov 08, 2014 8:59 pm

@jayderyu , please note that I'm basing my concerns on my personal experience with this kind of approach.

On my project memories the third level is full of textures with the bump shader on top of the regular "diffuse" Sprites. You can hit esc and choose the "time" level if you wish too see what I mean.

In this level I have many parallaxed layers that all need to have a layer above them, holding the bump shader. I had to make a system that created all the normal map textures at run time and scattered them in the correct position and corresponding layer for each diffuse Sprite. It was a difficult task to do and it automatically doubled the number of sprite objects/instances. It also has a hit in performance.

I like the idea of a Sprite object that has multiple map capabilities, or something like a behavior that holds the necessary maps. I bet it won't happen any time soon however, perhaps If C2 had a "real" lighting system it would wad been easier to implement.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Thu Nov 13, 2014 7:15 pm

A quick update on Sprite DLight:
The Kickstarter got funded within 17 hours after launch and is now at 170%. Thanks to all of you who backed it or gave me feedback on it, I am still overwhelmed.
Now I'd like to ask you guys for suggestions regarding stretch goals. Any ideas for additional features are very welcome.
B
4
S
1
Posts: 21
Reputation: 394

Post » Fri Nov 14, 2014 7:39 am

Dee wrote:Now I'd like to ask you guys for suggestions regarding stretch goals. Any ideas for additional features are very welcome.

Brilliant, congratulations!

For stretch goals, personally I'd like to see you working with a select few game creation applications (C2 among them, of course) to improve integration of Sprite DLight's outputted maps. For example, having a behaviour for objects that allows you to overlay those maps on a regular sprite, and interface with the existing light object. No idea how you'd do that but I imagine it'd require outsourcing the work. (We have a couple of geniuses on these forums who I'm sure could help!)
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests