godot icon indicating copy to clipboard operation
godot copied to clipboard

CSGPolygon add interpolation

Open stebulba opened this issue 3 years ago • 4 comments

This new feature come from my proposal: Add Scaling/Modify a CSG Polygon in PathFollow when PathNode is drawing the mesh godotengine/godot-proposals#1062 This is a new pull request because the original branch was bugy #53195 3.x version is here --> #53462

The interpolation work using a Curve who interpolate between two polygon array. If both polygons are equal, a single scaling mode is active.

interpolate_exemple_angle_symplify If the polygon2 is empty, when you active the interpolation bool, you make a copy of the first polygon to the second. Is a way to reset or help you for editing the polygons. No interpolation are happening if the curve is null and if the size of polygon2 is different of the polygon.

The interpolation make 3 styles of modification, like a scaling, moving or expanding. Those video show how that work for depth mode, spin mode and path mode. All videos is in 5 fps.

Mode Depth : Doesn't use the avantage of path_interval. The interpolation is straight up from point to point of the curve.

https://user-images.githubusercontent.com/26193340/135149868-f7e1d897-661f-4d4f-9fb4-38775ad79819.mp4

Mode Path : In a expand mode, to modify when you modifie x axis only in polygon2, you can for exemple make larger a racing/road in some point of your race.

https://user-images.githubusercontent.com/26193340/135149999-d6d5793e-4998-46bf-a76d-460f5b29e541.mp4

Mode Spin : In mode spin I add a new property " spin_fix_neg ". When interpolation is enable, that will reverse/remove faces if the curve is negative. I don't like to add this additional property, but it's a constraint in mode spin if the user want set a negative position in the interpolate_curve.

https://user-images.githubusercontent.com/26193340/135150035-2080356b-1811-44eb-946f-b52d9c9281ac.mp4

DISCUSSION: A discussion about the properties names is on the old PR https://github.com/godotengine/godot/pull/53195#issuecomment-938068253 I will wait the reviewers opinion, before to change that. My choice for renaming is ( profile_interpolation, polygon2, profile_curve)

stebulba avatar May 25 '22 22:05 stebulba

This looks interesting, but also quite difficult to assess as currently we don't have an active maintainer for the CSG features.

The features being added seem very specific to the use case in your proposal, which didn't get much user support so far so it's hard for us to decide if the proposed features are worth the added complexity, and will be useful to users.

We'll still aim to give this a proper review as time permits but ideally more users would get involved testing this and providing feedback on whether they would benefit from this feature. We're unlikely to be able to do this assessment before the 4.0 release as we're already in (somewhat flexible) feature freeze so let's assess this for 4.x.

akien-mga avatar Oct 04 '22 12:10 akien-mga

The features being added seem very specific to the use case in your proposal

I understand how busy your are. But I am not agree that it's specific for what my proposal was in the beginning.

You can make 3d statistic graphical. I imagine a science-fiction game with hologram where you see a 3d graphical for your real time stats. In my proposal, I made in two minutes a prototype of a small ruin house. We can generate easy hundred ramdom background objet for you 2.5 games for exemple. I have a idea of motocycle racing game with random hills in background and ramdom hill as the road. I am waiting the implementation to experiment that. We can make snakes of different sizes. With future tools like MergeGroup node, that will maybe possible transform those csg to a real skeleton mesh snake. (in future) Someone wanted in my proposal to make branch of tree. A looked-realistic size and path of tree trunk can be made with feature. One guys talk about roads in a another dupe proposal. I think some future 3d editor addons can use this feature. No limit with imagination.

stebulba avatar Oct 05 '22 01:10 stebulba

Yeah, roads are a definite use case for this

Zireael07 avatar Oct 05 '22 07:10 Zireael07

Rivers and streams are another good use case here.

Flynsarmy avatar Oct 29 '23 07:10 Flynsarmy

Bumping this as having this merged would be super helpful for the development of our race track building game. Mainly for building the roads.

bjr29 avatar Nov 21 '24 15:11 bjr29

I seriously need this function in my antigravity racer game for a better level design, it would be fantastic if this comes to 4.4 together with the other csg improvements. If this is not going to be approved, i suggest the author to transform this in an addon, so we that need this functionality so badly can use it.

lucasthomaz97 avatar Dec 27 '24 18:12 lucasthomaz97