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

feat: vanilla ts example for wind prediction #35

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

hakon-matland-adsk
Copy link
Member

@hakon-matland-adsk hakon-matland-adsk commented Feb 27, 2024

This branch is a simple example of how to do wind predictions from an embedded view.

  • get desired position using Forma.designTool.getPoint()
  • Generate height maps using raycasting in generateHeightMaps
  • Perform predition using Forma.predictiveAnalysis.predictWind
  • Draw results to scene using Forma.terrain.groundTexture.add

I've done simple sanity check of comparing this approach with the one done by the built in feature, but make no promises that I've included the exact same geometry in the height map.

This codebase to the left. Native feature to right:
Note that there is expected to be slight differences as the height map generation technique is different, and the extension texture does not look as crisp.
Screenshot 2024-02-27 at 08 57 02

This branch is a simple example of how to do wind predictions from an embedded view.

* get desired position using `Forma.designTool.getPoint()`
* Generate height maps using raycasting in `generateHeightMaps`
* Perform predition using `Forma.predictiveAnalysis.predictWind`
* Draw results to scene using `Forma.terrain.groundTexture.add`

I've done simple sanity check of comparing this approach with the one done by the built in feature, but make no promises that I've included the exact same geometry in the height map.
Copy link
Contributor

@knut-sverdrup-adsk knut-sverdrup-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this! Super neat and to the point 💯 💯

Copy link
Contributor

@vilde-barth-adsk vilde-barth-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 💯

@hakon-matland-adsk hakon-matland-adsk merged commit ac8a702 into main Mar 7, 2024
10 checks passed
@hakon-matland-adsk hakon-matland-adsk deleted the example/predictive-wind branch March 7, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants