Hacker News new | past | comments | ask | show | jobs | submit login
SpaceshipGenerator: A Blender script to procedurally generate 3D spaceships (github.com/a1studmuffin)
446 points by itsspring on May 31, 2020 | hide | past | favorite | 111 comments



It amazing the traction that Blender is now getting. After a lifetime of delivering our 3D courses in Max, our school has recently switched to blender. Despite being long-time Max users, all our staff having nothing but praise for Blender. They are like kids in a candy store. It was the Covid thing that precipitated this move. Max is platform-dependent, making it unsuitable for home use. Today I returned to Max to tweak an old project and I am reminded of what a funckwinkle it is: full of built-in bugs and inconsistent UI choices.

The design landscape is very subject to catastrophic change. I remember when Quark Express went from being king of the hill to playing second fiddle to InDesign, in what felt like a couple of months. This was the outcome of some very poor customer-antagonising decisions by Quark.


I tried to learn Blender about ten years ago and just couldn’t get past the UI. I tried again this past week, and have already modeled and rendered a proof-of-concept for what I was hoping to do with it.

The 2.8 UI redesign was nothing short of a game-changer.


Do you think it would be simple enough for an 11 year old to learn without getting too lost? My nephew is into claymation and is generally artistically inclined (but otherwise not very into school, even in the best of times). I’m looking for something to help him learn remotely, so anyone’s tips or resources would be appreciated.


Exciting development! ZBrush has just released a stripped-down free version of their app: ZBrush Core

https://zbrushcore.com/mini/

For any young person interested in digital clay, this is tops! ZBrush is the market leader in digital sculpting.


If the regular Blender UI is the problem (which I don't think it will be, you can do a lot with a few simple commands and as soon as the interest is sparked there is no turning back) you could also try https://www.bforartists.de/ it's blender but with an interface more tailored to those who don't like the regular one


There are some child-freindly 3D apps out there, but 11 is probably old enough to start. The community is very helpfull and there is a ton of good learning material. The key thing, as with all apps, will be to demonsnste that 90 % of what they need to learn can be covered with 10% of the UI.


For 3D sculpting there are lots of specialized apps which make the process reasonably close to actual clay modeling, commercial and free alike. Here is a WebGL-based one made by Stéphane Ginier: https://stephaneginier.com/sculptgl/

A tiny 3D modeling tool that also includes this sculpting technique is Art of Illusion: http://artofillusion.org/


My son is 12, learned it over the past few months, as they had little to do for school. Started simple, with basically rendering some squished spheres and cubes, then followed a few YouTube video tutorials (desk with some random stuff on it). Next, he experimented with sculpting, but still has trouble with it. I was fascinated how he took an old photo of some ship, created the outline (extruded?) then added detail. Beats computer games :)

Edit: one recommendation is to avoid books. YouTube and documentation are great.


My friends and I became obsessed with Blender when I was around 13 or 14. This was around 10 years ago and the interface was definitely idiosyncratic back then, but we didn't find any difficulties learning it, and we were able to make some amazing things. Blender made up a lot of my GCSE* in art and gave me some great times working on Blender projects with my friends on Google Hangouts way past our bedtimes.

I'd fully recommend it to your nephew.

*a qualification taken at 16 in the UK


Absolutely. I’m just going through it with my 9yo at the moment (we’re both learning at the same time). We’re using the Blender Guru donut tutorial series. It’s pretty long, but by just doing a little each night you get through it quickly enough. It’s child friendly and he’s got a good dose of humour that keeps my ones engaged.

https://youtu.be/TPrnSACiTJ4


There are a ton of tutorials available, I’d suggest watching a few yourself, make sure it’s for the same version or one that’s similar to the one you’re going to use and that it shows modeling something a bit interesting.

3D modeling is a lot of fun and really not that hard to get started in as long as you get past the initial hurdle.


My son, eight years old, and I spent the whole lockdown learning Blender. He is learning 2d in school; I found Blender a great tool to improve his math learning. He dreams about creating a game.


I'd have more confidence an 11-year-old could learn it than a 30-year-old. It's amazing thinking back at how quickly and absolutely I could immerse myself in things back then.


Wings3d or anim8or would be a better choice for kids to get started.


Agree. The usability is a dream. Light on the fingers, thoughtfully designed, and easy on the eye. In max, you can smell the age of the code base.


I had to reinstall 2.79 yesterday because I couldn't find anything in 2.8 :/ I still prefer the 2.49 interface.


I'd also like to point people to Ian Hubert's youtube videos on some of the things he does in Blender. This short clip (he races through his stuff) shows how he turns a video in a farm house into a dystopian scene using Blender's motion tracking.

https://www.youtube.com/watch?v=lY8Ol2n4o4A


Thanks for that! He has a link to the un-edited version in the desc as well (for those who want a more complete/easier to follow version).

I played with a cracked copy of Cinema 4D quite a bit years ago (yeah...I know. But I was just tinkering for fun and it's expensive). Seeing how far Blender has come is great! I will definitely be downloading the current version and doing some new tinkering--but without the questionable software or copyright infringement.


> Max is platform-dependent

It is also a rather closed ecosystem.

Audodesk, in the last 10 years, has systematically tried to wall off all their products so you are obliged to use nothing but.

If you need a proof, try to export a modern DXF file from e.g. AutoCad and import it into e.g. Blender.


"How QuarkXPress became a mere afterthought in publishing"

https://news.ycombinator.com/item?id=7360076

https://arstechnica.com/information-technology/2014/01/quark...

It is interesting to see once dominant software get sidelined. WordStar gave way to WordPerfect which gave way to Word.


Ah Quark. It was lovely, but people put up with its quirks only while they had to. IIRC, it had a single-action undo only, crazy even for its time.


I wonder if the same can happen with Adobe, while I have respect for what they do, I am happy to see a competitor (read : choice) rising with Affinity. For years there was nothing that could touch Photoshop, and slowly I see people moving over. For a first version its very good.


This article details beutifully the fall of Quark and the Rise of InDesign: https://arstechnica.com/information-technology/2014/01/quark...

Adobe is making many of the same mistakes now. Hubris. Affinity Photo is 90% there, but annoying short in some very basic areas. I own both, but still use Adobe partly at least because of Adobe ecosystem lock-in at my place of work.


Interesting article! Luckily I do more basic editing and Affinity is more than enough. But if Affinity brings a great second version I would be worried at Adobe HQ


The result screenshots are pretty cool-looking... and I personally wouldn’t board any of these spacecraft! The decks should be stacked along the main engines’ thrust vector, so the acceleration doubles as a source of artificial gravity.

Maybe I should open an issue...


If you’ve got a magically efficient drive that’s unrealistically fuel efficient to sustain long term high thrust like in The Expanse that’s one option. But if we’re waving our magic wands anyway, why not just wish up artificial gravity instead?


It would be much harder to maintain homogeneous artificial gravity so I imagine if/when it is invented, it will look like waves creating centers of higher gravity and lower gravity underneath each deck, making you feel like you're riding on a bumpy road instead of walking straight.

    ``'-.,_,.-'``'-.,_,.='``'-.,_,.-'``'-.,_,.='``


Another model is that each mobile object worth keeping held down gets its own gravity well which moves with it via an array of pads in the floor. They feel a constant acceleration, but gravity is uneven where they aren't.


In other words, it'll feel like a boat.


That’s what the inertial dampeners are for :)


why have engines at all in that case? :)


Good question. In Larry Niven's Known Space stories a common drive system is the Gravity Planar, which simply tilts the gravity field around a vehicle so it 'falls' in the desired direction.


I think it was the first "Expanse" book that referenced that... and it rocked my world. Never able to willfully suspend it since.


The problem with that is that you'd have to be always thrusting in order to maintain that artificial gravity, which doesn't sound feasible.

I'd argue a more practical design would be to include centrifugal rings (even number, paired up in opposite rotational directions, so that they offset each others' torque). That way you still get artificial gravity, even while the ship's hanging out in orbit. As a bonus, the habitats might be able to double as reaction wheels (though I don't know if this is exactly feasible; reaction wheels usually spin much faster, IIUC, though maybe bigger wheels don't need such high speeds to control the attitude of a spacecraft).


It depends on how long, and how often, you burn those engines. If you’ve got a big torch that can sustain a large fraction of one gee for weeks or months, and your fuel is cheap enough, why turn it off at all? On the other hand, if it’s only good for a big push at the beginning and end of your trip, and you’ll spend the whole time coasting, spin is absolutely the way to go.

The Expanse, as mentioned in other comments, showcases both these designs. Most ships fly a brachistochrone trajectory with a mid-point “flip and burn,” but the Mormons’ giant colony ship has a drum.


> why turn it off at all?

