Spaceship Generator
github.com
github.com
Add a skybox and a couple of simple particle effects in PlayCanvas.
And we have some WebGL spaceships :-)
Though daredevildave may have meant environment mapping instead.
I used the automatic Cube Projection unwrap in blender before exporting to FBX and importing into PlayCanvas.
Chrome though would start opening everything on Google apps.
Drag the window over to my cinema display, and holy 4fps and crash batman!
The renderers I used in production, when I left the VFX industry ca. 2010, all supported PTEX [http://ptex.us/ptexpaper.html].
Blender seems to have WIP support for it too nowadays [ https://wiki.blender.org/index.php/User:Nicholasbishop/Ptex]
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-gp...
I took a screen-shot, to help out the computationally challenged:
http://www.weegeeks.com/upload/a1studmuffin-daredevildave-sp...
In the case of an artist working from scratch the skill is generating UVs that allow the artist to easily paint the texture and provide an even area for each part of the model. Otherwise some areas will be stretched and blurry.
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
(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.
Some of those generated ships gave me serious 'Event Horizon' vibes: https://www.youtube.com/watch?v=eiE-NB-kxh8
Mistake 7 also hints about the possible shape when there are no preferred orientations.
Also interesting
http://www.popularmechanics.com/space/deep-space/a8140/what-...
http://www.projectrho.com/public_html/rocket/misconceptions....
In my opinion Atomic Rocket contains the most accurate discussion of hard science fiction I've ever encountered.
That is, unless you design your future weapons and FTL drive principles so they really do reward "bigger is better" (I'm on to you, David Weber.)
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.)
Interesting procedural generation may require strong AI, because it must model how it is interpreted by us.
Strongly disagree! I truly feel sorry for you if you can't see beauty and spectacle everywhere you look in nature.
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.
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.
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.
Although, I do also happen to believe that ultimately, procgen has much more absolute potential than hand-made content. Minecraft is only 6 years old, and imo people have barely begun to expand on the basic concept.
https://forum.paradoxplaza.com/forum/index.php?threads/space...
Many, many other games use modular assets, especially if poly and tri counts are important to keep down for mobile and low power consoles / handhelds.
With a few component models that can be separated and added to a base model, procedural mesh generation can work. But, it is extremely messy when starting out, just due to complexity and the strategy of a significant redesign of assets to be modular, not singular.
Once designers and artists are on-board, and that's half of the battle initially, in getting artists to make modular design for assets instead of single design of flagship or lead assets, then you need to create code to make the game actually work with Frankenstein ships or Frankenstein characters, buildings, etc.
it leads to intriguing art and possibilities.
And working out all of the intricacies of positions, storage, blending, replacement/deformation of modular assets, how to diagnose, test and display problems, modifying or identifying pre generated or fixed module assets in the gui, storing the atomic position and/or physics settings, looking for deformed mesh, hollow mesh/gaps, raytrace problems, wrap uv and deformation, problems with textures, etc. Batch calls, pooling, spawn locations, collision mesh, sic.
And that's just things I could think of from regular assets. Modular mesh, as well as modular textures are usually a no go area, because of the problems with the engine and performance guesswork when problems come up at the last minute. Or the first minutes. Etc.
Most indie games don't have the time to waste on procedural generation unless it's been troubleshooted or tested by designers and coders, or sold as an asset by others.
Buildings are often generated like this in game,
No Man's Sky is perhaps the more popular ur example of how to make procedural generated assets using math functions and geometric texture generation (it's been a long time since I looked at the tech they were supposed to be using under the hood, but i misremember something like fractal/geometric generation of textures to minimize the workload)
but it is still a tech demo of a well understood, but infrequently used tool.
That is, until they release the game.
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.
The demo scene has some mind-blowing stuff.
An entire galaxy of planets, fauna and creatures (including shape, coloring and even voices) is procedurally generated!
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.
Simulate a small space economy, create a DAG of how components and materials are produced, simulate situations this ship will be placed in and calculate net present value, see the outcome in the difference between a freighter and a fighter.
Basically, you're arguing for stronger creation tools for a narrow domain.
The spore creature creator seems to be an example. It was awesome for the variety and I wish that portion of the game could have been taken up more my the industry as a content creation tool for devs.
At the same time, models in spore look pretty same-y - as is the problem with all procedural content.
Still, same-iness is not always a bad thing.
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.
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.
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.
Still, it's only a few steps away from "random British 1970s SF book cover".
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 .. ;)
http://www.peterelson.co.uk/gallery/category.php?pageNum_pro...
Could this sort of process be used in games where procedural generation might otherwise be rejected because it looks "too random"?
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.
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.
I don't think the script replaces a professional designer, but this is awesome for brainstorming ship ideas.
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.
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.
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!
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/
The same can be done for character gen, scenario gen, life choices :), etc.
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
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.
http://www.shapeways.com/tutorials/prepping_blender_files_fo...
There goes your weekend.
http://atlcoin.com/atlcoinblog/wp-content/uploads/2011/09/UF...
Seems to be human nature.
seed = 'tweer' obj = generate_spaceship(seed)
Python can't redefine functions as variables. Seed is a function.
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
>>> 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.) >>> 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.
And end with some boxes stuck together.
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.
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.