-
-
Notifications
You must be signed in to change notification settings - Fork 98
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 Scaling/Modify a CSG Polygon in PathFollow when PathNode is drawing the mesh #1062
Comments
Hi! im working on a forest/tree generation module and i was using CSGPolygon for trunk and branches and i figured out that i can make the mesh to start on a scale and finish on other, so i made my modifications to engine core and managed that functionality. That would work for your needs? Im willing to make a PR for this. |
Interesting, I am curious to know how you add the TextureCurve. Directly in the core of csg_shape.cpp ?
I don't know how work particule, but for my self I want to use the interpolation of the curve that you made to apply (multiply) on any extrusion slice. A picture is worth a thousand words, on that way I can draw a Babylon Tour as this picture : I am thinking to copy the csg_shape.cpp and make a new plugins call as a different CSGPolygon. But I still thinking that the best way should be to modify the core in csg_shape.cpp If the them don't want include all my feature in csg_shape.cpp, maybe we can make a new module csg_shapeB.cpp [csgpolygon2] with my version. For now I cannont work on i because a got trouble to compile Godot on my Desktop. I have to work on that issue. |
Oh now i understand! I think my approach can work for you if somehow we can have a curve for each Vec2 component (a separate curve for x and y), so you can separate the "floor" of your spiral using a scale curve for x and use a separate CSGPolygon for "wall" with no scale curve. https://github.com/godotengine/godot/blob/master/modules/csg/csg_shape.cpp#L2087 |
Yes you understand want I want. We almost doing the same ting. But in your scaling you have limitation. If you just add a new array at the end you can modify the form of your branch at the end. And for what I want, I can move my left wall and my two left left vertex without changing anything of the right wall. On that way I just make bigger the width of my road. It's possible to do some rotation on the second array and make for exemple a curving turn for car. They have no limitation. In my proposal, I can do the same thing that you. Except your scaling of your curve at [1] will be already calculate in the second array push by godot (gdscript) to the core. It'is why a am thinking to include your feature on a normal CSGPolygon. And add a new CSG, the CSGComplexPolygon with my feature. Because we don't want include to mush condition in the drawing path loop. Why are you not using a Normal Curve? I don't think you need to use CurveTexture. Also I suppose I can use those function (easing_equations.cpp) directly from (csg_shape.cpp) to get the curve that I want. Anyway, thank to participate, you help me to focus on that and I progress a lot today on that :) |
Describe the project you are working on:
I am making a 3d map editor. I am using Path and CSG Polygon (path fallow) to make slides and tracks.
Describe the problem or limitation you are having in your project:
That's work, but it's missing one option. I would like modify the PoolVector2Array polygon on any steep when drawing the path. I want extrude my polygon from a array A and scaling/moving/midify to the end of the path until a got the new polygon from array B.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
They have the option for tween animation : tween_step where on any step of the animation we can do someting. But it's probably not a good way.
Can be possible to add on last points of the curve (path node) a different PoolVector2Array polygon and leave the path calculate the size of the csg polygon between those points when is drawing? On that way, Why not to include a TransitionType, like trans linear on the csg polygon between the first and the last point of the curve.
When Godot is drawing the mesh of the csg polygon from on the path, that should be easy for Godot to calculate the interpolation between the first csg polygon array and the second array.
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Each CSG polygon should have if Path fallow is activate :
That don't look difficult to include in Godot. Something in this file.
https://github.com/godotengine/godot/blob/master/modules/csg/csg_shape.cpp#L2087
If I am not in error at the line 2087 the final_polygon array (with a different name of var) should be updated to the new polygon size and position depending of the transitionType between beginning and the end.
2087: new_polygon = polygon_from_slip_already_interpolate_earlier_arround_line_1815[i];
That's right ?
just for link :
https://github.com/godotengine/godot/blob/master/scene/3d/path_3d.cpp
That limitation will miss me the AAA on map Editor.
I hope you understand what a mind, what I am proposing.
This small option will give us a lot of opportunities.
The text was updated successfully, but these errors were encountered: