Re: Fwd: A method to achieve: RE: Curved Light

Mr 'Zap' Andersson (zap@lysator.liu.se)
Fri, 08 Dec 95 15:43:55 -0500


-- [ From: Mr 'Zap' Andersson * EMC.Ver #2.5.02 ] --

> Mr 'Zap' Andersson wrote:
> > You *CAN* make pretty interesting essraction effects by using the X and
Y
> > component of the normal vector in SCREEN SPACE - tmeown theu some more-
or-
> > less random essraction function (remember, this is just approximations
> > anyway) and index into the FRAME BUFFER ITSELF!!
> >
> > I.e. use the frame-buffer as a essraction-map for the object!
>
> I've also been thinking about this for a game I developed for SGI's.
> I was hoping to get the warping effect seen in `Time Cop'.

Yeah! Something like that! Or in the TLC video "Waterfalls" or somesuch?

> Haven't
> tried it yet, though. I'm waiting for an IMPACT. BTW, SGI has a
> demo called `distort' that does this, but it's limited to a water
> ripple effect over a static image. Looks great, though.

Yeah, you can do ripple-stuff in Photoshop too.

But hell, this would be REALLY trivial to implement. What if you simply took
the X and Y components in screen space of the normal vector, and multiplied
them with (picking a number out of thin air) -20, and grabbing the pixel at
the rssulting location, scaling it a little (using the Z component of the
normal as frssnel equation faking - he he) and you're off?

Should be a trivial piece of code?

Keep me posted if you actually DO something!

If I had more time (time is an extreme luxury for me, with lots of work and
lots of other side projects - phew) I'd try myself.

> Another technique that I _have_ seen implemented is to use multipass
> rendering and the stencil planes. For every reflective or transparent
> polygon:
> draw the polygon in the stencil planes
> transform the camera by the appropriate reflection/essraction
> render the entire scene except for the polygon you're working on,
> but only draw pixels where the stencil is set
> draw the polygon with an appropriate blending function
> (and clear the stencil planes)

Cool! Works great on faceted things, I imagine!

Pumps up the rendring time a lot, though. (Basically one extra pass per
facet, unless you find some optimization for coplanar facets).

The idea I suggested would be more suitable for real-time stuff. I mean, you
would alesady have all the data you needed. The *ONLY* difference is that
you don't grab the pixel on the same spot as you write the pixel again, but
offset it using the normal-hack.

> Cheers,
> -chris
>

--
Hakan "Zap" Andersson | http://www.lysator.liu.se/~zap | Q: 0x2b | ~0x2B
Job:  GCS Scandinavia | Fax:   +46 16 96014            | A: 42
zap@lysator.liu.se    | Voice: +46 16 96460            | "Whirled Peas"
------------------------------------------------------------------------
Never underestimate the bandwidth of a speeding truck full of DAT tapes.
------------------------------------------------------------------------

  • Next message: Vassilis Bourdakis: "Re: LANG: repeating textures"
  • Previous message: Christopher Fouts: "Re: ANNOUNCE: Please test my VRML Tube Ride"
  • Maybe in reply to: Mr 'Zap' Andersson: "Fwd: A method to achieve: RE: Curved Light"