[Effect] NormalMap32

0 favourites
  • 8 posts
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • NormalMap32

    Download from itch.io

    Download from construct.net

    Description

    NormalMap32 allows you to create and control up to 32 colored point lights that interact with a 2D normal map texture. The result is a simulated 3D lighting effect.

    What Is A Normal Map?

    Normal mapping is a texture mapping technique used for faking the lighting of bumps and dents – an implementation of bump mapping. Each normal map pixel represents the direction in which the sprite's pixel is facing.

    How Does It Work?

    You have to create OpenGL/WebGL compatible normal map sprites for each 2D sprite you want to apply the effect onto. This normal map sprite is used as a foreground effect that needs to be placed on top of the original 2D sprite background.

    You can create Normal Map sprites either automatically using Normal Map Generator software, or draw them by hand. The NormalMap32 effect needs to be applied to each normal map sprite you've imported into Construct 3. Light sources are then defined within the parameters of each normal map sprite effect.

    Please note that a light source object is not a requirement, but it's a convenient way to create dynamic lights within your game, as shown in the fully documented example project.

    Examples

    Performance Considerations

    Applying the effect to lots of individual normal map sprites can be costly. It is recommended to apply the effect to a single layer instead. Set Max Light ID to the lowest possible value for enhanced shader performance.

    Notice

    NormalMap32 evolved from the NormalMapExtended addon. Compared to NormalMapExtended, NormalMap32 offers more functionality and less complexity in an overall enhanced package.

    Features

    • Supports WebGL1, WebGL2 and WebGPU.
    • Up to 32 simultaneous RGB light sources per normal map.
    • Linear, quadratic or mixed light falloff.
    • Distance clamping for spot light effects.
    • Supports flipped and rotated normal maps.
    • Global ambient RGB light.

    Tagged:

  • Release - NormalMap32 v1.9

    • Added Normal Map Angle parameter to support rotated and/or rotating normal maps.
    • Added light max id parameter to keep shader iterations in the WebGL2 variant as minimal as possible. Which further improves performance if you are not utilizing all 32 lights.

    These new features shift all parameter IDs by 2, meaning that existing projects need to be adjusted.

    New example project to showcase the new features is available for download.

    Rotating Example

  • fow this working with 3D First person camera?

  • Keep in mind that it's a 2D effect, but yes it could possibly work.

    The examples shown above are all 2D.

    I've no idea how Construct handles 3D in the backend and i'm not interested enough into Construct's basic 3D implementation to dig into it.

    Feel free to test it out yourself.

  • hello;

    I can't figure out why the light source doesn't fit on an object, I did exactly what is written on the example, maybe you can tell me where the problem is, thanks

  • Hey there.

    The settings for the light effects are configured on the Normal Map (family or layer), rather than on a light object itself.

    However, the example file demonstrates how you can use event sheet coding to "attach" these light effects to a light object using events.

  • Release - NormalMap32 v2.0

    This is a major overhaul and unfortunately not backwards compatible with existing projects! If you still plan to update: Remove the effect from all your normal maps - before installing this update. If you can no longer open your project after updating, just install the old effect version again and retry. Keep in mind that all your event code will require an overhaul as well.

    • Adds WebGPU support
    • Adds support for flipped sprites
    • Simplified the falloff formula
    • RGB values are now defined via color pickers
    • Most parameters are now defined in percentage
    • Removes ambient light settings from each light
    • Adds a single ambient light option
    • Auto-detects screen resolution for WebGL2 and WebGPU
    • Performance improvements
    • Improves parameter descriptions

    Added new 2.0 example project.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Release - NormalMap32 v2.1

    Significant performance boost for WebGL (regression v2.0), and additional performance enhancements across all shader variants.

    Disabling lights by setting light intensity to 0 is no longer advised. The removal of this check within the shader is attributed to its lack of tangible benefits.

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