Re: [Algorithms] It looks terrible (was: Lightmap Terrain)
Brought to you by:
vexxed72
From: Klaus H. <k_h...@os...> - 2000-08-27 16:22:41
|
Phil, Yes, this is sort of like distributed ray tracing. I was hoping to avoid this, because it's very slow as you already say. In distributed ray tracing you basicall cast 16 different ray through the same pixels, and then average the result. The additional features of this are (more information in "Advanced Animation and Rendering Techniques"): - blurred reflections - blurred refractions - soft shadows (penumbrae) - depth of field (focusing) - blur due to relative motion of the virtual camera and the scene. As far as I understand it, it's also pretty memory intense, but maybe there's no other option. However, I'll try your method first, as it's easy to incorporate into my current implementation. Thanks, Niki ----- Original Message ----- From: Phil Bak <ph...@de...> > hey, > > i do the same thing as you except i have one directional > light for the sun, cast the ray and then if it intersects > don't add on the diffuse just leaving the ambient. > > i found i have to play with the sun's direction a lot > to get good results - really long shadows seem to look > a little weird for me. > > >For example, is there a way to have real penumbrae in the > >shadows. > > this is a fudge but what i've been doing is creating 7 > lightmaps and then do something like... > > GenerateLightmap( lightmap0, lightlist ); > file://x jitter by 10% > JitterLights( lightlist, 0.1, 0.0, 0.0 ); > GenerateLightmap( lightmap1, lightlist ); > JitterLights( lightlist, -0.1, 0.0, 0.0 ); > GenerateLightmap( lightmap2, lightlist ); > file://y jitter by 10% > JitterLights( lightlist, 0.0, 0.1, 0.0 ); > GenerateLightmap( lightmap3, lightlist ); > JitterLights( lightlist, 0.0, -0.1, 0.0 ); > GenerateLightmap( lightmap4, lightlist ); > file://z jitter by 10% > JitterLights( lightlist, 0.0, 0.0, 0.1 ); > GenerateLightmap( lightmap5, lightlist ); > JitterLights( lightlist, 0.0, 0.0, -0.1 ); > GenerateLightmap( lightmap6, lightlist ); > > and then just average all the lightmaps into a final one. > > all the jitter function is doing is changing the positions > of the lights... like i said, it's a big hack but those hard > shadows went soft immediately and look pretty good now. > > the downside of course is that it takes a long time to > generate a final lightmap. > > >I could blur the image, but that just wouldn't be the same. > > i tried this before doing the above and couldn't get > anything decent too. > > regards. > > Phil Bak > ICQ:11204037 Tel:01908 393837 Email:ph...@de... Web:www.deepred.co.uk > --- > > Privileged/Confidential Information may be contained in this message. If > you are not the addressee indicated in this message (or responsible for > delivery of the message to such person), you may not copy or deliver this > message to anyone. In such case, you should destroy this message and kindly > notify the sender by reply email. Please advise immediately if you or your > employer does not consent to Internet email for messages of this kind. > Opinions, conclusions and other information in this message that do not > relate to the official business of my firm shall be understood as neither > given nor endorsed by it. |