11 ms·
Spaceship Generator
- hetfeld 10y agoThere is an error in script. seed = 'tweer' obj = generate_spaceship(seed) Python can't redefine functions as variables. Seed is a function.
- y4mi 10y agoi'm not the author but i frequently code in python and am unable to understand what you're saying from that snipped of code. 1. you can overwrite everything in python 2. seed has been set to a string 3. obj uses the value of previously set 'seed' variable, which should be a string at that point. its not a good idea, like overwriting the id variable, but it should work... and just in case somebody wonders: its still possible to use the "true" seed() by calling it over __builtins__.seed() i did similar stuff previously without realizing and only found out about this after i switched to a real IDE that warned me about overwriting inbuilt functions
- geofft 10y agoYes, that's correct. >>> from random import seed >>> seed(10) >>> seed <bound method Random.seed of <random.Random object at 0x24721c0>> >>> seed = 50 >>> seed 50 >>> from random import seed >>> seed <bound method Random.seed of <random.Random object at 0x24721c0>> (You can't get it as __builtins__.seed because it's not a builtin, but you can re-import it from random to get it back.)
- ecdavis 10y ago'seed' is explicitly imported on line 18, then overwritten on line 736, and yet it's used as a function on line 526. As far as I can tell, that is an error. >>> from random import seed >>> def f(): return seed(10) >>> seed = 50 >>> f() Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> f() File "<pyshell#2>", line 1, in f def f(): return seed(10) TypeError: 'int' object is not callable >>> I haven't run the script, so take this with a grain of salt. EDIT: Since generate_spaceship is always called with an empty random_seed parameter, this error won't happen when the script is run.
- Tloewald 10y agoVery cute, although the ships look samish (would probably be interesting to start with different base templates etc. Still, it's only a few steps away from "random British 1970s SF book cover".
- IgorPartola 10y agoDo you have a link to the book cover generator? Or is that a metaphor?
- fit2rule 10y agoI think he might have meant Chris Foss: http://www.chrisfossart.com http://www.chrisfossart.com I grew up imagining these spaceships becoming reality, and now .. they sort of are .. at least, I can bend and play with spaceships just like them now, albeit .. in Blender .. ;)
- br2 10y agoYou might like this: http://thrilling-tales.webomator.com/derange-o-lab/pulp-o-mizer/pulp-o-mizer.html http://thrilling-tales.webomator.com/derange-o-lab/pulp-o-mi...
- Tloewald 10y agoIt's a joke — most British SF novels (and UK editions of US SF novels) seemed to get published with covers featuring some kind of giant spaceship whether there was one in the story or not. Chris Foss is, per another reply, the most well known artist of the genre.
- angry_octet 10y agoAlso reminds me of Peter Elson, though his designs are more curved. A few smoothing or relaxation passes might achieve something similar. http://www.peterelson.co.uk/gallery/category.php?pageNum_products=3&totalRows_products=75&cat=11 http://www.peterelson.co.uk/gallery/category.php?pageNum_pro...
- DanBC 10y agoSomething to do this in Lego Digital Designer would get considerable interest.
- wlievens 10y agoI did pretty much that for a previous challenge in /r/proceduralgeneration - procedural castles, where I used LDraw as backend for rensering.
- tenpies 10y agoThe extreme examples remind me so much of the Shivan ships in the Freespace series. I don't think the script replaces a professional designer, but this is awesome for brainstorming ship ideas.
- wtbob 10y agoThis … this is awesome. Thanks for sharing!
- maxander 10y agoI saw the headline and initially assumed it would be some droll Game of Life invention. Then I thought, no, maybe its some automatic sci-fi art generation script. And I was rewarded! Procedural generation like this is quite possibly key to the future of indie games- if you don't have the team to design large sets of art assets, its important to be able to put something pretty out there using your own wit. (A good example would be No Man's Sky.)
- moron4hire 10y agoYou are severely underestimating the effort good procedural content takes.
- Retr0spectrum 10y agoAnd perhaps you are severley underestimating the effort large-scale world assets take to create. I agree that doing procedural generation properly takes a lot of work, but there's a reason that AAA open-world games like GTAV cost hunderends of millions of dollars to develop.
- moron4hire 10y agoI don't think No Man's Sky will show a significantly better RoI, in the long run. Star Citizen is certainly racking up the bills. We could even argue that AAA game studios using hand-modeled art assets instead of procedurally generated content is proof that hand-modelling is the "cheaper" route. Though most AAA game studios are using a hybrid approach and have some form of procedurally generated content in their pipeline, whether it's to create quests or to create the baseline environment on top of which bespoke content is added. Projects are hard. Full stop.
- MaulingMonkey 10y agoThere's a reason that AAA open-world games like GTAV are using rather limited procedural generation, too. The problem is that to create N pieces of satisfyingly unique procedurally generated content, you need M pieces of content that were carefully designed within additional restrictions to make them combineable in various fashions - making them harder to create. Then you add code to glue that all together. If you think M=0, that just means you've hardcoded your content in code. When N >> M - e.g. you're generating thousands of similar-yet-distinct roguelike levels, trees, etc. - procedural generation can pay off. But even for large-scale world assets, it's frequently the case that N < M. Making the content non-procedurally is going to be cheaper - fewer limitations to worry about, and fewer pieces of content to actually generate. A few clever tricks - rotating, retexturing, tweaking a base model, etc. - let you make a lot of non-procedural content without creating each piece from scatch, and lets you stretch that content to appear like you have more variations than you actually do.
- smilekzs 10y agoI find Blender quite handy when it comes to (randomized/parameterized) generation of 3D objects for the purpose of rendering, although I've only done really simple things. However the API, while in Python (which is good), feels very unpythonic and clumsy, all while being severely under-documented. It would be really nice if the API could be cleaned up in a future major release...
- sandworm101 10y agoCool, but the ships are all rather samey. They all spring from the root hull, with a main body being longer than it is wide. Perhaps that is needed to conform with our terrestrial concept of "ship". But I think it could be improved by randomizing the number or shape of starting hulls. It would also be interesting to see what could be done by extruding spherical shapes rather than boxes.
- 100ideas 10y agoForm follows function! No wait... I think I have it backwards
- agumonkey 10y agoVery macross of you.
- laretluval 10y agoI'm delighted by how little code this is!
- hydroo 10y agoAwesome work! Now I need website where I can just generate them and view them in webgl.
- andreasklinger 10y agoI love that the ships look more like "skyscrapers in space" then airplane like spaceships we usually see in tv shows/movies. This is most likely (according to multiple hard scifi authors) a much more realistic depiction of how spaceships are going to look like. Example given: The Expanse - "Flip and Burn" https://www.youtube.com/watch?v=X4EiW1bHwsQ https://www.youtube.com/watch?v=X4EiW1bHwsQ
- Cyph0n 10y agoExcellent show, and an even better series of hard sci-fi books to back it. I've never read a sci-fi book/series that depicts realistic high-g travel before The Expanse.
- khedoros 10y agoSome of the designs remind me of the Earthforce ships from Babylon 5, a few of the carriers in the Wing Commander games, or some of them in Sins of a Solar Empire.
- peckrob 10y agoThe very first picture, the first thing I thought of was the Agamemnon from Babylon 5. Some of the extreme examples remind me of Shadow ships.
- stcredzero 10y agoI love that the ships look more like "skyscrapers in space" then airplane like spaceships (than!) To be really realistic, the planes of the floors should be oriented perpendicular to the axis, or there should be a centrifuge incorporated. If ships are going to float around like ocean going ships floating on top of an invisible ocean, with all of the ship floors somehow aligned, then this is the "space is an ocean" trope. http://tvtropes.org/pmwiki/pmwiki.php/Main/SpaceIsAnOcean http://tvtropes.org/pmwiki/pmwiki.php/Main/SpaceIsAnOcean
- andreasklinger 10y agoyes i meant the floors are like the floors in skyscrapers. the thrust/acceleration creates the "artificial gravity".
- dave2000 10y ago> Start with a box. And end with some boxes stuck together.
- Jafit 10y agoPretty much. I used to enjoy making 3d spaceships in Blender3d and such. Simple extrusion and resizing of faces is the path of least resistance but it doesn't lead to very nice results. The mesh should follow the shape you wish to create, not have the shape be dictated by the geometry of the mesh.
- ocdtrekkie 10y agoThis is a pretty standard 3D modelling strategy, unsurprisingly, called "box modelling". You can create an incredible amount of things with box modelling. Including, obviously, a lot of spaceships. I built several crud spaceship designs with box modelling back in school. The main key advantage, is all of your 'parts' are built off of a single object in the editor, and aligned perfectly. The other thing though, you can do to a box modelled project, is round all the edges to varying degrees, and end up with something looking much more fluid and amorphous. However, I suspect the results would be far more unpredictable if he through something like that into this script, so it'd be difficult to go there procedurally.
- quietplatypus 10y agoYeah back when I made 3D models of star trek spaceships (trekkie in your name significant?) that was one of the go-to methods for making the shuttles, smaller craft, borg (obviously), but stuff like Voyager and the Enterprise-E you would often resort to more advanced lofting/spline patch based techniques and work off of a sketch.
- fit2rule 10y agoSeems to me to be an excellent reduction of the actual work required to build a decent spaceship. :)
- stretchwithme 10y agoI'm guessing not the algorithm used to create the Destiny.
- planteen 10y agoThis is very impressive. Nice work.
- smcameron 10y agoWhen I tried to run it, I got: Traceback (most recent call last): File "/spaceship_generator.py", line 737, in <module> File "/spaceship_generator.py", line 711, in generate_spaceship AttributeError: 'BevelModifier' object has no attribute 'offset_type' I ran it with Blender 2.69
- smcameron 10y agoWorks with 2.77a though.
- duncanawoods 10y agoI don't really like most procedural generation. It has no meaning and the results are not intellectually stimulating. At best you can't spot the pattern and parameters but you usually can after a few examples. An idea I am more interested in is that you generate requirements and use an optimiser to solve the actual design. This way, there is a hidden "why". With some study, a human might be able to discern why x is so thick or why A is attached to B. When a design has a use in mind then it has meaning.
- jacquesm 10y ago> I don't really like most procedural generation. The demo scene has some mind-blowing stuff.
- duncanawoods 10y agoDemoscene is awesome but I see one off generation as a type of compression. What I have in mind is games where procedurally generated families of things are supposed to be interesting and worth exploring and discovering. I find those underwhelming.
- xiaoma 10y agoCheck out No Man's Sky: https://www.youtube.com/watch?v=D-uMFHoF8VA&feature=youtu.be&t=1m49s https://www.youtube.com/watch?v=D-uMFHoF8VA&feature=youtu.be... An entire galaxy of planets, fauna and creatures (including shape, coloring and even voices) is procedurally generated!
- kowdermeister 10y agoThe point of procedural generation is to have designs that are not designed by a designer so they can surprise us in unusual ways.
- teamonkey 10y agoThe point is to create lots of useful content, it doesn't have to be intended or not designed. Procedural generation can be entirely predictable. Also, if it doesn't fit the eyes of the designer (who could also be the programmer) then the algorithm or parameters will be changed until they do. In that way, most procedurally-generated content is designed.
- lifeisstillgood 10y agoOh wow - I can procedurally generate 3D models ?!!! Blender tutorial needed :-)
- hobo_mark 10y agoFor a second I had to look if this was from the "limit theory" guy but no, RIP LT.
- gravypod 10y agoIf this works as "advertised" then this is amazing. I'd love to see a game implement this.
- daredevildave 10y agoSadly it doesn't seem to generate UVs for the models. But using the cube projection in Blender seems to do an OK job. Add a skybox and a couple of simple particle effects in PlayCanvas. And we have some WebGL spaceships :-) https://playcanv.as/p/kZtPZpnH/ https://playcanv.as/p/kZtPZpnH/
- virtualritz 10y agoUVs are not needed any more since a long time. They have many drawbacks (the first one being that they are explicit). The renderers I used in production, when I left the VFX industry ca. 2010, all supported PTEX [http://ptex.us/ptexpaper.html http://ptex.us/ptexpaper.html]. Blender seems to have WIP support for it too nowadays [ https://wiki.blender.org/index.php/User:Nicholasbishop/Ptex https://wiki.blender.org/index.php/User:Nicholasbishop/Ptex]
- daredevildave 10y agoThey are still very much required for games/real-time rendering :-) I hadn't heard ptex before, it's interesting stuff. Sounds like the reason it isn't in general usage for realtime stuff is the memory overhead: http://sebastiansylvan.com/post/casting-a-critical-eye-on-gpu-ptex/ http://sebastiansylvan.com/post/casting-a-critical-eye-on-gp...
- deleted 10y ago[deleted]
- mdadm 10y agoThat's pretty awesome.
- kwekly 10y agoVery cool -- what about sliders to feed parameters for new ship generation :)
- daredevildave 10y agoUnfortunately, the ship generation is done offline in Blender. I'd have to re-write his ship generator in javascript.
- noahbradley 10y agoAwesome stuff. Would love to see concept artists incorporating procedural generated assets in their workflow. Produce 100 samples like this, teach the computer which ones they prefer, produce 100 more, take a few and refine them by hand.
- themodelplumber 10y agoA lot of artists in various industries use Alchemy to generate ideas like this. I like to use the ms reading on my stopwatch when I don't have anything else nearby. I'll draw up a few scales like inorganic <---> organic, long <---> short, heavily armed <---> unarmed, and then get a 0-99 ms reading for each by pausing my stopwatch. Edit: Example. https://www.instagram.com/p/BG0Gr5BRBs7/ https://www.instagram.com/p/BG0Gr5BRBs7/ The same can be done for character gen, scenario gen, life choices :), etc.
- personjerry 10y agoWhy are there windows on a spaceship?
- figgis 10y agoBecause windows aren't unheard of even now on spaceships? http://atlcoin.com/atlcoinblog/wp-content/uploads/2011/09/UFWC-Space-coin.jpg http://atlcoin.com/atlcoinblog/wp-content/uploads/2011/09/UF...
- wanderingstan 10y agohttps://youtu.be/C-qEmmpGYvA?t=36s https://youtu.be/C-qEmmpGYvA?t=36s Seems to be human nature.
- srtjstjsj 10y agoWas that a historically accurate representation of the spacecraft designer's German accents, or was the movie gratuitously racist?
- rbanffy 10y agoI am more impressed by how compact the propellant tanks must be... ;-)
- intrasight 10y agoI find the arguments of procedural vs artistic content somewhat humorous given that artistic content is just an attempt to create something that is a fascimile of actual natural and human generated artifacts. The natural world is by definition procedural (unless you believe in a Creator). The human artifacts have some artistry - but only in the broad strokes. Most buildings, and most details of architected buildings, follow a procedural semantic. The natural decay of human artifacts follow a procedural semantic. I assume that in the near future of VR that few will play "AAA games" (and hence few will exist) because they won't be able to complete with free procedurally generated environments.
- teraformer 10y agoI don't know why you're getting downvoted, because you're absolutely right. Most human architecture is highly procedural, with many tradesmen specializing in highly repetitive, focused tasks, that have predictable, reliable outcomes, in order to produce safe structures based on well-understood principles. As for the VR thing, I think that will gain less traction because the idea of sleeping one's life away, strapped into goggles and headphones, is only so attractive.
- stcredzero 10y agoMost human architecture is highly procedural, with many tradesmen specializing in highly repetitive, focused tasks, that have predictable, reliable outcomes Yes, but human architecture is shaped by forces following from function. (As in Alexander's Pattern Language of Design.) That's why it becomes interesting, because we can relate to how the architecture relates to human needs and perceptions.
- sargun 10y agoMy physics knowledge is pretty weak. Wouldn't you want a space ship to be closer to something like an oblate spheroid? Less surface area <-> volume ratio builds cheaper, lighter space ships presumably? The primary thing I'm unsure of is steering, but how much of a problem can that be?
- kwekly 10y agoPure speculation, but I think heat dissipation is probably the more important bottleneck of spaceship design -- no convective cooling, so you potentially want more surface area to increase radiation. I think aerodynamics (both lift to weight and streamlining) are the reason for the compact design of aircraft and submarines (also perhaps reducing the profile for military vehicles). Weight maybe an issue for maneuvering in combat, but there's tons of structural material literally floating around in space, so I'd wager that base material cost would not a limiting constraint.
- prewett 10y agoSteering is no problem; in space everything rotates about the center of gravity, regardless of shape. You probably would have boxy starships for the same reason you have boxy houses: more usable space. The same arguments apply for spherish houses, but those never caught on. Given the distance that the starship is going to travel, the main cost is probably not the materials so much as the time, so you'd want to maximize the amount of stuff you could ship back and forth.
- kordless 10y agoSomeone should be working on spaceship guidance software with UI interfaces for humans. We're going to need it.
- mortenjorck 10y agoThe selected examples got me thinking: Those eight are presumably examples the author felt turned out particularly well. Could one build a neural network trained on generated ships that "turned out well" to automatically generate better-looking random ships? Could this sort of process be used in games where procedural generation might otherwise be rejected because it looks "too random"?
- abritinthebay 10y ago> Could one build a neural network... Short answer: yes. Long answer: yes, but you'd have to retrain it for each style/form/concept that "well" was defined for. But yes, it's possible. Would be a lot of work though.
- KayEss 10y agoYou can think of the random possibilities as exploring one path through a huge tree of possibilities. You can then pick 9 paths for the next step and have the user choose the one they prefer and keep repeating until the user feels that they're done. We used to use this sort of approach to produce random shapes for animation and display on large screens in clubs in the mid-90s. You can also animate by tweening one or more parameters at particular branching points or between branches. If you pick the right places on these ships that could produce some interesting movement in the craft as well.
- zeristor 10y agoDawkins wrote the biomorph software to demonstrate evolution, you got to select squiggles and breed them. What would be call is to evolve spaceships by selective breeding. No doubt this being The Internet this was done by a Russian seven years ago, and I failed to GTFA.
- throwaway_fish 10y agoCould you do procedural cars?
- eggy 10y agoGreat work! I love a lot of the ships you show. I'll have to look at the code next weekend. I liked the city-building scripts from years ago in Blender too. Fun stuff to create a ton of assets automatically. I was working on a procedural art generator in Blender in 2006, and I tried to use genetic programming written in Lisp to create random parameters into a fixed generator I had written in Python copied from a parametric formula renderer. I can't remember the original author. I couldn't get it to work well, and got sucked into Processing shortly thereafter, and other things Blender. You could meld your script with a Genetic Program to present quick renders it evolves, and use Neural Nets to drive towards what you like, and away from what you don't to evolve a design. This cuts the search space, and thus the time, down from a simply random form generator in producing images you may want. You've killed my next weekend! Again, great work!
- wlievens 10y agoThing is, /r/proceduralgeneration is running a monthly challenge for exactly this right now but I haven't seen it listed as entry yet. Check out the previous entries, some of them are neat (others less so).
- cridenour 10y agoIt's the top link on the challenge thread, isn't it?
- zeristor 10y agoHas anyone 3D printed one of these models? http://www.shapeways.com/tutorials/prepping_blender_files_for_3d_printing http://www.shapeways.com/tutorials/prepping_blender_files_fo...
- hoanganhlam 10y agohttp://stellarismods.com/graphics/spaceships/ http://stellarismods.com/graphics/spaceships/