Advertisement
This Python script by Michael Davies will create spaceships with a lot of greeble for you.
Check it out:
About the Author
Bart Veldhuizen I have a LONG history with Blender - I wrote some of the earliest Blender tutorials, worked for Not a Number and helped run the crowdfunding campaign that open sourced Blender (the first one on the internet!). I founded BlenderNation in 2006 and have been editing it every single day since then ;-) I also run the Blender Artists forum and I'm Head of Community at Sketchfab.
Advertisement
24 Comments
Change a tiny bit of code and suddenly you have a futuristic weapon generator! :)
Great work!
I have a problem with it, at least under linux.
When I enable the plug-in I see this error:
Traceback (most recent call last):
File "/usr/share/blender/2.77/scripts/modules/addon_utils.py", line 330, in enable
mod = __import__(module_name)
File "/home/lorenzo/.config/blender/2.77/scripts/addons/SpaceshipGenerator-master/__init__.py", line 18, in
from add_mesh_SpaceshipGenerator import spaceship_generator
ImportError: No module named 'add_mesh_SpaceshipGenerator'
Any idea?
Same problem under windows 10
This is the same problem that has been answered on over on BSE http://blender.stackexchange.com/q/16665/2217
Just change the folder name to "add_mesh_SpaceshipGenerator" then it will work.
I'm having the same problem under Ubuntu.
hi, just change the folder name to add_mesh_SpaceshipGenerator to get it working.
Great job here, thanks.
Wow, this looks very nice (normally I find addons like this lacking but this one is convincing. )
There is a readme.cmd - Content ->
# Spaceship Generator
A Blender script to procedurally generate 3D spaceships from a random seed.
![Spaceship screenshots](https://raw.githubusercontent.com/a1studmuffin/SpaceshipGenerator/master/screenshots/spaceships_grid.jpg)
Usage
-----
* Install Blender 2.76 or greater: http://blender.org/download/
* Download newest `add_mesh_SpaceshipGenerator.zip` from the [Releases](https://github.com/a1studmuffin/SpaceshipGenerator/releases) section
* Under File > User Preferences... > Add-ons > Install From File... open the downloaded ZIP file
* Under File > User Preferences... > Add-ons enable this script (search for "spaceship")
* Add a spaceship in the 3D View under Add > Mesh > Spaceship
How it works
------------
![Step-by-step animation](https://raw.githubusercontent.com/a1studmuffin/SpaceshipGenerator/master/screenshots/step-by-step-animation.gif)
Watch on YouTube: https://www.youtube.com/watch?v=xJZyXqJ6nog
* Start with a box.
* Build the hull: Extrude the front/rear faces several times, adding random translation/scaling/rotation along the way.
* Add asymmetry to the hull: Pick random faces and extrude them out in a similar manner, reducing in scale each time.
* Add detail to the hull: Categorize each face by its orientation and generate details on it such as engines, antenna, weapon turrets, lights etc.
* Sometimes apply horizontal symmetry.
* Add a Bevel modifier to angularize the shape a bit.
* Apply materials to the final result.
* Take over the universe with your new infinite fleet of spaceships.
Extreme examples
----------------
The following screenshots were created using extreme values for the number of hull segments and asymmetry segments to show how the algorithm works.
![Extreme spaceship screenshots](https://raw.githubusercontent.com/a1studmuffin/SpaceshipGenerator/master/screenshots/extreme_examples.jpg)
Tips and Tricks
---------------
* By default the script will delete all objects starting with `Spaceship` before generating a new spaceship. To disable this feature, remove or comment out the call to `reset_scene()` around line 735 in the main function.
* You can provide a seed to the `generate_spaceship()` function to always generate the same spaceship. For example, `generate_spaceship('michael')`.
* The `generate_spaceship()` function takes many more parameters that affect the generation process. Try playing with them!
Credits
-------
Written for fun as part of the [/r/proceduralgeneration](https://www.reddit.com/r/proceduralgeneration/) June 2016 [monthly challenge](https://www.reddit.com/r/proceduralgeneration/comments/4mn9gj/monthly_challenge_7_june_2016_procedural/).
Released under the [MIT License].
Authored and maintained by Michael Davies.
> GitHub [@a1studmuffin](https://github.com/a1studmuffin)
> Twitter [@butterparty](https://twitter.com/butterparty)
Special thanks to [@panzi](https://github.com/panzi) for bugfixes, a proper GUI and build script. Also to [@mjrthemes](https://github.com/mjrthemes) for bugfixing.
[MIT License]: http://mit-license.org/
This is a cool script that does a nice job of making spaceships. And would also make a nice base model for a much more complex design if that is the way you wanted to go. I am quite impress with this little script. Thanks to the author of this little gem.
For all people that have problems to switch on the addon after installation:
1. - If you have installed the addon then remove it with Blender (in Blender go to User preferences -> Add-ons, in the
Spaceship-generator addon you see the remove Button)
2. - Unzip the file and rename the unzipped folder (with the python-scripts) from "SpaceshipGenerator-master" to
"add_mesh_SpaceshipGenerator".
3. - Then zip the file again to add_mesh_SpaceshipGenerator.zip . After that you can install this addon without a
failure-message
I hope my short instruction help you with this addon. Awesome addon for Blender.
Thank you Bart! I just used it to Banner image for my game :)
this is ridiculous, I cant even model one and this fella over here can make an infinite amount
My quick test on this....at https://postimg.org/image/5uulvz76v/
Sweet! How did you like working with the script?
Just awesome...Hats off to developer :)
Behavior of this tool is completely random, no idea whats so ever what might be the result after providing inputs :)
For surprising designs it is the best for spaceships till now.
I changed the file name but it still doesnt work.
It says:
ImportError: cannot import name 'spaceship_generator'
I love, love love these models...
But how do we export the textures for these models with the fbx versions of the models?
Is there a tutorial available for newbies using these models from blender to unity..?
I have downloaded this and managed to have it generate me a ship but where do I change it as in the instructions like where do I find generate_spaceship()
Stephen, you'll find it on line: 510 in spaceship_generator.py.
# Generates a textured spaceship mesh and returns the object.
# Just uses global cube texture coordinates rather than generating UVs.
# Takes an optional random seed value to generate a specific spaceship.
# Allows overriding of some parameters that affect generation.
def generate_spaceship(random_seed='',
num_hull_segments_min=3,
num_hull_segments_max=6,
create_asymmetry_segments=True,
num_asymmetry_segments_min=1,
num_asymmetry_segments_max=5,
create_face_detail=True,
allow_horizontal_symmetry=True,
allow_vertical_symmetry=False,
apply_bevel_modifier=True,
assign_materials=True):
if random_seed:
seed(random_seed)
Also, download Sublime Text 3 for editing or VSCode (Visual Studio Code) or even easier: NotePad++. ALL FREE...
I have notepad++ used it for years.
Where is the file located once its been added to blender please?
Stephen,
It's located here for me... D:\Users\Peter\Documents\Blender Files\add_mesh_SpaceshipGenerator
The file is spaceship_generator.py or __init_.py
Cheers,
HMU at peter at projectabaddon dot com
Pete
I'm a senior software engineer and write A.I. Code for a company I work for using NODE, Angular 7, Bootstrap 4, Git, Jenkins and love this. I'm 59 and been coding for over 35 years. The .py code is commented well, easy to read and navigate. My only question is will this work for any type of shape; albeit - circle, ellipse, polygon, triangle, etc...
I'm the creator, writer and producer for http://www.projectabaddon.com and I have a challenge for all of you. I need ships and space station as well as a MARS that's inhabited. My world is 350 years in our future. Check out the website I developed. I'm working with Dan Curry, Michael Demeritt, Thomas P Vitale (former head of Syfy and Chiller), Rick Sternbach and others. I'm working with Steve Longi (Longitude Entertainment) as a client of his, to help me hon the script for prep to pitch a various studios including Warner Bros and SONY (who I've met with last February).
Thank you for this and my experience as an Architectural Draftsman from the 70's - 00's and using AutoCAD helps me to ramp up quickly with Blender.
The script is not detected in Blender 2.80