Because once I get into an orbit I'd generally prefer to stay there :)

I mean, I guess you could just keep spinning around to constantly counteract nudging yourself out of orbit, but that just seems like a centrifugal habitat with extra steps.

On another note, though, today I learned the word "brachistochrone", so thanks!


> Because once I get into an orbit I'd generally prefer to stay there :)

Or you can just be geostationary at 100 km with the engine on.


I loved The Expanse. But you just made me wonder how the colony ship could possibly be practical, because it has to function in both those modes and I don't know how you'd design the interior spaces for that. Unless you had spaces that could only be used in one mode or another, which seems like a big waste.


It was built as an interstellar colony ship - even with the ridiculously powerful and efficient drive technology they have in the Expanse it would take many years, possibly decades after reaching cruise speed before it would break at the destination. So I assume the colonists would just wait in a part of the ship perpendicular to the thrust axis during the acceleration burn and then move from that section (which would be now in micro gravity) to the rotating section. Then in reverse for the deceleration.


Pointy end being front on ascent, blunt end being front on descent, interior wise pointy end being top, floor be round, exterior wise celestial body be down and velocity vector be either where engines face or not face, is kind of norm for spacecrafts though.

Manufacturability, spaceship designs, and space-gun designs are where norms of this sort aren’t very well understood among designers, time to time I’d think “how on Moon are you going to 3D print it” or “this is going to quite spectacularly flip and kaboom in KSP” or “just no way this gun feeds”


I think the best places to have centrifugal gravity would be the toilet, the shower, and the gym. As for the kitchen, I want someone to make a spherical pizza pressed along the inside or the outside of a heated sphere to bake. So we still need an area of zero-g there.


You're missing the point of zero gravity pizza, Moebius strip pizza. Think about it, it'd be infinite pizza!


Regular pizza already has just one edge, which has no beginning or end. It has two sides, though.


You're right, I edged my way to this joke the wrong way. A regular pizza has two sides and one edge, Moebius pizzas would just have one of each. It might not be infinite, but it would be bottomless.


When you slice a Moebius pizza, it'll have cheese on both sides and two edges.


When you slice a Moebius pizza, you can tell your friend he's getting a half, and slice it down the middle of the strip. Or else promise a third, and slice it a third of the way from the edge.

Either way, your friend isn't getting anything; in the first case, you end up with one pizza with a double twist; in the second, the piece your friend ought to be getting is a chain link connected to yours.


I'm sold.


Really cool. I recently began playing around with procedural 3D design and found Sorcar[0] which gives Blender Houdini like capabilities.

A good place to start for anybody interested in exploring this sort of thing.

[0] https://github.com/aachman98/Sorcar


But still away from Houdini which is the gold standard still.


Quite good, though very much in the style of Aliens. I'd like to see if some deep learning techniques can make ships like Chris Foss, Peter Jones or Angus McKie.

https://www.chrisfossart.com/ https://arthive.com/artists/65054~Peter_Andrew_Jones/works/3... https://www.pinterest.ca/lleephoenix/space-art-angus-mckie/



Big fan of this Houdini artist's procedural helmets and robots

https://twitter.com/mglhs_com/status/1081153465328549889


A more up-to-date fork since this original repo hasn't been updated in two years: https://github.com/ldo/blender_spaceship_generator


Thanks! I only tried using the original which wasn't updated for blender 2.8.


I recently started playing No Man's Sky, a space game that has systems and planets procedurally generated.

More varied spaceships and spaceship classes are something I'm looking forward too, maybe the developers can take some inspiration from OP.


Procedural general works well for terrains and ecosystems, but not for man-made objects. There has been some great work on procedurally generated architecture, but they all need extensive manual tweaking before they can be used. This tells us a lot about what differentiates design from natural forces.


I remember seeing this a while back when I was looking into how a procedurally generated trading card game might work, where every single card was unique. It ended up being beyond me, but I'd love to see it come to life at some point, similar to Keyforge.


Just needs some rendering presets, star field backgrounds, lens flare, GPT-2 title generation, and you've got random SF novel book covers!



This is so fun to play with. Thank you for sharing!


Spacescape is good for your procedural starfields:

http://alexcpeterson.com/spacescape/


Here's something to make procedurally generated gas giants: https://github.com/smcameron/gaseous-giganticus

Here's a skybox generator: http://wwwtyro.github.io/space-3d/


Why not randomly generate titles as well? And perhaps a synopsis.


