-
-
Notifications
You must be signed in to change notification settings - Fork 97
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 Line3D node #6151
Comments
A mesh resource can be assigned to several different/unrelated nodes at once. How can you keep track of this within the mesh resource?
I agree with removing the section count (or section subdivision), as it always felt like a second way to achieve the same thing to me (i.e. changing the detail level). |
Related to #6145 |
Admittedly my understanding of everything is still very limited, but here's an abstraction of how i imagine it working |
Line3D ... Trail for me is two different things. But maybe, We should move the CSGPolygon, including the fallow path mode to a new line3D node. That will be a MeshInstance3D. After that, I think we should have a new separate node, the Trail3D. Because the purpose is completly different that a Line3D. |
@MajorMcDoom Can you share the shader on a site such as godotshaders.com ? |
Seems like various parts of GodotShaders have been down for a day now, including registration and uploading, so I'm just gonna attach a zip with some files. :) There are three files:
This was all implemented to just a "good enough" level for my own game, but I'm just providing it here as something we can maybe test and iterate with. The actual implementation I think should support any user material/shader, with the billboarding happening "outside" somehow. I think this can be achieved either as part of the GLSL generation, or as its own base shader type, maybe. Disclaimer on the provided tech:
|
A year later, rewrote most of the proposal to be more to the point, took out the part about combining this with the existing |
@MajorMcDoom This is so much appreciated, thank you! |
Godot Next provides a Trail3D node type which can be used for 3D lines: https://github.com/godot-extended-libraries/godot-next/blob/master/addons/godot-next/3d/trail_3d.gd |
Hi all, I added an updated version which fixes some bugs and adds some new features (like texturing). It's in the form of an addon folder this time, in a GitHub repo. Hopefully it'll come in useful for whoever implements this proposal. https://github.com/CozyCubeGames/godot-lines-and-trails-3d New features:
It also comes by default with a material assigned now. Just as a reminder: I won't be supporting this add-on. I will only answer questions about it as best as I can if they pertain to the implementation of this proposal. |
hey! don't mean to necro the post, but can you tell me how to create new materials for the trails? i tried using your default materials with it, but i cannot use it for more than one type because the textures are not interchangable for some reason. so if i change the texture (while making the shader and material unique), it just applies the default anyways. any workaround for that? making new shaders based on that doesn't work either, always reverts to default |
Hey there, You actually do still have to use the GeometryInstance3D's material override property, not the per-surface material override of MeshInstance3D. I tried to fix this but it presented issues (like you described). As mentioned in the README, I won't be providing support for the add-on. And since this is the Godot repo, I would ask that no further questions be asked here about its operation, just to keep things on topic. Unfortunately you'll have to do any further troubleshooting or modification on your own. Thanks for your understanding. :) I'll edit my earlier posts to reflect this. |
Related: #5196_
Describe the project you are working on
Mainly testing features and making small test games for fun.
Describe the problem or limitation you are having in your project
A lack of a 3D equivalent of
Line2D
, or any sort of 3D line drawing functionality.Describe the feature / enhancement and how it helps to overcome the problem or limitation
A
Line3D
node, with the same functionality asLine2D
, and more to make it truly versatile for 3D, since at heart it's just taking a few points in 3D space and drawing a mesh between them, which can be used for many different things such as:Path3D
sDescribe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Would be defined by a
PackedVector3Array
, of course.Line3D
should have feature parity withLine2D
, having options for:Width
, and aCurve
for it, would separating X and Y be worth it?Closed
propertyCapping
andBorder
Gradient
andTexture
should be covered by shaders, might needTexture Mode
to determine if UVs tile or stretch?Line3D
Specific settings:Mesh Mode
:Ribbon
: Simple strip, meant for billboarding, but can be used without itRotation Offset
: Rotates the strip, only effective when not billboardedCross
: Two strips intersecting each other at 90 degree angles, meant for when billboarding is not an option for one reason or another.Rotation Offset
: Rotates the cross.Tube
: A tube/cylinder, meant for cables and large trails where you could see a line is flat with ribbons/crosses.Segments
: The resolution of the tube.Direction
:Follow
: Faces are rotated along the line, equivalent toPathFollow
fromCSGPolygon3D
Custom
: all faces face a specific direction, defined by aVector3
.If this enhancement will not be used often, can it be worked around with a few lines of script?
It's a relatively major feature, and far from beginner friendly to code (very intimidating).
Is there a reason why this should be core and not an add-on in the asset library?
Line2D is in core, and no way to do the things it does in 3D out of the box.
The text was updated successfully, but these errors were encountered: