T
TesloStep
Guest
So, it is possible on GMS do something like that?
https://s3.amazonaws.com/ksr/assets...9064c52d7816c1b025526199_large.gif?1394904137
https://s3.amazonaws.com/ksr/assets...9064c52d7816c1b025526199_large.gif?1394904137
Sorry for bringing this thread back up but what do you think it is if it isn't normal mapped? I was planning on bring up a thread about how to something like this without normal maps and thought building on this thread was a better idea.I'm not even sure that's normal mapped.
Well normal mapping is all about directional lighting, but if you look at the GIF it appears to be flat. There's no lighting along the edges for example. Instead the whole sprite has one normal unlike a normal mapped texture. This means that there's only light attenuation, flat lighting and shadows.Sorry for bringing this thread back up but what do you think it is if it isn't normal mapped? I was planning on bring up a thread about how to something like this without normal maps and thought building on this thread was a better idea.
Hmm, isnt there a slight directional effect on the characters?Well normal mapping is all about directional lighting, but if you look at the GIF it appears to be flat. There's no lighting along the edges for example. Instead the whole sprite has one normal unlike a normal mapped texture. This means that there's only light attenuation, flat lighting and shadows.
Yes, but it appears to be flat and textureless. If it were a normal map it would have different lighting brightness depending on the pixel and the light angle. It looks to me like this isn't the case.Hmm, isnt there a slight directional effect on the characters?
And textureless? So that means its all shader based or doesn't use any additional mapping texture that is identical to the sprites like normal maps do? So it doesn't even use anything with Sprite Lamp for example either? Or do you think it uses blending or surface techniques with a simple light texture projected or blended in some way?Yes, but it appears to be flat and textureless. If it were a normal map it would have different lighting brightness depending on the pixel and the light angle. It looks to me like this isn't the case.
It looks like there are no normal maps and so no Sprite Lamp (that's what it is for). The shader would define a normal rather than sample a texture. Something like:And textureless? So that means its all shader based or doesn't use any additional mapping texture that is identical to the sprites like normal maps do? So it doesn't even use anything with Sprite Lamp for example either? Or do you think it uses blending or surface techniques with a simple light texture projected or blended in some way?
vec3 Normal = vec3(0,0,1);
Ah I think I get it, thanks for clarifying that! So having the shader define a single normal would be similar if you used a flat, single shaded normal map? As in the normal map spits out the same value no matter where its sampled from? Just making the comparison as an example.The shader would define a normal rather than sample a texture. Something like
I was referring to the simple flashlight effect you can do by using a gradient texture that represents the light and instead using a texture like that to project on top of the sprite. Would give it a flat spot light effect that somewhat simulates a normal map without the dynamicness or texture memory drain. I was curious if you thought maybe something like that was used in the gif since it seems like the whole sprite doesn't light up and darken uniformly to meI don't know what you mean about the blending.
Exactly! Technically it not a normal map as that refers to the normal sprites/textures and not how the shader handles it. Many lighting systems use normals, but aren't normal mapping.So having the shader define a single normal would be similar if you used a flat, single shaded normal map? As in the normal map spits out the same value no matter where its sampled from?
You could have it dynamic quite easily using a uniform. You only will need to change it if you want the sprite to face a different "3D" direction. For most sprites you'll probably want to keep it flat, but you could have the floor normal facing upwards some.If so, can you dynamically change the vec3 Normal value to use a different value?
I see. That's what I mean by attenuation (the light fade-off). You could do this as a texture (passed to the shader as a uniform sampler), but it's very easy to calculate yourself and you don't have to consider about resolution, interpolation or memory. So yes, the shader to have a radial attenuation calculation, but it's probably not a sprite.I was referring to the simple flashlight effect you can do by using a gradient texture that represents the light and instead using a texture like that to project on top of the sprite. Would give it a flat spot light effect that somewhat simulates a normal map without the dynamicness or texture memory drain. I was curious if you thought maybe something like that was used in the gif since it seems like the whole sprite doesn't light up and darken uniformly to me