Normal Mapping

Get help using Construct 2

Post » Thu Oct 03, 2013 1:16 am

I'm pushing ahead with normal mapping, even though it doesn't work correctly with tiled backgrounds as far as I can tell, but I've come across something I hope some clever clogs can help me with.

I'm using multiple light sources for my game, and so I would like my normal mapped objects to be affected by multiple lights, but I can only get it so that it is affected by 1.

Anyone know of a solution or a work around? I'd rather not use multiple normal maps on each sprite if it can be avoided... If that would even work.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Post » Thu Oct 03, 2013 11:03 am

Does anyone have any experience using normal maps? I'd like be able get working. Thanks.

So far I can get 1 normal to affected by 1 light. I'm used to 3d where a normal map immediately works with light sources. It would be good if you could designate other sprites as light sources in the normal map behaviour.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Post » Thu Oct 03, 2013 6:01 pm

Tiling and normal maps do not usually mix well. You need to use a seamless generator, or you will get artifacts where people used a clone brush, or a "make seamless" filter in GIMP or PS.

Here is a free program that might be useful:
http://neotextureedit.sourceforge.net/

How are you using them with C2?
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Thu Oct 03, 2013 6:50 pm

@jojoe

I attach an example, trial version I'm working on:

https://dl.dropboxusercontent.com/u/50465867/Construct/NormalMaps.capx

I've followed an example created by another C2 user, but it's producing an unusual glaring effect. It may be due to the normal map I've created, but I was quite happy with it. More than likely I've done something wrong with it.

In this example, I'm just trying to get 1 light source working, but eventually I'm aiming for more. I have no problem creating seamless textures, but normal maps on tiled backgrounds simply don't work. They're inverted or something, so I'll stick with individual sprites for now (less efficient, but I don't have much of a choice ATM).

Do you know how to use normal maps?AnD4D2013-10-03 18:50:31
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Post » Thu Oct 03, 2013 8:09 pm

Turns out it was the normal map... I was using NVidia's photoshop plugin, and it's silly. Crazy bump works wonders though.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Post » Thu Oct 03, 2013 8:30 pm

There is a shader setting called Specular, or sometimes Gloss (directX 12?)

Usually we use a specular map to control the shininess.

Here is a File I made for NeoTextureEdit:
https://docs.google.com/file/d/0B7p8-X5UMerycXdWZjg5T2JoUnM/edit?usp=sharing

Where the white spots are in the specular texture will make the area Glossy, the black or dark areas will make it Dull and not shiny.

If you do not have a specular map in your shader you usually only have a number setting to adjust the shininess of the entire shader.1 will make it look like it is covered in snot, or 0 will make it unshiny like a pile of dust.

To build a parallax shader, you will need to use a Heightmap, a Normal map, and a Specular map, along with your color, or diffuse map.

The parallax shader will cast shadows from the bumps so you get an ULTRA real look to it.

More on Specular settings here:
http://en.wikipedia.org/wiki/Specularity

Are you going to share your shader with the community when you are done making it? Is it WebGL?
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Thu Oct 03, 2013 8:34 pm

Still not figured out to get it to work with multiple light though. Any ideas?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Post » Thu Oct 03, 2013 8:36 pm

@jojoe - I'm afraid I'm not making a shader. Just using the built in bump mapping.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Post » Thu Oct 03, 2013 8:42 pm

Oh wow! neat!

Thanks for showing me this. Usually with shaders "bump-mapping" or Height-mapping is done with a grayscale texture.

I had no idea C2 had a normal map shader :)

I just noticed the example file. They may have an effect to control the specular.

Looks like only 1 lightsource too.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Fri Oct 04, 2013 12:20 am

Got it working slightly using distance, but it's still not quite the desired effect.

https://dl.dropboxusercontent.com/u/50465867/Construct/NormalMaps.capx
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
84
S
15
G
7
Posts: 991
Reputation: 11,231

Next

Return to How do I....?

Who is online

Users browsing this forum: hao102a2 and 26 guests