Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Need some programming help

  1. #1
      ravells is offline
    Community Leader Gracious Donor ravells's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    10,905

    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 Need some programming help-full_631.png   Need some programming help-full_690.png   Need some programming help-full_1336.png   Need some programming help-full_1550.jpg  

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

    Post

    Something like these?

    The zip file is the Context Free script that produced them.
    Attached Thumbnails Attached Thumbnails Need some programming help-buildings.png  
    Attached Files Attached Files

  3. #3
      ravells is offline
    Community Leader Gracious Donor ravells's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    10,905

    Default

    You are an absolute angel! Thank you so much and have lots of rep!

    Thank you, thank you!

    Ravs

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

    Default

    Most welcome. I found the exercise refreshing

  5. #5
      Ascension is offline
    Community Leader Ascension's Avatar
    Join Date
    Jun 2008
    Location
    St. Charles, MO
    Posts
    8,216

    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
      töff is offline
    Guild Artisan töff's Avatar
    Join Date
    Nov 2007
    Location
    Fresno, California USA
    Posts
    864

    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
      Redrobes is offline
    Software Dev/Rep Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    4,802
    Blog Entries
    4

    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
      waldronate is offline
    Software Dev/Rep Gracious Donor waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    1,660

    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 Need some programming help-buildings-copy.png  

  9. #9
      Redrobes is offline
    Software Dev/Rep Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    4,802
    Blog Entries
    4

    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
      Redrobes is offline
    Software Dev/Rep Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    4,802
    Blog Entries
    4

    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 123 ... 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
  •