Git Product home page Git Product logo

godot4-oceanfft's People

Contributors

tattomoosa avatar tessarakkt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot4-oceanfft's Issues

Make wave generation parameters available to other shaders

I think it could be useful to make the wave generation parameters available to other shaders to use because it would allow the splash particles to move in the direction of the wind and be affected by the wind speed. I could also see higher choppiness/windspeed potentially affecting the amount of bubbles that appear near the surface.

If we can describe how we'd like that to be implemented here, I'd gladly do the legwork of implementing it.

Underwater particles clump up into stringy lines near the surface of the water

The underwater particle spawning appears to mess up when the spawning sphere is not completely submerged. We might be able to stop this from happening if we stop spawning new underwater particles when the sphere is intersected. This would also prevent particles from spawning nearby objects but I would think that could be solved easily by another spawner.

Improve Plugin End-User Ergonomics

Great work! But there are some design decisions which hamper end-user usability, notably:

Hardcoded node paths in scripts which define rigid scene structures and have no configuration warning when not properly configured

I've made a commit in a fork that I can PR which I think nicely solves this for BuoyancyBody3D and BuoyancyProbe3D, as well as one that removes the hardcoded paths in MotorVessel3D (just opting for exported node paths). (https://github.com/Tattomoosa/godot4-oceanfft)

This has the added benefit that probes added during runtime will work without adding them manually as a separate step. (And it just occurred to me that they could easily remove themselves when they exit the tree, so I'll make a commit for that as well)

No in-editor preview which would be very useful for adjusting parameters

Poking at this but having some problems getting QuadTrees to play nice as a tool script, still looking at that.

MotorVessel3D can only be controlled by the keyboard

This is pretty easy to resolve and seems worth doing to allow for autonomous vessels, but considering going a bit further and supporting multiple propellers while I'm at it. Apparently twin rudders is a thing too, TIL.

Necessary for end user to add, setup, and link several nodes to use

This has some other considerations:

  1. It's probably not ideal to extend WorldEnvironment into OceanEnvironment for a couple reasons
    1. Environments can be added to cameras directly to override WorldEnvironment and this behavior should be considered
    2. Other plugins may extend WorldEnvironment
    3. Multiple oceans can't have different properties
      • Seems like a user may potentially want to add more than one, e.g. a beach resort setting that also has a pool
  2. As-is, properties in several nodes need to be modified to tweak ocean appearance
    • Nodes that need to be linked and potentially need modifications:
      1. QuadTree3D
      2. Ocean3D
      3. OceanEnvironment

It seems to me the ideal end-user experience would be to add a single node that just works, but I'm not really sure that's reasonable yet. Happy to keep poking and implement changes myself but wanted to start a conversation and get your thoughts before I do too much work -- would definitely prefer to contribute here than maintain a fork.

Ocean only renders in global +X/+Z quadrant direction, centered on camera, when using RADV Vulkan drivers on Linux

Discussed in #5

Originally posted by Torivon September 19, 2023
When running the example scene (In Godot 4.1.1.stable) , the camera is always at the corner of the ocean. Wherever I move the camera, there is ocean in the positive x/positive z direction, with nothingness in the 3 other quadrants. This seems to be a visual issue only as buoyant objects properly respond to the waves that ought to be present. As far as I can tell, the camera should always be in the center of the visible ocean.

I am relatively new to both shaders and Godot, and have not been able to figure out where the disconnect is.

OceanEnvironment2
OceanEnvironment1

Planetary curve

If the curvature of the planetary surface is greater than 0, then when moving away from the center the ship sinks under the underlying surface.

Window hangs when closed via the windows close button; the stop button in the editor works immediately

Issue Description

When closing the game window via the windows close button, the window will freeze on the last frame and stop responding.

Confirmed to happen on Godot 4 beta 12, previous betas likely affected as well.

Cause

Usage of a sampler2d array uniform in the visual shader. This is acknowledged by godotengine/godot#70527.

Short Term Solution

Return to the Godot editor window and use the stop button to stop the game process immediately.

Long Term Solution

A fix has been recently merged into Godot (pull request godotengine/godot#71346) and should be included in an upcoming beta release.

better performance of mesh/lods

I used the clipmesh of Terrain3D as a replacement for the quadtree based mesh thast there currently. It works way better and I got it running in the editor even.

The speed of the MotorRectangle is very small

Thanks for the work. I have a question about the speed of the MotorRectangle. How can I increase its speed? Changing thrust_power_main does not help. Using Godot v4.2.2.rc1.official [c7fb0645a]

Key bindings does not work

I do not know how to describe it properly, but on my sistem keys presented in readme file not working.

Heavy buoyancy jitter

When switching in the demo to the boat mode and increasing wind speed and chopiness, the jitter is very visible. It seems to not come from the physics system, but the wave heights computed in the compute shader.

wave direction error

Hi,
Thank you very much for this work.
I noticed that the wind_uv_offset and wind_angle transfered from Ocean3d to the shader contains both the rotation.
If we remove the wind_angle, the choosen rotation with the widget is applyed.

Thank you

Update to work with double precision build of Godot

I am working with a double precision build (Godot 4.2.3 mono). The example project runs, but the initial spectrum (and thus the waves) are not the same as in the single-precision build. Making the following 1-line change solves the issue:

In Ocean3D._pack_initial_spectrum_settings(), change the line that appends the wave vector to pass the wave vector components as 32-bit floats instead of a Vector2. The double precision build of Godot uses 64-bit Vector2, but it makes the correct conversion to 32-bit floats when appending the components to a PackedFloat32Array.
WAS:
settings_bytes.append_array(PackedVector2Array([wave_vector]).to_byte_array())
SHOULD BE:
settings_bytes.append_array(PackedFloat32Array([wave_vector.x, wave_vector.y]).to_byte_array())

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.