front to back render?

  • Anyone seen ashley talk about this in classic section? a new rendermode, im dying to know how exactly it will work and what are the limitations

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I asked the very same question a while ago - I guess that a front to back renderer would require a complete rewrite of the engine (see here). I think it's a pity that some 3d draw principles cannot be employed for the sake of performance - so many threads and comments about gpu performance because of the need to needlessly draw lots of hidden pixels....!

  • yes but check ashley last post in construct classic, it seems like its coming anyway

    [quote:2vd81rie]C2 should soon be getting a front-to-back renderer mode as well which could significantly reduce fillrate and end up making C2's GPU performance better than Classic's! But there is very little hope of Classic getting that.

    https://www.scirra.com/forum/zooming-scaling-culling-and-performance_p934042?#p934042

  • That's great to know.

    I've done some research about front-to-back rendering some time ago and found a site that described that it's actually possible to use some special blending modes to make front-to-back rendering feasible even for textures with alpha.

    My guess is that if something like that was implemented in C2 it would have a limitation on how effects could be applied. But maybe it's possible to have a mixed system that process the objects inside each layer front-to-back but compose the layers back-to-front, so you can apply effects to layers. Not sure if the performance gains would be significant in most cases though.

    Perhaps it's possible to pre-detect the objects that interact with other objects that contain effects and render them first back-to-front, then render the remaining objects front-to-back blending them with the previous result by using a depth test.

  • You guys should follow his own twitter feed - he's been talking about this for a while.

  • aha didn't know that, will do!

  • vtrix and all - this is good news! Thanks for the info. I don't use Twitter (wrong generation I guess)... so I'm reliant on the c2 blog and roadmap...

  • My last post was kind of wrong actually, I found out about a technique that does make it possible to partially render front-to-back. It's possible to do two passes: a front-to-back pass that basically fills opaque areas in a depth buffer, and then a normal back-to-front pass that skips overdraw in the opaque areas.

    The problem is my early experiments have shown so far that it does not really make a big difference to performance, which is especially disappointing because it involved lots of work It might be that I did something wrong, I don't know. I'll probably release it experimentally in the next beta cycle anyway, and just see what people say about it.

  • Ashley - thanks for trying and it'll be interesting to try it out nonetheless. Out of interest, does the second pass ignore alpha with no content - does it only draws semi opaque pixels and ignore clear pixels? Pixel art games might benefit hugely of there's nothing to do on pass 2.

  • It depends on the game.

    A 3d fps with buildings for example. Lots, and lots of layers of textures not needing to be seen.

    Perhaps isometric would benefit, or maybe Spriter objects.

  • Ashley - just some thoughts, if you do a ftb render of everything , without btf render, (ignoring any problems with that) and with the culling , does it then makes it faster, and is there a speed difference in btf and ftb without culling, can you test the amount of fillrate change?

    putting a couple of big rotating squares on each other should be a good test , did you test on a gpu limited pc

    well i do hope this gets somewhat of a succes, if not now maybe on reviewing

  • Note the front-to-back render doesn't actually draw any pixels to the screen, it only fills a depth buffer. The back-to-front renderer is still necessary for anything to appear on-screen at all.

  • Ashley

    I'm not sure how you are implementing things, but maybe these links may be of some utility to you (if you haven't found them on your own):

    http://hacksoflife.blogspot.com.br/2010/02/alpha-blending-back-to-front-front-to.html

    https://developer.nvidia.com/content/transparency-or-translucency-rendering

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