-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a number of primitive objects #8578
Conversation
I'm planning to do a few more objects if I find the time. Also I don't know how to change the icons in the node editor, they are all the default geometry icons.. |
Actually..it might be better if they were premade meshes that you can put
into a mesh instance? This way stuff like GI bake will work on them with no
effort.. not sure
…On Apr 29, 2017 3:06 PM, "Bastiaan Olij" ***@***.***> wrote:
I'm planning to do a few more objects if I find the time. Also I don't
know how to change the icons in the node editor, they are all the default
geometry icons..
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8578 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z28jkgHRqn2dloYsnCxxJ2U-EHXyUks5r0zXdgaJpZM4NMP6Q>
.
|
@reduz , I would recommend anyone to make their assets in modeler software, this is handy to put some placeholder stuff in, not to build an entire game with (though it is possible) :) I just got very tired switching back to Blender which is the only thing that works on my Mac and only so so because Macs were designed with one button mouses, grumble at supporting two, and hate anything designed with 3, so for simply stuff it can be very handy to just have it generate right there :) Anyway, it's there, it's small, I'll add a few more things in. If you guys like it and find it useful, add it in, if not, I'll do a GDNative version for it in Godot 3 :) |
@reduz , do keep in mind that you can't change the segments/subdivision of premade meshes, that is another issue.. though it may be interesting to look into adding a subdivider or mesh optimiser into Godot. UE4 for instance will take a high level mesh and optimise it automatically to create a number of LOD versions of the mesh. I once watched a video with some amazement of a guy making a zillion poly rock in z-brush, import it into UE4, used a few dozen instance of that object to create a rock face, and wonder how the....... that didn't drop the framerate like crazy. Seems that rock was automatically optimized to a version with lots less polygons... Entirely different topic then this offcourse :) |
@BastiaanOlij Build fails on X11 and Windows:
|
@akien-mga , I'll have a look on Windows in the weekend, I'm hoping to add a few more shapes then as well. Strange errors though, thats the register and unregister functions it is complaining amount (the ones in https://github.com/BastiaanOlij/godot/blob/primitives/modules/primitives/register_types.cpp), that doesn't make much sense. edit could it be as simple as the last line in SCsub needing newline at the end? or that it is missing something else that prevents the files from being included? |
|
||
ObjectTypeDB::register_type<Cube3D>(); | ||
ObjectTypeDB::register_type<Sphere3D>(); | ||
ObjectTypeDB::register_type<Prism3D>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation issue ;)
That should be fixed for the sake of prettiness, but the actual issue might be that you named the file |
BTW the files don't strictly follow the clang-format style, Travis did not complain because it seems to be confused by PRs on the 2.1 branch. |
@akien-mga hehe, case, lovely, I'll get it fixed up tomorrow. I got my branch currently switched to my stereo_camera as I'm working on my videos.. Whats the command for applying the clang formatting to the files? |
If you have the
(the "file" in I haven't tested them on macOS, but you should be able to setup the precommit hooks that we have in |
I am not sure if this a good idea, I think we should add meshes instead of
nodes, so we can use MeshInstance. Using MeshInstance has the advantage
that you can assign custom materials in an easier way, as well of getting
your meshes baked.
For reference, I already added a QuadMesh in mesh.h, so it would be about
adding more shapes..
…On May 2, 2017 3:44 PM, "Rémi Verschelde" ***@***.***> wrote:
Whats the command for applying the clang formatting to the files?
If you have the clang-format binary in your $PATH, it should be:
clang-format -i -style=file <path/to/files>
(the "file" in style=file is the actual "file" word, not a path to a file)
I haven't tested them on macOS, but you should be able to setup the
precommit hooks that we have in misc/hooks. There are setup instructions
in the readme, you might have to tweak things a bit for it to work in the
macOS shell - if so I'd be interested in fixes that would make them work
out of the box on Linux shells and macOS shells.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8578 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z286Lc2YVL2Nw4ts_ALQqgO8qPGBmks5r1zNZgaJpZM4NMP6Q>
.
|
Also it has the advantage of duplicating and keeping a simple resource.
On May 2, 2017 4:50 PM, "Juan Linietsky" <[email protected]> wrote:
I am not sure if this a good idea, I think we should add meshes instead of
nodes, so we can use MeshInstance. Using MeshInstance has the advantage
that you can assign custom materials in an easier way, as well of getting
your meshes baked.
For reference, I already added a QuadMesh in mesh.h, so it would be about
adding more shapes..
…On May 2, 2017 3:44 PM, "Rémi Verschelde" ***@***.***> wrote:
Whats the command for applying the clang formatting to the files?
If you have the clang-format binary in your $PATH, it should be:
clang-format -i -style=file <path/to/files>
(the "file" in style=file is the actual "file" word, not a path to a file)
I haven't tested them on macOS, but you should be able to setup the
precommit hooks that we have in misc/hooks. There are setup instructions
in the readme, you might have to tweak things a bit for it to work in the
macOS shell - if so I'd be interested in fixes that would make them work
out of the box on Linux shells and macOS shells.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8578 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z286Lc2YVL2Nw4ts_ALQqgO8qPGBmks5r1zNZgaJpZM4NMP6Q>
.
|
@reduz , Ah I get it now, you mean turn them into resources, I had some issues with that in Godot 2 and actually using them but that is probably me not having learned a trick. Yeah its probably a good idea to change them into resources, I thought you meant actually putting fixed models in there which defies the point a little :) |
That would be great. Ideal solution would be when we could generate procedural meshes and save them as mesh resources and even export to OBJ/FBX/DAE so Level Artists could use it as reference in their 3D software of choice. |
No, it's the same, even if they are resources, they can be customized.
There is nothing against it.
…On May 3, 2017 8:24 AM, "n-pigeon" ***@***.***> wrote:
@BastiaanOlij <https://github.com/BastiaanOlij> @reduz
<https://github.com/reduz>
That would be great.
I think both of you are right.
Premade meshes make other Godot features work and can be used like real
assets.
Generated meshes make stuff procedural and more powerful for level
prototyping and temp visualizations.
Ideal solution would be when we could generate procedural meshes and save
them as mesh resources and even export to OBJ/FBX/DAE so Level Artists
could use it as reference in their 3D software of choice.
See issue - #8510 <#8510>
Level Designers almost always must work in Game Editor and forcing them to
create meshes blindly in 3D package and export stuff to Godot is "no go"
workflow.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8578 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z2yekmdMR3M5KY-w6orgG1ivYGov5ks5r2CuugaJpZM4NMP6Q>
.
|
Yes, meshes is better because it will improve other things like Particles creation. |
Alright, finally Mesh and ArrayMesh have been decoupled. Feel free to rework your PR so you can directly inherit from Mesh! Also, i think it does not need to be a module, should be good in core, so put it in scene/resources |
Will do @reduz, I'll try and find some time tonight, else this will be my Saturday morning project. |
@reduz btw this is the 2.1 branch :) @akien-mga we should probably close this as I'm not planning to do any more here, all work will go into #8661 |
@BastiaanOlij You can close your own requests :) |
@n-pigeon I know, I just don't like closing things off too quickly :) |
This PR adds a number of new 3D objects to the node tree. Each object is generated by code in a similar fashion as the TestCube and Quad objects are.
They differ in a number of ways:
Here is a test project that showcases the new objects:
https://github.com/BastiaanOlij/TestPrimitives