Normal Mapping

  • 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.

  • 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.

  • 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:

    neotextureedit.sourceforge.net

    How are you using them with C2?

  • 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?

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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:

    docs.google.com/file/d/0B7p8-X5UMerycXdWZjg5T2JoUnM/edit

    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:

    en.wikipedia.org/wiki/Specularity

    Are you going to share your shader with the community when you are done making it? Is it WebGL?

  • Still not figured out to get it to work with multiple light though. Any ideas?

  • jojoe - I'm afraid I'm not making a shader. Just using the built in bump mapping.

  • 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.

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

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

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)