Game Development Community

Feedback effects.

by Phil Carlisle · in Torque Game Engine Advanced · 11/01/2004 (12:29 am) · 3 replies

Well, Ive just got myself up and running again with some shader compatible hardware.

One of the games I'm prototyping needs to be fairly weird, so I figure we'll go for some shader based stuff.

So I'm wondering, how easy will it be to create feedback effects? Ive not looked at how to use the render to texture functionality in TSE yet, so I wonder if anyone else has looked?

The type of effects I'm talking about are the pretty common PS2 style feedback motion blur style effects (bouncer springs to mind). Basically the PS2 renderer is really good at doing render to place, read from place kind of ops. So they commonly use buffer read/write effects.

I want to get that console "feel" by using similar effects and I figure render to texture and TSE will help.

Also, just out of interest, have we reduced the number of viewport setting calls for TSE? I need to mess around with perhaps setting up a non perspective view, and in TGE it seemed like a LOT of view setting was taking place.

Ta.

#1
11/01/2004 (8:30 am)
I'm not sure what you mean by the view setup stuff - TSE does roughly similar things to TGE, so I'd guess it was modifying the view an equal amount. As far as I know the only times the viewport/projection matrix is modified is when you have a portal or a TSGuiControl. So perhaps a few times a frame, on a complex scene.

Feedback effects wouldn't be too hard. We haven't done any yet, but we have a couple of kinds of render to texture effects. I imagine if you just stuff an alpha into their draw operations you'll get the sort of feedback you crave.
#2
11/01/2004 (11:42 pm)
Hmm, you sure ben? I seem to recall there being lots of redundant viewport setting calls in TGE. However now that you say that I'm going to backtrack and make sure :)

Reason being, I want to set an ortho view to see if it would work. Last time I looked in TGE when I tried setting ortho, all sorts of fun happened :) it seemed to be setting the view a lot of times per frame, but thats a while back so I might be remembering wrong of course :)
#3
11/02/2004 (8:00 am)
Unfortunately, the viewport is changed with more GUI's than just the TSGuiControl. It's not easy to rip out because controls like the scroll control use the viewport for clipping. But the projection matrix is not changed very much. You might want to check out the new planar projection code (in InteriorInstance I think) where it renders the scene to a texture. It works fine for the scene, but it can't render the GUIs because of all the viewport changes.

Terrain is also a problem since it renders to texture itself when it blends the terrain textures. Ie. it will steal the render target from you. A possible solution to this would be to put the current render target on a stack. Push the last target before rendering to a new one, then pop it back when you're done. This might be able to work behind the scenes automatically. I haven't tried it yet though.