[C3][Effects] NormalMapExtended converted to C3

1 favourites
From the Asset Store
Jump on the mole rats and see how far you can go!
  • Converted normal-map-extended (original forum thread) from matriax to c3.

    So far, seems to work.

    When I copied over the original example *.capx, C3 'compat' complained in the Chrome console that certain parameters could not be set. Interestingly enough (and this is probably a clue Ashley , the parameters that were not set contained non-alpha characters in their IDs, for example: "Light2 Ambient (Green)". After I corrected the parameters that were not copied and ran C2 and C3 side by side, the effect looks the same in each. Obviously experimental, but feel free to try it.

    Thanks to blackhornet for the converter and matriax for the original C2 effect.

    [edit]

    Updated for C2, C3 runtimes and added to addon repo, also now with spotlight effect (see later in the thread.)

    construct.net/en/make-games/addons/194/normalmapextended

    See original thread above for discussion. Also here's a great Construct tutorial on dynamic lighting and normal maps.

    Running in C3:

  • Ported over another one of my own C2 examples with working rotating normal maps. Looks pretty good. Glad to have to this available for my new project.

  • Thanks for this!

  • Updated version to 1.1 (fixes some C2 compatability with c2ids.)

  • Mikal If you have time, can you please convert Skend effect, too?

    https://drive.google.com/file/d/0Bx7w7uKTaGzOeGdGUDlCOHdOUTQ/view?usp=sharing

    I downloaded the converter and want to try it but it didn't open. I think I'm missing something

  • Mikal If you have time, can you please convert Skend effect, too?

    https://drive.google.com/file/d/0Bx7w7uKTaGzOeGdGUDlCOHdOUTQ/view?usp=sharing

    I downloaded the converter and want to try it but it didn't open. I think I'm missing something

    I will try this week, but I am not going to do anything different than what other folks have tried - just use blackhornet 's converter.

  • Mikal Thank you for trying! I can't execute "C2C3AddonConverter.exe" on my desktop. Should I use command prompt or something else?

  • Converted, untested, if you have further comments, please start a new forum thread and me in that thread. bilgekaan

    Here's the command line I used (after unzipping the skend.c2addon files, creating an out dir):

    I used this command line in a cmd prompt window.

    C2C3AddonConverter.exe -effect .\files\Skend .\out

    I then went into the out directory, zipped up the contents at that file hierarchy level and renamed to Skend.c3addon

    skend.c3addon

  • Mikal Thank you! I will check it today. Sorry for hijacking the thread.

    Happy new year!

  • This.Is.Perfect.

    Do you have any documentation on this? Like how to change the values within the event sheets?

    I'm not sure how to actually have it dynamically change like you are doing! I've done this in the past in other engines not sure how to get this effect in Construct 3.

  • This.Is.Perfect.

    Do you have any documentation on this? Like how to change the values within the event sheets?

    I'm not sure how to actually have it dynamically change like you are doing! I've done this in the past in other engines not sure how to get this effect in Construct 3.

    Check out the original thread normal-map-extended for more details.

    Here's an example C3 project for the image at the start of this thread. NormalExtendedNoSF.c3p

    For 'correct' rotating normal maps using this effect and changing parameters in events, see my posts in the original thread.

  • > This.Is.Perfect.

    >

    > Do you have any documentation on this? Like how to change the values within the event sheets?

    >

    > I'm not sure how to actually have it dynamically change like you are doing! I've done this in the past in other engines not sure how to get this effect in Construct 3.

    >

    Check out the original thread scirra.com/forum/effect-normal-map-extended-1-01-updated-13-jul_t149650 normal-map-extended for more details.

    Here's an example C3 project for the image at the start of this thread. kindeyegames.com/forumfiles/NormalExtendedNoSF.c3p NormalExtendedNoSF.c3p

    For 'correct' rotating normal maps using this effect and changing parameters in events, see my scirra.com/forum/effect-normal-map-extended-1-01-updated-13-jul_t149650 posts in the original thread.

    Awesome! I'll give this a go later! Thanks a lot for the conversion and reply!

  • Examples for version 1.3 (done with beta Construct r123-2, uses Platform plugin from C3 Runtime.)

    C3 Runtime Example:

    NormalMapTestC3Runtime.c3p

    C2 Runtime:

    High DPI breaks it (likely due to canvas vs WindowHeight mismatch.) Update - corrected this in the example by using LayerToCanvasX(0,ViewportRight(0),0) Instead of using WindowWidth. Also helped with zoomed in Viewports.

    NormalMapTestC2Runtime.c3p

    Unfortunately, right now this is Work In Progress, the current implementation is too fragile, windows x,y parameters must be changed based on runtime, OS, DPI settings, etc. looking for ways to make it more robust, suggestions welcome. With the above change, the C2 runtime version looks reasonably robust now (works on MacOS, Windows and iOS through remote preview). Still an issue with the C3 runtime version example because of the different behavior of WindowHeight/WindowWidth (which requires a code change between OSes.)

    A quick description of the problems seen, in case it sparks some ideas:

    C3 w/ C2 Runtime / MacOS / Windows:

    Window Width WindowHeight matches System Canvas Size dimensions listed in C3 Debug inspector

    WW, WH changes dynamically as preview window is manually scaled via mouse

    C3 w/ C3 Runtime / MacOS:

    WindowWidth, WindowHeight are fixed at Layout / Viewport sizes

    Does not vary, does not match System Canvas Size dimensions listed in C3 Debug inspector.

    Canvas size in debug inspector also does not match: LayoutToCanvasX(0, WindowWidth, 0), LayoutToCanvasY(0, 0, WindowHeight). The Canvas size in the inspector is 2X the LTCX/Y.

    C3 w/ C3 Runtime / Windows:

    WindowWidth, WindowHeight are fixed at Layout / Viewport sizes

    Does not vary, does not match System Canvas Size dimensions listed in C3 Debug inspector.

    Canvas size in debug inspector DOES match: LayoutToCanvasX(0, WindowWidth, 0), LayoutToCanvasY(0, 0, WindowHeight).

    The reason this matters is I’m using a normal map effect and I need to pass in parameters to the shader for the location of the light on the layout (x,y) which I need to translate with LayerToCanvas and to scale the effect properly also, also need to pass in the overall canvas/window height and width.

    There may be others way to do this (open to suggestions), but I am wondering why there is variability between C2 runtime, C3 runtime and OSes for WindowWidth/WindowHeight.

    Bug Report

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Good news - Ashley commented in the bug report that the C3 runtime will be updated to have the same behavior as the C2 runtime for WindowHeight and WindowWidth (though they will be deprecated.) There will also be some new system expressions which should be used for C3 runtime, when these are available, I will update the examples.

  • Working further on the C3 runtime example, I have a new version which looks to work well across platforms (iOS, MacOS, Windows) and uses the Viewport* and Platform.DevicePixelRatio expressions, but does not use the confusing (and to be deprecated) Window* expressions. I updated the link above with the new C3 runtime example.

    Updated for C2, C3 runtimes and added to addon repo

    construct.net/en/make-games/addons/194/normalmapextended

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