Town-portal effect in Dungeon Siege II

Started by
4 comments, last by SiliconMunky 18 years, 7 months ago
Good day, again! Anybody played or seen DSII? I'm interested in town-portal effect. Especially in its first part, when (I suppose): - the scene is rendered to a texture - the texture is rendered to a quad covering entire screen (so the transition is seamless) - the quad is being gradually deformed (it's supposed to simulate space-time distortion, or something like that) - that's the part I'm curious about It seems the quad is just being deformed, so its edges move behind the screen. But it might be that it was done only by modifying projection matrix... I would really like to make this effect. Anybody would give a shot and explain it?
Advertisement
I don't suppose you could point us at a movie which shows the effect? I've not seen DSII but I've got some ideas about how it might be working.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Well, I was afraid people may not know how the effect looks like. I was already considering linking a few screenshots, but I'm at work now...
I'll do that in a few hours, then.
I'm pretty sure you are right about the view being rendered to a quad and then the quad being rendered, but instead of deforming the quad I think they use a pixel shader to alter the texture coordinates. Then it looks like they render some sort of "swirly magical purply" effect on top of the view quad.

It's been a few weeks since I've seen the effect, but I think the two layers fade to black. You could have the top layer fade to black and fade its transparency away, or just alpha blend both of them to invisible (assuming the back buffer is cleared to black).
I managed to do 3 screens. Maybe not very self-explanatory, but here they are:

Stage 0

Stage 0.3

Stage 0.7


The quad of interest is being gradually lerped with a whole another scene, consisting of particles passing by the viewer (so we're likely *inside* the portal tunnel). That seems reasonable task.
But for the quad itself, I still don't know. If it really is some kind of texture coord perturbation/tweaking, what's the pattern?
Quote:Original post by deffer
But for the quad itself, I still don't know. If it really is some kind of texture coord perturbation/tweaking, what's the pattern?


It sort of seems to me that the values of the tex coordinates are getting shifted away from the center of the quad (0.5, 0.5). Ie. (0.4, 0.4) after the effect would become (0.35, 0.35), while (0.5, 0.5) stays at (0.5, 0.5), and (0,0) stays at (0,0). And as time passes you can lerp the degree of the effect so that (0.4, 0.4) ends up transforming to (0.2, 0.2).



I can't remember what happens in the middle of the screen. Does the center scrunch up and everything else stretch to the edges so that it gives the effect of forward motion?

This topic is closed to new replies.

Advertisement