flipCode - Tech File - Conor Stokes [an error occurred while processing this directive]
Conor Stokes
(aka DirtyPunk)
Click the name for some bio info

E-Mail: cstokes@crytek.com

   06/05/1999, A Little Right Brained

Well, I've been looking at the lay of the land on the Claustrophobic Irony front, and decided, that as that land lies in a urban fashion, that I am going to write a fractalic city generator, that generates some cool buildings, and roads and such. I'm looking at generating the roads first, and the buildings second, and possibly adding sub terranian stuff as well.

I've thought of some Ideas to produce some really cool buildings, mainly using some techniques considered the ground rules of fractals. Eg the roads can be made by breaking lines at "random" points. Eg you have a triangle, and you choose 2 edges of that triangle, and split them at random points, and connect them. Pretty simple. You then use this pattern for the base shape of your building.

Of course you mix some up. I'm not sure how many of you are familiar with Koch (sounds rather |)|R+Y) patterns. Well, some interesting random variations, with random stopping points and random split points, can create nice shaped buildings. If you wanted to create a nice futuristic environment, I am sure some Koch buildings would be cool. Another very si-ba Punk thing would be to do some nice perlin noise based "dirty" detail textures, to really give that gritty feel. Of course the atomspheric lighting needs to be used as well...

And I am still thinking about how to do that. I thought really hard about calculating finite diffuse using fractals and rays to see what happened. I am also thinking about different thinkgs. I like the idea of using vertex shading, and creating spider webbed highlights, and LOD based geometry lighting (with some pregenerated, some on the fly). I also had a quick look at canned light sources. But I saw the word lumiagraph, and was scared off by the size ;-)

Spherical subdivision, (splitting up a sphere into segments and such) seemed like a good idea. One thing that can be done with this is using a 4d "pulse" representation, and splitting the sphere at shadow occluders and using polar, or unit coordinates to represent the sphere segments. Being a pulse, these spherical segments also follow wave laws, for both diffuse and specular systems. Although, it is important to note that diffraction for light can be pretty much ignored. This is because diffraction is inversly proportional to the size of the gap, and proportional to wavelength (if I remember correct). Light has a very small wavelength, in the nanometers. So you need a rather small gap to get actual noticable diffraction, and then we wont be able to probably see it any way.

The representation I prefer involves using splitting planes from the lightsource, creating beams, that get larger away from the lightsource. We split surfaces depending on where these beams hit them. We can then use linear shading and get a reasonable result. Also note, that because a beam can be split up, we can create soft shadows be toning the linear shading down like antialiasing. So this can allow for realtime soft shadows (eg something enters one of these "beams" then the things behind it are also shadowed). Of course, we have that demonic thing called LOD, which helps us make this viable, by checking the difference between nearby points. So you end up with more detailed lighting closer up ;-) While this is not radiosity, it is pretty cool.

And I like the idea of using 2 passes currently. First on texture+vertex diffuse lighting, second on detail mapping. The idea of using specular lighting based on a third pass is viable. But it could be applied to vertex lighting, be simply ripping values out of a phong map, and using a color look up. I'll see. A n number of environment map passes for specular lighting is ridiculous. Thank god for OGL's easy optimization though. Does anyone every use saved lists? If you used OGL rotation and transformation, then you could compile each polygon statically as a display list couldn't you? I can use vertex arrays otherwise. Compiled vertex arrays are not supported by all drivers.

  • 12/29/2000 - Techfile From Somewhere Different
  • 10/10/2000 - Some Fun, And A Cameo Appearance
  • 08/10/2000 - Déjà vu - And I've Done It Before
  • 07/08/2000 - Various Loose Ends To Hang
  • 05/15/2000 - The Way To Hit A Ball With A Bat. Or Not
  • 03/28/2000 - The Fine Art Of
  • 02/13/2000 - A Life Time of Learning, Teaching and Eating M&Ms
  • 12/09/1999 - Strangeness And Wondering If You Are Taking Innovation A Tad Too Far
  • 11/12/1999 - How to Break Exam Tension? Update Your Techfile
  • 09/14/1999 - Lots of Ramblings, personal things and comments on why SNFU
  • 08/23/1999 - Trials and Tribulations of Being Cerebrally Defunct
  • 07/29/1999 - Quick Update about Stuff and Things
  • 07/25/1999 - I'm Back Baby
  • 07/01/1999 - Is it so? Or am I just a Psycho Babbling Mental Hobo, who's Brain has No Home?
  • 06/25/1999 - Another Couple of Things
  • 06/17/1999 - I Am A Naughty Little Boy ;( But I Have A Way To Make Up
  • 06/16/1999 - What the hell? A new data structure for visibility? I don't know, I haven't heard of it.
  • 06/05/1999 - A Little Right Brained
  • 05/12/1999 - A Couple O Things
  • 05/08/1999 - Pre Computable Nice Visibility Sets
  • 05/04/1999 - More on Volumetrics
  • 04/30/1999 - Generic Update
  • 04/27/1999 - Spherical Volumetric Rendering (Mapping)
  • 04/25/1999 - Fractal Curves, Emulation Of Nature
  • 04/25/1999 - Claustrophobic Irony Level Loading and Manufacture
  • 04/24/1999 - Visibility Ramblings
  • 04/21/1999 - Why Software Rendering Is Not Dead
  • 04/17/1999 - Optimizing For Specific 3D Hardware

  • This document may not be reproduced in any way without explicit permission from the author and flipCode. All Rights Reserved. Best viewed at a high resolution. The views expressed in this document are the views of the author and NOT neccesarily of anyone else associated with flipCode.

    [an error occurred while processing this directive]