Randomly generate the ship names by pulling random phrases out of literature and you've got yourself an Ian Banks novel.


May he rest in peace. I had such pleasure reading his books, and the ship names were very funny indeed. Someone on HN pointed me to Neil Asher, who also authors the same genre and sometimes similarly names the ships.


I think the Mistake Not... would like a quiet word.



This got me thinking about Limit Theory [1], where everything will be procedurally generated. Not sure if the project is still alive though. I remember getting so hyped over it in 2014 or something...

[1]: http://ltheory.com/faq.html


Sadly looks like no: https://www.kickstarter.com/projects/joshparnell/limit-theor...

It doesn't appear the code was ever released either.


Well, it appears someone received a bonus of $180,000 without releasing any code. Thanks again, kickscamter.


Yes, that was a really elaborate scam by the notorious Josh Parnell. Made all the right noises and made off with $200k, releasing not even a single line of code.


Since no end product is guaranteed, you're taking a risk when you're helping people on Kickstarter. I think that is pretty clear from Kickstarter's charter. Thus I wouldn't exactly call it a scam.

If anyone is scamming anyone, it's Kickstarter itself, since all you get for your risk-taking activity, is the finished product of whoever you decide to help, and none of the potential profits associated with it.

Usually speculation is associated with a percentage of profits, and there is none to be had at Kickstarter. All you are doing there, is helping someone potentially finish something they're working on. Further more, Kickstarter does not seem to communicate the speculative nature of what they're doing well enough. IMHO that's the "scammiest" part of their whole business model.

I personally followed Mr. Parnell closely online, and if his work was ever a scam, it's one of the most elaborate and time-consuming out there. I don't think it's cool to judge someone for having an obvious mental breakdown. And I don't even think you're entitled to feel angry at anyone but yourself for risking money on something with so little to gain.

On the other hand, Parnell sure did give to his followers, particularly in fantasticly marvellous visuals and ideas of something that probably should have been made with a team of several talented programmers and artists, instead of just one person. AFAIK he also gave out demos to backers. But if this is how you feel about Josh Parnell, I won't even ask what you think about Chris Roberts... ;)


Didn't No Man's Sky do this? I haven't played this so I'm not sure


Previously on HN: https://news.ycombinator.com/item?id=11929493

Also, someone a while back posted procgen for 2D spaceships. Will update when/if I find it.



That's it, thanks!


Are you talking about Warning Forever?

https://en.wikipedia.org/wiki/Warning_Forever


Reminds me of Warning Forever, which would generate 2d spaceships: https://en.wikipedia.org/wiki/Warning_Forever


This is really cool. Spaceships feel like a limited choice for this though. Being able to generate models of humans or animals already animated to a standard skeleton would be a hugely useful asset. As a hobbyist game dev I'd love to buy random monsters off the unreal asset store, but I can't help but feel it'd be really lame if the monsters in your game were seen in some other unrelated game. That would be super limiting on any immersion instantly imo. Tools like this could help a lot. Maybe it's even easier since the skeleton would be the same?

Not familiar with modeling


Of possible interest is Kate Kinnear's thesis[1], titled The Aesthetics of Science Fiction Spaceship Design, which is about techniques for procedural generation of sci-fi spaceships. Also discussed on HN[2].

[1] https://uwspace.uwaterloo.ca/handle/10012/4935

[2] https://news.ycombinator.com/item?id=17899458


Reminds me of the spaceships in Avorion: https://www.youtube.com/watch?v=3R7xwseIkcE


Was just playing that yesterday, and was getting ready to jump back in today.

BoxelWare revamped the procedural ship/station generation immediately prior to the 1.0 release, and they're fantastic: https://www.youtube.com/watch?v=CLdmGxLWWfI


Very cool. I used to draw spaceships as a child so this brings back memories. Suggestion for OP: add more curves to the mix to increase variety.


also 'wings' and 'wing alikes'


This is great!! Blender is SO HUGE, even after years learning it I've not yet dabbled much into scripting, but it's the spirit of sharing like this that lets us dive in to an examples and learn so much!!

Blender is truly remarkable software, and it just keeps getting better and better! I'm loving the 2.83 beta grease pencil updates.


One of my favorite aspects of Diablo was the randomly generated levels. Imagine a space strategy game, where your "civ" is randomly generated giving you a random tech tree, with random ships of random attributes.

That would so much more depth and replay-ability and make it much much harder to over optimize.


