• Advertisement

Archived

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

Diffuse Shadows

This topic is 5373 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

Hi folks, I was looking to some pictures and wondering how to do with opengl the shadows like the ones from that pictures? Here are the pictures: [edited by - brucesinner on April 30, 2003 12:17:11 PM]

Share this post


Link to post
Share on other sites
Advertisement
The shadows you mean? There was alot on both pictures...

For the shadows you could use lightmaps, or maybe stencil shadow volumes...

And, erm... was that all?

Share this post


Link to post
Share on other sites
yes the shadows. It looks like some sort of blur effect was applied to them...I know how to do shadows, but mine always look only black, not blurred like this one...any tutorials, hints for this???

Share this post


Link to post
Share on other sites
I think you could do the same thing with soft shadows... But the only reason the shadows are like that are that there are many lights around, I think...

Share this post


Link to post
Share on other sites
firstly you are going to need multiple lights. then when you render it activate the accumilation buffer. when you are done rendering the shadows and lights then disable the buffer. check the OpenGL Blue book or the OpenGL Super Bible for more info.

Share this post


Link to post
Share on other sites
Actually blured shadows has to do with the size of the lightsource relative to the object.

The following picture should clear this up:



______________________________
My Website: [link]www.antondev.tk[/link]
or directly at http://home.attbi.com/~antonweb/
"I''ve read about...doom being used to manage unix programs(you "kill" the processes)" dede

Share this post


Link to post
Share on other sites
I would not recommend using the accumulation buffer. But if there is no other way....

It is horribly slow!!! And only runs in software on most cards these days.

Share this post


Link to post
Share on other sites
I''ve read a SGI paper about it. They just rendered the shadows several times, moving the light a bit each time (note they didn''t use 100% black shadows). Then, they just added the results together and got the cool and nifty blured shadows.

However, it wasn''t made in real time. I don''t think you will be able to get such results with current hardware, unless you''re just planning to make a tiny demo and not an actual game.

Share this post


Link to post
Share on other sites
It looks like those shadows have been done using radiosity rendering, which is not the same as using point sources which I think is what openGL works with.

It could be replicated using multiple light sources, but to get that sort of effect you looking at maybe 40 or 50+ in a hemisphere over the target. if you don''t have enough light sources you end up with lots of separate distinct shadows.

I''ve tried this and in can work very successfully with static scenes (lightwave with lightswarm), but real time graphics is going to be slow.

Can radiosity be done with openGL?

Share this post


Link to post
Share on other sites
I didn''t realized what "snisarenko" said...the shadows always have to be done by ourselves, using buffers, or other way, but by ourselves didn''t it? Can''t think a way that the size of the light source could affect it...

I think that multiple light sources, with each one at a diferent distance from the object and the shadow with different levels of darkness making some kind of degrade effect...am I right? or said stupid things?

Share this post


Link to post
Share on other sites
The size does matter. Thats how shodows are diffused in real life. I got my info from "Andvanced Animation and Rendering Techniques" book .......

______________________________
My Website:
or directly at http://home.attbi.com/~antonweb/
"I''ve read about...doom being used to manage unix programs(you "kill" the processes)" dede

Share this post


Link to post
Share on other sites
The size of the Sun relative to the Earth is what creates the umbra and penumbra durin a lunar eclipse. The size matters ALOT. Unfortunately, I don''t think any graphics API can replicate that effect realistically.

--------------------------------------
I am the master of stories.....
If only I could just write them down...

Share this post


Link to post
Share on other sites
The high end graphics programs can render like that, it''s called Global Illumination. Light comes from all directions.
Doing it realtime in OGL, good luck. Be sure to write a tutorial on it for me if you figure it out

Share this post


Link to post
Share on other sites
snisarenko I have that book!! but I didn''t read it all, I will look at it right now..thanks a lot!

Share this post


Link to post
Share on other sites
If you use projective shadow mapping (where you render the object to a texture, then project the texture onto the scene), you can simply use a low resolution texture and stretch it, and it will give blurry shadows... of course, that''s just an idea .

Share this post


Link to post
Share on other sites
Look up "jittering". There''s no way of getting shadows as good as those, but you can at least get some soft shadows from it.

Share this post


Link to post
Share on other sites

  • Advertisement