Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

SpaceshipGenerator

> 编程语言
Open source

A Blender script to procedurally generate 3D spaceships

7.8K stars0 likes2 views
WebsiteGitHub

About

A Blender script to procedurally generate 3D spaceships

Spaceship Generator

A Blender script to procedurally generate 3D spaceships from a random seed.

Usage

  • Install Blender 2.80 or greater: http://blender.org/download/
  • Download newest add_mesh_SpaceshipGenerator.zip from the Releases section
  • Under Edit > Preferences... > Add-ons > Install... open the downloaded ZIP file
  • Under Edit > Preferences... > Add-ons enable the "Add Mesh: Spaceship Generator" script (search for "spaceship")
  • Add a spaceship in the 3D View under Add > Mesh > Spaceship
  • Expand the Spaceship tab that appears in the bottom left of the viewport to adjust procedural generation settings

How it works

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.

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!
  • You can replace the textures with your own ones. All textures are applied using global-space cube UVs. hull_normal.png is a normal map that adds extra surface "greebles". hull_lights_diffuse.png is an additive diffuse texture to set the color of the window lights. hull_lights_emit.png is an emissive texture to make the windows glow in darkness.

Credits

Written for fun as part of the /r/proceduralgeneration June 2016 monthly challenge.

Released under the MIT License.

Authored and maintained by Michael Davies.

GitHub @a1studmuffin Twitter @butterparty

Special thanks to @panzi for bugfixes, a proper GUI and build script. Also to @mjrthemes for bugfixing, and @LendoK for the 2.80 port.

Issues· 29 open

View all issuesOpen on GitHub
  • #69

    Can it be used to generate satellites?

    Updated Jan 26, 2026
  • #66

    Doesn't work with Blender4.0

    Updated Sep 6, 2025
  • #59

    Impossible to get it

    Updated Aug 16, 2025
  • #65

    Doesn't work (2025)

    Updated Aug 16, 2025
  • #60

    3.6.0 error

    Updated Nov 23, 2024
  • #58

    Which blender versions are supported? Can this be mentioned in the README in a table or so?

    Updated Mar 11, 2023
  • #55

    Update it for 3.4+?

    Updated Mar 9, 2023
  • #56

    Intergrate with Geomatrey nodes

    Updated Mar 9, 2023
  • #53

    Always

    Updated Dec 17, 2022
  • #49

    Additional Fixes for Blender 3.1

    Updated Dec 3, 2022

> Tags

Python3dblender-scriptsgame-developmentprocedural-generation

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言