This is very cool, but they all looks like the same "kind" of space ship to me. Even though I'm sure they are very different, they aren't distinct. And in that way, this doesn't seem very useful.


The "extreme" examples are more visually interesting and distinct. But yes, its too obvious that they all follow the same scheme.


Has this been updated for 2.8? I've used this when learning Blender scripting and the script had a bunch of issues with the procedural materials because of API changes.

That being said Blender is some heroic software.


Really interested to see how the concept art industry will adopt tools like this


I've never done any 3D modelling, how feasible is it for a programmer to approach it purely via scripting? Im very familiar with Python, and this script doesn't look too complex.


Blender has a great Python API[0] that allows you to do almost everything that you could do in the editor with code. You do have to run your code from inside the Blender app though.

[0] https://docs.blender.org/api/current/info_quickstart.html


I'm unsure of why you say "almost" everything when the UI code is simply calling the python API to do it's function. You could do anything and _more_ in the python API, as it's what the UI uses but you can use all the parameters via the code while the UI doesn't expose everything.

Unless something changed recently regarding this.

Also, regarding executing the code from outside, you can run blender headlessly, running the code with it when running blender via terminal. So you could use it as a windowless client if you so wish.


Blender is a truly fantastic tool, but some of the scripting is a bit hacky, IMO.

I recently built some pretty complex Blender automation[1], and my experience was that while technically nearly everything that can be done in the UI can be automated, there are problems that fell into two main buckets for me:

1 - There are basically two parts to the Python API - bpy.ops, and everything else. If something is in the "everything else" category, it works pretty well, but not everything can be done through that part of the API. bpy.ops is (AFAICT) the equivalent of using Selenium to automate clicking on web pages instead of actually interacting with the underlying API, and it feels super fragile.

2 - A lot of the API is not documented well, and I frequently ran into situations where there was no information on what I wanted to do, or the information was outdated. The impression I get is that most of the core Blender devs and users are not using the scripting features, or not using them extensively, because answers on StackOverflow and similar to things like "how can I change property X of every material's shader in my project, oh, and by the way, I have 1000 materials in my project" are usually "I guess you'll just have to click through each of those and set it" even though the API supports it if one digs far enough. A lot of the extensions I thought I could use as reference for things like arranging shader nodes in a useful way have been broken ever since 2.8, but there's no indication in the UI of this.

The pane in the scripting view that continuously shows the script equivalent of actions taken in the UI is a big help, and again, Blender is a really, really fantastic tool. But I can definitely understand some frustration with the scripting feature.

[1] https://www.thelostworlds.net/Software/Soul_Reaver_to_Blende... - better docs are coming soon, I promise.


I feel like headless blender could be kind of interesting...maybe someone should start a bug?

Edit: good thing I searched the bug tracker. Next step, Selenium for Blender!


It’s pretty easy to follow. I’ve been learning Blender over the last month but not delved too deeply into the Python api yet. That source code is really straightforward though. There are 2 parts, the bootstrapping where you tell Blender how to add your tool to the interface, and then the generation code that builds the mesh etc.

More complex is understanding the Blender model. Best thing to do is go through something like Blender Gurus donut tutorial. It’s intimidating to start with, but once you know the model you can find your way around and then you start getting into more of the techniques.

As a bonus, it has a vim-like interface. So you can do “r x 90” To rotate the selected object 90 degrees about the x axis.


"Upgrade to 2.8x required" 8(

Sadly, I've only just installed Blender so I have no idea how to update the add in. Give me a couple of years to get to grips with it please.


I guess you must've downloaded an older version of blender. The latest official release version is 2.82 which you can download here https://www.blender.org/download/releases/2-82/ .


No- it's the script that needs updating.

eeereerews has the link to the issue that leads to a link with a corrected version of the script


Not on Arch Linux I didn't 8)



https://news.ycombinator.com/item?id=23375064

This comment links to a newer version of the plugin.


Thank you. Well, the Helpdesk can look after itself for a while now I've vanished down a rabbit hole.


Install via steam store, snap store ... No need to worry about installs from source.


... pacman ...


That's really cool ! Even the "extreme" examples could be an entire specie/race/civilization in a space game


Procedurally generated spaceships was the first idea that came to mind when I learned about Blender's scripting capabilities. :)


big spaceships should be skyscapers instead of boats so thrust works as gravity.

looks nice though!


which part docks with ISS


All these ships have Bangle Butt.


ok now THIS is what i am here for - thanks for the link!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: