Shinning Flare effect

Started by
6 comments, last by yanuart 21 years, 10 months ago
I saw a cool demo which shows a person''s sillhoute with shinning flares around it.. Anybody knows good resources and tutorials on this subject ?? Some basic stuffs and ideas will be just fine.. Thanks..
Ride the thrill of your life
Play Motorama
Advertisement
I''m not sure which effect exactly you''re referring to, so I might be on the wrong track.

If you just need to outline an object with some shiny stuff you can do the following. When you load the model generate neighboring triangles information (for every triange figure out which triangles share edges with it). Then at runtime, once the object is transformed, go through all triangles. If one of the neighbor triangles faces in a different direction then yours (meaning away from the camera, facing the camera) it means that this edge is a part of the silhouette. Record all edges with that property. Then just render some alpha blended quads with shiny textures for every silhoutee edge and you should get this effect.
Great idea on how to get the model''s sillhouete, but the shinning flare that I''m talking about.. hmm.. do you know the shinning flare demo on the NVIDIA SDK ?? the explanation that comes with it doesn''t give me much..
Ride the thrill of your life
Play Motorama
There is another nice method that does not need knowledge of the object''s silhouette. It takes more performance though.

Render the object you want to be shiny in an offscreen buffer, without texture or lighting, just gouraud colour(s). Then run an image processing filter over it. You have several choices here: a simple blur filter will make the whole object glow, an edge-detect filter followed by a blur will only make it''s edges glow. Once you have something nice, bind the buffer to a texture and render it over your object, using some form of additive blending.

The results you get with that can be very impressive, but it takes considerably longer to compute than kill''s method.
One thing you could do is have 2 models, one normal and one an exact copy that is slightly scaled up and the color and texture is changed to a glowwy looking alpha texture. Then just render the first using Stencil Buffer and render the glowwy one with buffer check on. When done, disable stencil buffer.
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
Yann: why not just scale it in realtime and render it a couple of times with changed alpha? That''ll give the same effect without the software processing time.
quote:
Yann: why not just scale it in realtime and render it a couple of times with changed alpha? That''ll give the same effect without the software processing time.

Depends on your model. You won''t have a valid z-buffer using that way (since it will already be ''used up'' by the first pass), so it will only work with convex models. Of course, you could use the stencil buffer, and clear the depth buffer before rendering a new jittered pass. This would be a bit like a pseudo-accumulation buffer. But I think, it would be a real fillrate killer, especially if you want good quality glows with large models.

But it sould work well with small and simple models. I guess there is a cutoff point in the model complexity/performance ratio, from which the offscreen buffer method is going to be faster. Also depends on your 3D card (available fillrate, HW accelearted image processing, etc).

/ Yann
..check out www.quest3d.com. They have a contest and several demos of their product - one of them is a "flare contour" - which is a variation on a blur + shaders.. I Think that''s exactly what you need... also Nvidia effect browser have couple of those with the shader''s code..

... no magic ... just coding
... no magic ... just coding<br/>Blogger

This topic is closed to new replies.

Advertisement