front to back render?

Discussion and feedback on Construct 2

Post » Wed May 27, 2015 6:38 am

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
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Wed May 27, 2015 6:50 am

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....!
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,244
Reputation: 46,462

Post » Wed May 27, 2015 6:55 am

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

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
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Wed May 27, 2015 7:47 am

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.
Scirra Employee
B
155
S
53
G
17
Posts: 710
Reputation: 17,875

Post » Wed May 27, 2015 8:20 am

You guys should follow his own twitter feed - he's been talking about this for a while.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,486
Reputation: 59,758

Post » Wed May 27, 2015 8:31 am

aha didn't know that, will do!
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Wed May 27, 2015 9:40 am

@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... ;)
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,244
Reputation: 46,462

Post » Wed May 27, 2015 10:19 am

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 :P 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.
Scirra Founder
B
399
S
236
G
89
Posts: 24,519
Reputation: 195,361

Post » Wed May 27, 2015 10:28 am

@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.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,244
Reputation: 46,462

Post » Wed May 27, 2015 11:00 am

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.
Image ImageImage
B
170
S
50
G
179
Posts: 8,379
Reputation: 113,427

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests