a1studmuffin / spaceshipgenerator Goto Github PK
View Code? Open in Web Editor NEWA Blender script to procedurally generate 3D spaceships
License: Other
A Blender script to procedurally generate 3D spaceships
License: Other
Not and issue as such but could you provide a few examples of the different parameters you can pass to the generate_spaceship
function?
What, for example, did you pass through to make the extreme ships?
Python: Traceback (most recent call last):
File "C:\Users\Sujaya\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\add_mesh_SpaceshipGenerator_init_.py", line 43, in execute
spaceship_generator.generate_spaceship(
File "C:\Users\Sujaya\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\add_mesh_SpaceshipGenerator\spaceship_generator.py", line 669, in generate_spaceship
add_surface_antenna_to_face(bm, face)
File "C:\Users\Sujaya\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\add_mesh_SpaceshipGenerator\spaceship_generator.py", line 341, in add_surface_antenna_to_face
result = bmesh.ops.create_cone(bm,
TypeError: create_cone: keyword "diameter1" is invalid for this operator
location: :-1
To create mapping that sticks to the ship but otherwise does the same thing as current mapping, I UV unwrapped the ship's mesh using "Cube projection," set the unwrap size to 1, connected the image node to UV texture coordinate input, and changed the image node mapping back from "box" to the default "flat." Not sure about code, though.
Hi, thanks for this script!
Currently I can't run this in 2.8. Last time this issue was raised in 2018 so I guess this is a right time to add this issue considering 2.8 stable is released.
Cheers!
Hi a1studmuffin,
Sorry to contact you like this by creating an issue (do not know how to do so otherwise).
I have purchased many tools to help me in my Sci Fi assets to sell. I am very interested in this plugin to create the basis for my spaceships assets. Meaning, I do not want to sell the results of this plugins directly. Rather, I would like to build upon the generated spaceships using my different tools to create polished and customized ones to sell.
Is this OK?
Regards
Am I an idiot, or how do I get a generated ship to render like the pictures in the Readme? I run the default render settings, and the ships just look kind of flat, and the hull panels texture is almost invisible.
it's not working 4 me or u have made the how-to-start without it say the exact way of doing it.
I try to add the folder to the add-on's section but it won't let me?
Any help?
Hello, spaceship generator - which I find AMUSING! - did not work anymore on my Blender 3.1: being a programmer I was able to reaad the log (it's an int - float conversion error) and managed to fix it in this way:
Have trouble?
would love to try it
This Plugin Needs to use the new geometry nodes
I have no idea how plugins work in Blender but it would be awesome if the paremeters and seed could be tweaked from a GUI. Some of the extreme examples look really awesome and the repeatability of a seed would be nice to surface as an option without editing the script.
I can't seem to get this to work using blender v2.83.0. I am installing and it isn't showing any errors, but then I can't see Spaceship from the Add Mesh menu. Not sure if I should downgrade blender to get this to work?
Hello Michael,
Not sure if this issue request is useful; if not, or if time is in short supply, please do feel free to close it down.
The spaceship generator idea is pretty cool; the spaceships are quite awesome too, some are just ... alien-weird. Would be cool to create meshes including inner structures e. g. such that one could use that for 3D games as-is. :D But this is not the feature suggestion here, just a random idea.
Feature request:
Anyway, if this is too much work, please ignore. The generated spaceships as-is are pretty cool.
Hope you have similar great ideas in the future. \o/
Hello.
The errors it gives in console are
"Fake_module: addon missing bl_info gives bad performance!: then it follows the scripts directory \addons\build.py"
"Fake_module: addon missing bl_info gives bad performance!: then it follows the scripts directory \addons\spaceship_generator.py"
And when you add ship to the scene it is messed up and textures are not set properly.
Best Regards.
Would it be possible to add a trivial GUI such as via pygobject, as well as
means to generate different spaceships via blender from the commandline,
to then display these as-is?
That way the user could select the model that may be most appropriate
such as for a game that makes use of spaceships, a bit like context
free grammar works (example for what I mean can be seen at the
cfdg gallery: https://www.contextfreeart.org/gallery/search.php?t=new&num=25)
Obviously this suggestion "works" only if the required work is not too
enormous, so perhaps the first step would be to have a way for the
SpaceshipGenerator to batch-generate different models via the
commandline, and then when that works plug in a minimal GUI
that shows these different results as-is via that app).
I don't really know if this is an issue as such, but I hope it is ok here.
I would like to generate a large amount of ships, add a decimate modifier(to reduce polys) and save them all as .fbx files. I have looked at the code but I am a really bad at python and am unsure as how to bulk save like this. How would I go about this? Thanks.
the operator panel disapper when select other object,
is it possible for rebuild the spaceship when reselect the object , or even after save & open the file
Add mesh spaceship not available in add menu (shift+A). After succesfully installing this addon in Blender 2.8, it's not available in add menu.
If in doubt, please get in touch. As a rule of thumb I'm fine with anyone
using these spaceships in commercial works, but I am less okay with people
selling the spaceship models directly for commercial gain. Use common sense.
Creative Commons Attribution By 3.0 does allow selling the model itself
File "C:\Users\jwill\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\SpaceshipGenerator-master_init_.py", line 43, in execute
spaceship_generator.generate_spaceship(
File "C:\Users\jwill\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\SpaceshipGenerator-master\spaceship_generator.py", line 669, in generate_spaceship
add_surface_antenna_to_face(bm, face)
File "C:\Users\jwill\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\SpaceshipGenerator-master\spaceship_generator.py", line 341, in add_surface_antenna_to_face
result = bmesh.ops.create_cone(bm,
TypeError: create_cone: keyword "segments" expected an int, not float
There is an error on line #18 of init.py.
from add_mesh_SpaceshipGenerator import spaceship_generator
This needs to be changed to
from . import spaceship_generator
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')
bpy.ops.mesh.generate_spaceship()
Python: Traceback (most recent call last):
File "/home/kenorb/.config/blender/2.93/scripts/addons/add_mesh_SpaceshipGenerator/__init__.py", line 43, in execute
spaceship_generator.generate_spaceship(
File "/home/kenorb/.config/blender/2.93/scripts/addons/add_mesh_SpaceshipGenerator/spaceship_generator.py", line 724, in generate_spaceship
materials = create_materials()
File "/home/kenorb/.config/blender/2.93/scripts/addons/add_mesh_SpaceshipGenerator/spaceship_generator.py", line 458, in create_materials
set_hull_mat_basics(mat, hull_base_color, hull_normal_map)
File "/home/kenorb/.config/blender/2.93/scripts/addons/add_mesh_SpaceshipGenerator/spaceship_generator.py", line 436, in set_hull_mat_basics
return add_hull_normal_map(mat, hull_normal_map)
File "/home/kenorb/.config/blender/2.93/scripts/addons/add_mesh_SpaceshipGenerator/spaceship_generator.py", line 419, in add_hull_normal_map
teximage_node.image.colorspace_settings.name = 'Raw'
TypeError: bpy_struct: item.attr = val: enum "Raw" not found in ('Linear', 'sRGB')
location: <unknown location>:-1
Traceback (most recent call last):
File "C:\blender-2.76-windows32\blender-2.76-windows32\2.76\scripts\modules\addon_utils.py", line 324, in enable
mod = import(module_name)
File "F:\Documents and Settings\Admin\Application Data\Blender Foundation\Blenden2.76\scripts\addons\5paceshipGenerator-masten_init.py", line 18, in
from add_mesh_SpaceshipGenerator import spaceship_generator
ImportError: No module named 'add_mesh_SpaceshipGenerator‘
Right now if I modify the python scripts, I have to rebuild and reinstall the Blender plugin, right?
Is there a way to cut that whole process down (e.g. install the plugin once, and have the blender UI talk to the python script's parameters)?
Seed: walnut!
Min. Hull Segments: 3
Max. Hull Segments: 6
Create Asymmetry: OFF
Min. Asymmetry Segments: 1
Max. Asymmetry Segments: 5
Create Face Detail: ON
Allow Horizontal Symmetry: ON
Allow Vertical Symmetry: OFF
Apply Bevel Modifier: ON
Assign Materials: ON
Now render it or display it in Material mode. Blender will hang.
Hi,
I did not find any way to contact you via github, so I am contacting you via issues, I am extremely sorry for this. I saw your script for space ship generation and impressed by it, also I forked it and plan to improve it in multiple ways like sphere share space ship, pyramid, pentagon etc. Also planned to make it low polygon for games etc. Currently I have added create button, presets, y - z directions also and reset button. You can find link for it at blenderartists is [https://blenderartists.org/forum/showthread.php?401861-Space-Ship-Generator-Addon]
As I am pretty new to blender python and 3d programming, you are a professional. Is it ok with you if I update and when I feel it working fine with my changes, I can ask you for incorporate my changes. I am making it as open ofcourse.
Looking forward to hear from you.
Can it be mentioned which blender versions are supported?
It seems the repo has not been changed in two years or so.
Hello Michael,
Not sure if this is worth reporting or not; please do feel free to close this issue at any moment in time.
Could a short subsection be added to explain how to add your own textures? I see that there are three .png files with the source code, so I assume that any .png file may work fine; but I have not tried so yet, so I'd like a pointer or two ideally in the documentation if that is possible. (I intend to test it lateron; blender's interface is pretty complex and I am no expert in python so it is not that trivial for me. Thanks!)
Hi, thank you for the script !
Blender 2.8 changed some core functions.
It is certainly too soon to adapt the script now, as some changes are not completely settled, nor documented, yet (stable release in forseen in 2019 Q3 I think)
Anyway, I did some minor changes to run it in Blender 2.8, without materials.
https://github.com/vincent/SpaceshipGenerator
The code is absolutely not polished - hence no pr yet - but can be useful if you just want to try it in 2.8.
Cheers
Hello
Thank you for developing this great tool!
Do you plan to add cycles suppoort?
Hello.
It does not load. There is no add/mesh/spaceships. It complains something about:
"fake_module: addon missing 'bl_info' gives bad performance" then the path to the scripts directory and spaceship_generatr.py
I had also to change following lines/commands in spaceship_generator.py to work again in Blender 3.1:
bmesh.ops.create_icosphere - now needs parameter radius instead of diameter - line 310
bmesh.ops.create.cone - radius1, radius2 instead of diameter1, diameter2 - lines 200,232,245,,258,272,282,291,341,354,372,380
tip: use find&replace (worked for me)
Hope this helps
Thomas
Report: Error
Python: Traceback (most recent call last):
File "/Users/enda/Library/Application Support/Blender/3.1/scripts/addons/add mesh SpaceshipGenerator/init.py",line 43, in execute
spaceship generator.generate spaceship(
File "/Users/enda/Library/Application Support/Blender/3.1/scripts/addons/add mesh SpaceshipGenerator/spaceship generator.py", line 669, in generate spaceship
add surface antenna to face(bm, face)
File "/Users/enda/Library/Application Support/Blender/3.1/scripts/addons/add mesh SpaceshipGenerator/spaceship generator.py", line 341, in add surface antenna to face
result = bmesh.ops.create cone(bm,
TypeError: create cone: keyword "segments" expected an int, not float
location: :-1
Windows 7x64
Blender 2.77
How to reproduce:
what is the content ( space ship that is made from the generator ) under ( License or Copyright or creative commons )
Hi @a1studmuffin, nice plugin, but i have found some typos in your code.
In init.py file the function call should be:
spaceship_generator.generate_spaceship(
self.random_seed,
self.num_hull_segments_min,
self.num_hull_segments_max,
self.create_asymmetry_segments,
self.num_asymmetry_segments_min,
self.num_asymmetry_segments_max,
self.create_face_detail,
self.allow_horizontal_symmetry,
self.allow_vertical_symmetry,
self.apply_bevel_modifier,
self.assign_materials
)
Now arguments num_hull_segments_min and num_hull_segments_max are not passed, and assign_materials also.
It is useful
But it has too much error
AI GPT may could give us some help even makes it more powerful
The error I am getting is this:
Python: Traceback (most recent call last):
File "/home/wulfalpha/.config/blender/3.1/scripts/addons/add_mesh_SpaceshipGenerator/__init__.py", line 43, in execute
spaceship_generator.generate_spaceship(
File "/home/wulfalpha/.config/blender/3.1/scripts/addons/add_mesh_SpaceshipGenerator/spaceship_generator.py", line 669, in generate_spaceship
add_surface_antenna_to_face(bm, face)
File "/home/wulfalpha/.config/blender/3.1/scripts/addons/add_mesh_SpaceshipGenerator/spaceship_generator.py", line 341, in add_surface_antenna_to_face
result = bmesh.ops.create_cone(bm,
TypeError: create_cone: keyword "segments" expected an int, not float
location: <unknown location>:-1
I have tried a couple of the fixes i have seen here and sadly none of them seems to work. It looks like a type casting issue to me but I can't see where the problem actually is because I'm not familiar enough with python or the code itself. Any help would be great
Hi fellow Aussie, thanks for sharing this awesome script.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.