sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > Python & Plugins

Reply
 
Thread Tools
dudecon dudecon is offline
Member
 
Join Date: Sep 2007
Posts: 98
Note:
This project now has a SorceForge account. I'll keep up with the thread too, but I'm trying to move operations over that way.

http://sourceforge.net/projects/automasonry/

Latest development version, may produce strange results

Stable version, w/ GUI

I looked around a bit for a scrip that would do this, but couldn't find one. It seems that someone must have done this before, maybe I wasn't looking hard enough.
Anyhow, I decided to make a wizard that will build stone/brick masonry walls, paths, towers, etc. Here's my first pass at one, about a week and a half of work in this script so far. All the pictures are of the plain untextured geometry. All the walls seen can be made using the current GUI. Everything is properly registered, copy the script to your "scripts" folder:
(note, the code is too long to paste into a block, here is the link)
http://www.peripheralarbor.com/Auto_Masonry.py
Go to the "Python Window" Scripts->Wizards->Auto Masonry



A few questions:
Would assigning each block it's own UV cords on a UV layer be helpful for texturing? Should I spend a lot of time improving the current GUI? Will you power users just hardwire the code to get the extra functionality you want? Are there other scripts which do the same/similar things, perhaps that could be merged? Would anyone be interested in a version which makes a lot of individual linked blocks for physics experiments? Comments, suggestions, critiques are welcome.
EDIT:
A few responses to comments:
The pathway was made by creating a tall narrow "wall" and rotating it to a horizontal position. Afterwords I added the Curve modifier (the script didn't do the pathway automatically).
The "inner" mesh is actually the grout, while the outer one is the stones. This way you can sub-surf and smooth the stones and grout seperately. It also allows easier texturing.
Quote:
Hoehrer
Quick guide to use the script (with paths):

* Add a Path (Add->Curve->Path)
* Select the path
* Go to the "Python Window" Scripts->Wizards->Auto Masonry
* Tweak settings and click "Make this wall"
Thanks Hoehrer! Forgot to mention that...

Last edited by dudecon; 15-Feb-08 at 06:59. Reason: SorceForge link
#1   Old 17-Sep-07, 06:26   
Reply With Quote


Mmph! Mmph! is offline
Banned Member
 
Join Date: May 2007
Posts: 3,020
Wow! what a neat idea!

Please make a nice GUI
#2   Old 17-Sep-07, 06:32   
Reply With Quote
dudecon dudecon is offline
Member
 
Join Date: Sep 2007
Posts: 98
Well, it already has (I think) a "pretty nice GUI". The trick is getting at the guts of functionality (multiple door placement, preset offset values for edges, overhangs, etc) without overloading the user. Perhaps popup menus are the way to go.
I forgot to mention (for those who don't code) It's all properly registered, so all you have to do is copy it into the 'scripts' folder and Blender will pick it up. It shows up under the "wizards" submenu.
#3   Old 17-Sep-07, 06:40   
Reply With Quote
Meta-Androcto's Avatar
Meta-Androcto Meta-Androcto is offline
Member
 
Join Date: Aug 2006
Location: australia
Posts: 2,356
Wow, that works great, Blender 2.44 & Blender 2.45.
Made some great towers just using a bezier circle.
Closed curves gave a weird result. (but still awesome)
How did you do the path?
Can 2 or four sides be made at once? (as in a whole building)
Even as it is, it's really great.
Why does it make two mesh? Inner & Outer.
Roof tiles for towers, other wall types would be great.
btw, gui is ok, well commented.
I look forward to any updates.
m.a.
#4   Old 17-Sep-07, 07:23   
Reply With Quote
julesd-g6's Avatar
julesd-g6 julesd-g6 is offline
Member
 
Join Date: Sep 2006
Location: london
Posts: 293
This really is very sweet and for me it clearly has a future so keep up the coding......

So when I tried it, I hadn't read any docs (if there is any) so here are my thoughts..

The link should for the script should be http://www.peripheralarbor.com/Auto_Masonry.py (because file:// does not work)


Once I had managed to get a download of the script, I built a little castle turret, selected it and ran the script.... The script created me a new wall all together, which looked good, but was not what I expected. So I opened the script up and it says it needs paths... OK fair enough... but is there any chance you can get it to fill a surface (a bit like discombobulator does?)

I like Meta ^^^ above cannot fathom how you did the path

A great start to a useful script none the less... Maybe some presets would also help... "Lego, Red Brick, Breeze Block" etc....

J
............................................
My blender and other stuff can be found here :- my blog
Need to import midi to ipo's? :- Midi_Import_X
#5   Old 17-Sep-07, 08:35   
Reply With Quote
rusted rusted is offline
Member
 
Join Date: Mar 2006
Posts: 150
hi,
sounds very interesting!will try.
#6   Old 17-Sep-07, 12:10   
Reply With Quote
Hoehrer's Avatar
Hoehrer Hoehrer is offline
Member
 
Join Date: Nov 2005
Posts: 442
Wow, very nice script. Kudos to you for creating this dudecon

I would even go so far as to propose this for inclusion in blender

Quick guide to use the script (with paths):

* Add a Path (Add->Curve->Path)
* Select the path
* Go to the "Python Window" Scripts->Wizards->Auto Masonry
* Tweak settings and click "Make this wall"

Werner
............................................
UFO: Alien Invasion
Tutorials: Modelling a dice | Create a heightmap from a plane | Fill faces | Mix Materials via Nodes
#7   Old 17-Sep-07, 12:43   
Reply With Quote
Meta-Androcto's Avatar
Meta-Androcto Meta-Androcto is offline
Member
 
Join Date: Aug 2006
Location: australia
Posts: 2,356
Making along blender path is not a problem,
as above, best results in object mode.
You can actually make a castle to plan.
how did the flat pathway be made so it curves through so beautifully.
m.a.
#8   Old 17-Sep-07, 13:30   
Reply With Quote
Cognis's Avatar
Cognis Cognis is offline
Member
 
Join Date: Dec 2006
Location: Denmark
Posts: 985
I vote for GUI. The actual results are already VERY impressive!
............................................
- >Blendopolis!<, settling a new, free online 3D community for all! (thread)
- Goodies: >3D sound< patch by Techmeology, jpbouza's >BlenRig<, of Dancing Dwarf fame, and Blendstorm!
#9   Old 17-Sep-07, 15:32   
Reply With Quote
dudecon dudecon is offline
Member
 
Join Date: Sep 2007
Posts: 98
I updated the first post with some responses to common questions: curves, the pathway, etc. It seems I gave the impression that there is no GUI, which is not true. It just doesn't access all the values that should be accessible for customization.(yet)
The way I'm finding the length of the curve is by converting it to a mesh and then measuring the length of the sides. Because of this, if a curve is closed it measures all the edges inside the surface as well, so I trap closed curves and assume that any closed curve is a perfect circle. That's why closed curves don't quite work the way they should. If anyone can tell me how to find the length of a curve some other way I'd love to hear it.
I'd like to make the option to make subsequent walls interlocking. That way you could make nice four sided buildings, very long walls, etc. For walls of very large dimension or small bricks I suggest creating several smaller walls and stringing them together. It is possible to crash Blender by making a wall too large (Is there a way to check for this?).
I'd like to be able to call the "Gothic Vaults" script from this one to get vaulted corridors. I'd like to add archways also (round and pointed). At some point the "grout" should be looked at. I'd like to make the grout a single surface instead of lots of blocks, but implementing that is going to take a bit more thought.
#10   Old 17-Sep-07, 16:11   
Reply With Quote
Ace Dragon Ace Dragon is online now
Banned Member
 
Join Date: Feb 2006
Location: Wichita Kansas
Posts: 12,952
This looks like Wizard's 2D procedural tiles texture in 3D, what about herringbone and freedom to make complex patterns. What about hexagonal and octagonal patterns?
#11   Old 17-Sep-07, 20:14   
Reply With Quote
dudecon dudecon is offline
Member
 
Join Date: Sep 2007
Posts: 98
Forgot to mention in the previous post: Thanks for all the positive feedback guys! I hope this script can help build some sweet castles some day.
Cyborg Dragon:
Wizard's 2D procedural tiles texture is great (looking forward to using it). Often, all you need for a floor is a good texture, so the actual geometry would be unneccesary. Actually, you often only need textures for walls too, but I digress.
Rows of rectangular blocks can have blocks of random width (because they are all the same height). As far as I know square tiling (like herringbone and octagonal) and hex tiling must have tiles of the same dimension (correct me if I'm wrong on this one). Bottom line is it eliminates the block randomization, which is pretty much all the Auto Masonry script does (apart from edge effects like doors, windows, and seamless wrapping). The exception would be mathematical tesselations (see Escher's "circle limit" series and others) but I'm not sure I want to tackle non-uniform tesselation...

However, making hexagonal, octagonal, and herringbone patterns in 3d is already pretty simple using an 'array' and 'mirror' modifier, since element spacing must remain the same to maintain the pattern. I think all of the stanard uniform tilings can be created (in realtime too!) using the builtin modifiers. I'll try it and report back later this afternoon.
Perhaps a similar but seperate script would be better for uniform (or hemi-uniform) tilings, as they are often used for floors, but not often for walls (other than the rectangular pattern). Perhaps an "Auto Paving" script that fills a pre-defined area? It could randomize the scaling, and height of individual paving stones and perhaps add random flaws (which I'd also like to re-introduce into Auto Masonry).
#12   Old 17-Sep-07, 21:55   
Reply With Quote
Ace Dragon Ace Dragon is online now
Banned Member
 
Join Date: Feb 2006
Location: Wichita Kansas
Posts: 12,952
You could very well create a small suite of scripts that would allow for all sorts of patterns, pavings, and walls, with flaws and such as well.

Wizard's tiles don't have random flaws and they don't have edge features, a suite of these scripts could be very interesting.
#13   Old 18-Sep-07, 01:07   
Reply With Quote
dudecon dudecon is offline
Member
 
Join Date: Sep 2007
Posts: 98
I worked up a script to do some complex tiling as a first step toward Cyborg Dragon's suggestion. It's still very beta, but I figured it needed it's own thread.
http://blenderartists.org/forum/showthread.php?t=105564
#14   Old 18-Sep-07, 05:49   
Reply With Quote
LukasT LukasT is offline
Member
 
Join Date: Jan 2005
Posts: 35
Could somebody send new link to script? I can't donwload it, it seems like server is down. I will try it tomorrow again, but if somebody could upload it, it would be cool
............................................
There is a light that shines in the darkness
Delirious?
#15   Old 01-Nov-07, 09:53   
Reply With Quote
SiriusCreative's Avatar
SiriusCreative SiriusCreative is offline
Member
 
Join Date: Oct 2007
Location: East Coast, USA
Posts: 106
Found out about this script in the BlenderArts Magazine article.
Very nice! Thank you for all of the work you put into this

Now it's time to get medieval
#16   Old 03-Dec-07, 16:38   
Reply With Quote
Mats Halldin's Avatar
Mats Halldin Mats Halldin is offline
Member
 
Join Date: Jun 2007
Location: Stockholm, Sweden
Posts: 547
I also found the script via BAM. Dudecon, thank you for your work and for sharing it! I played around with it today and had a lot of fun. I'm sure I will find great use of it.



A paved street I made in a snap, about one hour after having downloaded the script.

Thanks again
/ Mats
............................................
a.k.a. riorio / raveninorbit

Blender on FriendFeed: http://friendfeed.com/blender3d

Soft spherical alpha mask using material nodes:
http://blenderartists.org/forum/show...33#post1492133
#17   Old 08-Dec-07, 15:59   
Reply With Quote
MasterDomino's Avatar
MasterDomino MasterDomino is offline
Member
 
Join Date: Feb 2007
Location: Hamburg, Germany
Posts: 210
That's a great script! Thanks for sharing it with us.

Just found out about it in the Blenderart Magazine and gave it a try.
It would be great to generate a sidewalk, but there is one problem, because sidewalks usually have rather regular patterns. So every other row starts at the same point of length and then the next row starts "half a stone later". Not sure, if anyone understands what I mean, I find it hard to explain in English.

Do you think it would be possible to have a button in that script which allows this type of regularity (which I guess is a rather common type for many walls)?

MD
#18   Old 10-Dec-07, 21:04   
Reply With Quote
dudecon dudecon is offline
Member
 
Join Date: Sep 2007
Posts: 98
Hey you're welcome guys! Thanks for the encouragement.
Master Domino: Currently I believe the script will do what you are asking for. Try setting the min width and max width to the same value. All the stones will then be the same width (like bricks) and the offsets (full brick/half brick alternating) should show up. Let me know if this works for what you wanted. If not I'll see if I can make a work-around.
#19   Old 12-Dec-07, 18:16   
Reply With Quote
Rappybas's Avatar
Rappybas Rappybas is offline
Member
 
Join Date: Jun 2007
Posts: 120
This is very nice!!!
(Sorry for bump :P )

I made this:
............................................
My bunny model:
Look at my free bunny model here!
#20   Old 22-Dec-07, 02:05   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 02:10.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists