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

Add Cone and Cylinder shapes to FogVolume #61243

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 21, 2022

This complements the existing Ellipsoid and Box local fog shapes.

This can be used to represent a light cone coming from a SpotLight. See godotengine/godot-proposals#4557.

Preview

2022-05-21_12 28 19

fogvolume-cone.mp4

TODO

  • Fix cone angle calculation.
  • Implement non-uniform scaling for cone and cylinder shapes based on extents (so that you don't have to scale the FogVolume node instead).
    • See clayjohn's comment below.

@Calinou Calinou added this to the 4.0 milestone May 21, 2022
@Calinou Calinou force-pushed the fogvolume-add-cone-cylinder-shape branch from 3140d61 to bed6db5 Compare May 23, 2022 05:23
@Calinou Calinou marked this pull request as ready for review May 23, 2022 05:23
@Calinou Calinou requested review from a team as code owners May 23, 2022 05:23
@Calinou Calinou force-pushed the fogvolume-add-cone-cylinder-shape branch from bed6db5 to f92ceaf Compare May 23, 2022 05:37
@clayjohn
Copy link
Member

Implement non-uniform scaling for cone and cylinder shapes based on extents (so that you don't have to scale the FogVolume node instead).

I'm not sure this is necessary, cone and cylinder are geometric primitives that, by definition, do not have X/Z scaling as they are both defined with a height and radius. In other words, they are not extruded ellipses, they are extruded circles.

I am fine merging this without non-uniform scaling (in the X/Z plane).

This complements the existing Ellipsoid and Box local fog shapes.

This can be used to represent a light cone coming from a SpotLight.
@Calinou Calinou force-pushed the fogvolume-add-cone-cylinder-shape branch from f92ceaf to e85459d Compare May 25, 2022 10:36
@akien-mga akien-mga merged commit 40da293 into godotengine:master May 25, 2022
@akien-mga
Copy link
Member

Thanks!

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.

3 participants