-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add a cylinder mesh to bevy_render #2282
Comments
Have you seen the geometric primitives RFC? :) It's ready for community comment, so your input on this topic would be valuable. |
Is it now possible to make cylinder from the standard shapes? |
This should be constructable via the Capsule type. However we should at the least add a helper method for this. |
I attempted this, but I don't think it's possible to create a cylinder from a capsule.
Also I experimented with I think a cylinder needs to be a separate shape. |
Sounds good, I'd be happy to have this implemented as a seperate shape. |
I'd be happy to donate the cylinder code here: https://github.com/rparrett/typey_birb/blob/main/src/cylinder.rs I had intended to PR it at some point but I'd be happy if someone else did that work. |
@rparrett Feel free to do the PR then. I don't know how to fix the lighting on the other one, but I put yours in the 3d_shapes example and it looks perfect. Edit: Oh I just saw that you said you'd be happy for someone else to do it. I can do it then. |
Yeah, feel free to PR that code if you want. Maybe add the author of #305 and me as co-authors if you want. IIRC, my code was very loosely based on that one (docs still seem pretty similar) but I abandoned most of it when the UVs weren't behaving and referenced... some old textbook somewhere. I don't need another PR on my plate at this moment though. |
# Objective Adds a cylinder shape. Fixes bevyengine#2282. ## Solution - I added a custom cylinder shape, taken from [here](https://github.com/rparrett/typey_birb/blob/main/src/cylinder.rs) with permission from @rparrett. - I also added the cylinder shape to the `3d_shapes` example scene. --- ## Changelog - Added cylinder shape Co-Authored-By: Rob Parrett <robparrett@gmail.com> Co-Authored-By: davidhof <7483215+davidhof@users.noreply.github.com>
# Objective Adds a cylinder shape. Fixes bevyengine#2282. ## Solution - I added a custom cylinder shape, taken from [here](https://github.com/rparrett/typey_birb/blob/main/src/cylinder.rs) with permission from @rparrett. - I also added the cylinder shape to the `3d_shapes` example scene. --- ## Changelog - Added cylinder shape Co-Authored-By: Rob Parrett <robparrett@gmail.com> Co-Authored-By: davidhof <7483215+davidhof@users.noreply.github.com>
What problem does this solve or what need does it fill?
Cylinders are a fundamental shape and we should have a means of generating cylinder meshes in Bevy. Currently the closest option to this is a capsule shape.
What solution would you like?
The addition of a
Cylinder
shape and implementation ofFrom<Cylinder>
forMesh
.What alternative(s) have you considered?
Additional context
PR #305 implemented this feature but was closed before merge. I would like to bring this PR back to life and get it merged, however, meshes, normals, UVs etc are not my area of expertise and I am having some problems with the UVs/normals I think (see below). Perhaps I can open a new PR for this? Some more commits will be necessary to get the rendering working.
The text was updated successfully, but these errors were encountered: