Parallax Map released! [effect]

0 favourites
  • 4 posts
From the Asset Store
A template which allows you to customise the controls of your game.
  • Created new ParallaxMap effect for Construct 3. Check it out, includes an example: construct.net/en/make-games/addons/223/parallaxmap

    Based on learnopengl.com/Advanced-Lighting/Parallax-Mapping and alanzucconi.com

    If you do something with, please share a pic.

    R0J0hound Ashley Gigatron

    Question for effect experts, I needed to include a depth map with the sprite texture. I did not want to do what I have done in the past and have two separate sprites (one 'base' sprite and one 'effect' sprite and layer them on top of each other, which you need to manage separately and make sure Z order is consistent. Like what was done with normalmap effects.) In this case, I added the depthmap into the sprite base animation, appended to the right and then used offsets and range checks to get the depthmap and to not 'render' the depth map. This works and feels about as performant as two sprites on top of each other, but more manageable (once the base+depth image is created.) Are there other 'better' ways to do this? Is there any way to access another texture beyond the current active animation frame (e.g. front sampler?) Other ideas?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As far as I understand it, effects are handled basically the same way in c2 and c3. The only additional effect parameters you can add are numbers. You can’t pass additional textures to construct effects at this time.

    However it is possible to do it from a plugin’s drawgl function. Tell construct’s renderer to finish drawing, and then do any custom webgl you like. The pro of this is you can do anything. The cons are you have to deal with a fair amount of webgl and you’ll have to change the webgl state back when you’re done. The closest example I have is here, but it touches on more things than you’ll need.

    construct.net/en/forum/construct-3/how-do-i-8/how-do-i-get-this-example-to-w-140574

    It’s fairly low level but could be a useful starting point.

    Either way your effect is pretty cool.

  • Updated to version 0.9.3.2:

    Corrected texture map offset and calculations to handle sprite sheets with multiple sprites.

  • Thanks for the pointer R0J0hound, I'll take a look. As you say it's a deeper dive for your pointer, but something to think about for the future to make an 'all-in-one' shader with specular, depth, lighting, self-shadow, etc.

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