Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Aeotaph

Fairy dust?

This topic is 5450 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

If this is a ridiculously difficult question to answer, I apologise, I''m just looking through a few demos and noting its absence... but it seems like the sort of thing that shouldn''t be too hard to do... How would one go about creating an object which actually radiates light (presumably decaying gradually around it over some set distance back to the ambient level) - instead of the illumination only being visible by its effect on other objects? Like a will-o-the-wisp or a candle-flame... -- Mercy

Share this post


Link to post
Share on other sites
Advertisement
I think that kind of thing is typically done by blending a "light flare" type texture around the object. That''s how I''ve seen it done in the past, and it''s a pretty good effect.

Share this post


Link to post
Share on other sites
My thoughts would be to re-render the object into a texture, and then blend that texture over the top of the scene as a post-process effect (use ortho). Making the texture quite low res and enabling filtering on it would automatically add a fading effect as well, for free. Not sure about it''s performance overhead, however.

Share this post


Link to post
Share on other sites
The idea of using a lens flare texture is a nice one... I shall have to try this...
Let me show my n00b-ness again and ask what is "ortho"?

--
Mercy

Share this post


Link to post
Share on other sites
Check out NVIDIA''s developer website for some articles on rendering glow effects. That''s really what you''re looking for, and the techniques they describe look really good.

Share this post


Link to post
Share on other sites
I was just reading about GL_EMISSION, can someone give me a bit more detail on how to use it?

--
Mercy

Share this post


Link to post
Share on other sites
GL_EMISSION is just a material property like GL_AMBIENT or GL_DIFFUSE and it''s used exactly the same way. This property is basically adding color that isn''t affected by light.

Share this post


Link to post
Share on other sites
... hmm.
Sorry, now I''m more confused o.o
I thought GL_DIFFUSE and GL_AMBIENT were properties of a light?
I''m still working my way through the first couple dozen Nehe tutorials - the ones where Delphi code is available - so maybe this is hideously wrong...?

--
Mercy

Share this post


Link to post
Share on other sites
I'm not so sure about this on OpenGL's point-of-view (it's most likely the same), but in raytracing, diffuse light is the measure which describes the relation between incident (the light that falls on a surface) and excident (the light that leaves a surface). In a nutshell, diffuse describes the intrinsic brightness of a surface/body. Ambient light is the base brightness of a surface/body.

By default you have your light which has a certain color and doesn't change as it is reflected off a surface/body. Emission allows you to add a supplemental component that describes the sufrace's/body's color.

This adds up to something like this (off the top of my head):

eye_brightness = incident_brightness * surface_diffuse + surface_ambient (+ env_ambient)

[edited by - crispy on August 18, 2003 9:35:46 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!