Several questions about textures and shaders with construct.

This forum is currently in read-only mode.
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hi,

    I'm thinking about making some mini game systems for -mostly- visual purpose (portfolio), and i was wondering if :

    • it's possible to extract independently the R, G and B channels of a texture to treat them separately (with shaders) ?
    • if the size of a texture used in a level should be using a power of 2 (128*256 etc.) to increase performances ?
    • if construct can work with tiling textures the 3d way (you can tile as many time as you wish a bitmap on a defined surface)
    • if it is possible to post process the entire screen at once (lens vignetting) ?

    Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • - it's possible to extract independently the R, G and B channels of a texture to treat them separately (with shaders) ?

    If you only need to output to screen, then yes, this is easy with pixel shaders. If you want to save such altered textures, you would need the canvas/image manipulator objects.

    - if the size of a texture used in a level should be using a power of 2 (128*256 etc.) to increase performances ?

    No. General size, count and the display size matter, but a non power of two texture shouldn't affect performance (if the gfx card requires such texture formats, the image you use will be stored as a padded power of two anyway).

    - if construct can work with tiling textures the 3d way (you can tile as many time as you wish a bitmap on a defined surface)

    Not sure, what exactly you have in mind. The tiled background object does that, but I assume you want to tile some other shaped objects? If so, this is possible indirectly, using the shape as a mask and project other objects like the tb onto it (using pixel shaders).

    - if it is possible to post process the entire screen at once (lens vignetting) ?

    Yes. Some effects work very well as layer effects, processing the whole background to that layer. Furthermore the canvas object, set to "after drawing" also is suitable as a post processor. (btw: there already is a good vignette shader that ships with Construct)

  • Thank you for your answers.

    If you only need to output to screen, then yes, this is easy with pixel shaders. If you want to save such altered textures, you would need the canvas/image manipulator objects.

    In fact, i'd like to be able to import like 3 mask textures packed into a single RGB file, as the memory will handle it as a single texture. I'd use those for operation on the screen like to simulate the shadow of the clouds on the ground or so.

    Not sure, what exactly you have in mind.

    Here's what I meant :

    <img src="http://s2.noelshack.com/uploads/images/18378480478149_whatimeant.jpg">

    It can be usefull to avoid creating too small tiles with several variations (using a single really detailed 512 texture instead, which leaves you the possibility to put more stuff in it). Would also it have an impact on performance on huge surfaces (like a dungeon) ?

  • Thank you for your answers.

    > If you only need to output to screen, then yes, this is easy with pixel shaders. If you want to save such altered textures, you would need the canvas/image manipulator objects.

    >

    In fact, i'd like to be able to import like 3 mask textures packed into a single RGB file, as the memory will handle it as a single texture. I'd use those for operation on the screen like to simulate the shadow of the clouds on the ground or so.

    > Not sure, what exactly you have in mind.

    >

    Here's what I meant :

    <img src="http://s2.noelshack.com/uploads/images/18378480478149_whatimeant.jpg">

    It can be usefull to avoid creating too small tiles with several variations (using a single really detailed 512 texture instead, which leaves you the possibility to put more stuff in it). Would also it have an impact on performance on huge surfaces (like a dungeon) ?

    I've toyed with that using a distort map. The U, and V are tileable.

    I didn't notice a big hit to performance, but you are limited on rows/ columns.

  • In fact, i'd like to be able to import like 3 mask textures packed into a single RGB file, as the memory will handle it as a single texture. I'd use those for operation on the screen like to simulate the shadow of the clouds on the ground or so.

    I see. And I confirm. This is a task for pixel shaders und doable (although not easy). Depending on your needs you have to write them first, of course. Feel free to pm me, should you get in trouble regarding Construct's implementation of HLSL.

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