Skip to content
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

CSGPolygon add interpolation #61424

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stebulba
Copy link
Contributor

@stebulba stebulba commented May 25, 2022

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.

mode_depth_scaling-moving-expand_5fps.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.

mode_path_scaling-moving-expand_5fps.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.

mode_spin_scaling-moving-expand-spin_fix_neg_5fps.mp4

DISCUSSION:
A discussion about the properties names is on the old PR #53195 (comment)
I will wait the reviewers opinion, before to change that.
My choice for renaming is ( profile_interpolation, polygon2, profile_curve)

@stebulba stebulba requested a review from a team as a code owner May 25, 2022 22:43
@Chaosus Chaosus added this to the 4.0 milestone May 26, 2022
@stebulba stebulba force-pushed the 4-0-csg_interpolation branch 2 times, most recently from e7d0bc2 to 16faf99 Compare October 2, 2022 20:20
@akien-mga
Copy link
Member

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 akien-mga modified the milestones: 4.0, 4.x Oct 4, 2022
@stebulba
Copy link
Contributor Author

stebulba commented Oct 5, 2022

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.

@Zireael07
Copy link
Contributor

Yeah, roads are a definite use case for this

@Flynsarmy
Copy link
Contributor

Rivers and streams are another good use case here.

@bjr29

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants