[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Heat hazes
Adam D. Moss wrote:
> Katie Lucas wrote:
>
>>I've been playing "Jak and Daxter" on the PS2 recently, and there's
>>this very nice effect with heat hazes rising from torches and
>>things. The PS2 is structured around OpenGL,
>
>
> I wish it were true that the PS2 is structured around OpenGL!
> Is it, indeed?
I wouldn't say it was structured around OpenGL - but there is a
reasonably efficient partial OpenGL implementation for it.
>>so it may be an OpenGL
>>effect - any ideas how it's done?
>>I can think how to do it with a per-pixel texture processor (look at
>>the existing image and distort it, but is there a reasonably fast way
>>without that?
>
> Without having seen it firsthand, the way I imagine it's done is that
> the scene is drawn approximately back-to-front and that when it comes
> to render the torch the 'behind the torch' framebuffer contents are
> sucked into a texture (PS2 has pretty fast paths for fb->texture
> and render-to-texture) and drawn as a billboarded mesh with its
> vertices wiggled.
Yes - that seems most likely.
> Another possibly-nicer way would be simply to set up a vertex
> program to wiggle the vertices a little in the volume behind the
> torch from the eye's point of view.
That's only going to work if the polygons for the objects behind
the torch are reasonably small compared to the size of the torch.
My bet is that they suck the contents of the image around the
area of the torch into a texture and re-render them with some wiggle.
Another alternative is that they might concievably render the polygons
that are behind the torch directly into a texture map. On some hardware,
the data path from frame buffer to texture is very slow and it can actually
be faster just to re-render those polygons directly into the texture map.
Which of those things you do depends on the ratio of the speed of rendering
to the speed of the frame-buffer-to-texture pathway and the amount of
overdraw in the area behind the torch.
----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1@airmail.net> WorkMail: <sjbaker@link.com>
URLs : http://www.sjbaker.org
http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
http://prettypoly.sf.net http://freeglut.sf.net
http://toobular.sf.net http://lodestone.sf.net