Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: Need some programming help

  1. #11
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    867

    Default

    Man, that's frikkin awesome. This guild rocks!

  2. #12
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Post

    A few more - if you need another tex then let me know.

  3. #13

    Default

    Redrobes-

    If you can, apply the thatch texture without the lighting effect. That way if all the houses are dropped/rotated on the same transparent layer, you could just do a select by alpha and recreate the shapeburst then run your own light effect so the shadows all agree!

    -Rob A>

  4. #14
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Post

    Ok, since I posted a few and what your asking is the advanced thing then here I have posted the "Anti Shadow" map (honest, its not all black). Add this to any of the images and it removes the lighting effect.

    Heres my height map too incase you can register it with the other images and cut them out together of different layers to get at the shadows for them.

  5. #15

  6. #16
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,549

    Default

    The traditional solution for placement is to draw walls/roads/rivers into an occupied mask, then do a shapeburst (distance transform or DT) on the whitespace left over. The value of the DT is the distance from the occupied areas. The gradient of the DT is the angle at which the buildings should be placed to be parallel to the occupied areas. Place a set of buildings within some distance of the roads and render into the occupied mask. Apply additional rounds of building growth and masks to get the final result.

  7. #17
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,549

    Default

    Context-free L-systems can give good results but they suffer from the fatal flaw that they write over themselves repeatedly. Context-sensitive L-systems have much the same problem. Environmentally-sensitive L-Systems, however, should be able to model street maps quite well. When I get through the 230 other things on my list I might get around to working on such as beast.

  8. #18
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,193
    Blog Entries
    8

    Post

    Yeah, I kinda feel that you would need to put some humanity and irrational stuff in there to make it look like a city. Some rules about how to access the buildings, people taking shortest path and that kind of thing. I reckon it would be driven by economics to pack as many houses in with least amount of space wasted. Stuff like that. I have said a few times on here that it would be grand to have a program that did that on a huge scale for not just buildings but characters in the city and a full set of parameters driving how they act. It would be great to use that as a mechanism to drive what they do, where they go and ultimately where they build which would grind out cities with economic zones in them and feasible structure.

  9. #19
    Guild Adept Alfar's Avatar
    Join Date
    May 2009
    Location
    Denmark
    Posts
    276

    Post

    Actually... I'm already working on something...

    Edit: Also, I played around a bit more with Context Free, got this (attached) - sometimes the script spins itself into oblivion and you have to stop it, other times, it makes something that could at least somewhat look like a town - or cut in pieces and used for town creation.

    Edit (2): I'm bored.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	streets.png 
Views:	48 
Size:	419.8 KB 
ID:	14888   Click image for larger version. 

Name:	town.png 
Views:	68 
Size:	109.3 KB 
ID:	14890  
    Attached Files Attached Files
    Last edited by Alfar; 07-16-2009 at 07:53 AM.

  10. #20

    Default

    I think RobA posted a link to a research paper on using L-systems for city modelling. It's a must read if you're thinking of coding something like this as it takes you through the main steps the researcher used to make his own L-system and there's lots of references to other works / research in the bibliography.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •