Page 1 of 4 1234 LastLast
Results 1 to 10 of 32

Thread: Need some programming help

  1. #1

    Post Need some programming help

    I'm doing a map commission and I need some passable outlines of larger buildings which are more than just rectangles. There is a free piece of software called 'context free' which I think would allow one to make dozens of random shapes in a building-like form. Below are some examples I've taken from their gallery of the shapes it can generate.

    The only problem is that I am not a natural coder. I suspect the code to produce black building silhouettes would not be difficult for someone who was used to writing code. I don't need the buildings to be organised in any particular way, I just need lots of buildings generated so I can pick the ones I like and drop them into photoshop.

    Can anyone help?

    Thanks in advance,

    Ravs
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	full_631.png 
Views:	91 
Size:	281.7 KB 
ID:	14848   Click image for larger version. 

Name:	full_690.png 
Views:	144 
Size:	48.7 KB 
ID:	14849   Click image for larger version. 

Name:	full_1336.png 
Views:	117 
Size:	24.7 KB 
ID:	14850   Click image for larger version. 

Name:	full_1550.jpg 
Views:	76 
Size:	92.4 KB 
ID:	14851  

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

    Post

    Something like these?

    The zip file is the Context Free script that produced them.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	buildings.png 
Views:	197 
Size:	20.4 KB 
ID:	14852  
    Attached Files Attached Files

  3. #3

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

    Default

    Most welcome. I found the exercise refreshing

  5. #5
    Community Leader Facebook Connected Ascension's Avatar
    Join Date
    Jun 2008
    Location
    St. Charles, Missouri, United States
    Posts
    8,392

    Post

    That is uber cool. Guess I gotta download yet another must have tool.
    If the radiance of a thousand suns was to burst at once into the sky, that would be like the splendor of the Mighty One...I am become Death, the Shatterer of worlds.
    -J. Robert Oppenheimer (father of the atom bomb) alluding to The Bhagavad Gita (Chapter 11, Verse 32)


    My Maps ~ My Brushes ~ My Tutorials ~ My Challenge Maps

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

    Default

    @Alfar. Now use the Thatch tutorial to generate textures at 90° to the building edges. And remember, some of those edges are curves.

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

    Post

    Alfar - thats superb. I have never looked at this context free but it looks neat for what you did with it. Rep heading your way.

    Toff - you must have read my mind too. If there is a way to generate a height map for those shapes using some blur etc then the thatching script would sound like a great tool to get oodles of thatched or tiled buildings.

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

    Post

    A shapeburst or Distance Transform (same thing) should convert the basic mask to a heightfield as attached. Some of the ridgelines look a little peculiar with this method but it's fairly plausible overall.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	buildings copy.png 
Views:	160 
Size:	67.3 KB 
ID:	14872  

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

    Post

    That looks cool - well done. I didnt know how to get to that without writing a program to do it. Shall I try it in the thatcher. Gimme a while and ill see what it makes of it. Its similar to the last time I tried this sort of thing...

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

    Post

    Actually this has worked extremely well (Edit -- darn it, it really has done well. That shape burst is the business !). If only we could solve placing these shapes into a city bounded by walls and roads...

    Nice little collaboration going on here eh ?

    Right so do you want tiles, slates, woodblock - we have it all baby !
    Last edited by Redrobes; 07-15-2009 at 07:52 PM.

Page 1 of 4 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
  •