Log - Romiiii/GrassProject GitHub Wiki

Log

06/01/2024

What we did:

  • Go over multi-fan changes
  • Separate fan window
  • Up/Down arrow to change fan density
  • Add deletion and deselection of fans

Next time:

  • Fix nested window being uninteractable
  • Fluid grid:
    • Border band artifacts
    • Put on GPU
    • Make 3D
    • Figure out how density-loss is SUPPOSED to work (loss of density over time?)
  • Homework:
  • 😄 READ LITERALLY ANYTHING 😸

17/12/2023

What we did:

  • Add debugText function
  • Refactor to remove magic numbers
  • Make debug arrow transparent
  • Somehow fixed fan direction Z-bug

Next time:

  • Fan stuff:

    • Support multiple fans
    • Add color to the debug icon to show something useful, anything useful!!!!!!!
    • Use an outline (or highlight or anything) to see which fan is selected when moving
  • Fluid grid:

    • Border band artifacts
    • Put on GPU
    • Make 3D
    • Figure out how density-loss is SUPPOSED to work (loss of density over time?)

17/09/2023

What we did:

  • Make work for mouse-mode
  • Add drag-and-drop for fan placement
  • Adjusted fan debug icon size

Next time:

  • Fan stuff:
    • Support multiple fans
    • Add color to the debug icon to show something useful, anything useful!!!!!!!
    • Use an outline (or highlight or anything) to see which fan is selected when moving it/adjusting settings
  • Fluid grid:
    • Border band artifacts
    • Put on GPU
    • Make 3D
    • Figure out how density-loss is SUPPOSED to work (loss of density over time?)

19/08/2023

What we did:

  • Fixed camera-raycast for non-mouse-mode with 81 patches

Next time:

  • Make work for mouse-mode
  • Change num-patches to always make squares
  • Make raycast work with squares
  • Add drag-and-drop for fans
  • Border band artifacts
  • Put on GPU
  • Make 3D
  • Figure out how density-loss is SUPPOSED to work (loss of density over time?)
  • Support multiple fans
  • Add color to the debug icon to show something useful, anything useful!!!!!!!
  • Use an outline (or highlight or anything) to see which fan is selected when moving it/adjusting settings

03/06/2023

What we did:

  • Add fans by clicking on the patch (adjust density by scrolling and velocity is determined by the space between the points you clicked):
    • Added grass_math with a class for Ray and Rectangle that we use to find the intersection point of where we click. The plan is to use that position to place the fan. Currently it does not detect intersection correctly and it does not use your cursor position, just the middle of the screen and it should not happen when you are moving around. Next time:
  • Border band artifacts
  • Put on GPU
  • Make 3D
  • Figure out how density-loss is SUPPOSED to work (loss of density over time?)
  • Support multiple fans
  • Add color to the debug icon to show something useful, anything useful!!!!!!!
  • Use an outline (or highlight or anything) to see which fan is selected when moving it/adjusting settings

28/05/2023

What we did:

  • Added a debug icon for the fans (it gets longer with higher velocity and thicker with higher density)

Next time:

  • Border band artifacts
  • Put on GPU
  • Make 3D
  • Figure out how density-loss is SUPPOSED to work (loss of density over time?)
  • Support multiple fans
  • Add fans by clicking on the patch (adjust density by scrolling and velocity is determined by the space between the points you clicked)
  • Add color to the debug icon to show something useful, anything useful!!!!!!!
  • Use an outline (or highlight or anything) to see which fan is selected when moving it/adjusting settings

06/05/2023

What we did:

  • Introduce fans!
  • Various UI improvements
  • Find good default values for fluid grid

Next time:

  • General Fluid Grid improvements.
    • Border band artifacts
    • Put on GPU
    • Make 3D
    • Figure out how density-loss is SUPPOSED to work (loss of density over time?).

08/04/2023

What we did:

  • Improved Fluid Grid jitteriness by solving a silly sampling issue where it sampled 9 tiles, but only divided by 3.
  • Moved Fluid Grid settings from the Settings window to the Fluid Grid-specific window.

Next time:

  • General Fluid Grid improvements.
    • Border band artifacts
    • Too fast
    • Too slow
    • Velocity multiplier
    • Put on GPU
    • Make 3D
    • Figure out how density-loss is SUPPOSED to work (loss of density over time?).

25/03/2023

What we did:

  • Wasted some time on a Daniel-only graphics artifact issue. He will look into it on his own time, to not waste company resources.
  • Changed ambient lighting to also be affected by object color.
  • Change debug settings to default to Fluid Grid

Next time:

  • Look into Fluid Grid precision. It seems that it gets jittery with even a 10x multiply, which means we don't get smooth motion on the blades. This multiply is an issue, since just moving by 1 doesn't really move the grass enough to look good.

Homework:

  • Read the paper again... RIP.

18/03/2023

What we did:

  • Figured out why we have to set windX & windY textures to default on Checker Pattern, when we don't for Perlin Noise.
  • Seperated Perlin Noise and Checker Pattern generation.
  • Cleaned up a bunch of stuff (look at commits if you want more details)

Next time:

  • Get back on FluidGrid!
  • Disable Debug Settings!

11/03/2023

What we did:

  • Fix sliver issue
  • Finish world space patch/blade mapping by moving from halfWorldWidth to worldMin/worldMax.

Next time:

  • Figure out why we have to set windX & windY textures to default on Checker Pattern, when we don't for Perlin Noise.
  • Get back on FluidGrid!
  • Disable Debug Settings!

04/03/2023

What we did:

  • Camera refactor with UP/DOWN controls on Q/E
  • Change defaults to Checker pattern, 81 tiles, visualize texture on patch for debugging.
  • Comment out debugging code in 'Patch.frag' because it was confusing

Next time:

  • Figure out why we have to set windX & windY textures to default on Checker Pattern, when we don't for Perlin Noise.
  • Fix sliver issue🙃

13/11/2022

What we did:

  • Refactor checker pattern generation
  • Refactor imgui wind settings
  • Remove unused UVS
  • Try to debug the checker pattern not aligning with full 81 tile view. This is probably not just a checker pattern issue!!!
    • As can be seen by viewing the cyan tile in bottom left, the halfWorldWidth mapping seems to function, so it's not the mapping!

Next time:

  • Continue debugging the issue above
  • Get back on fluid grid?

30/10/2022

What we did:

  • Map the perlin noise to the world instead of one patch
  • Map the fluid grid to the world instead of one patch
  • Moved textureScale from perlinConfig to config

Next time:

  • Investigate the sliver in Checker pattern when its mapped to 81 patches
  • Expand time controls (and gui)

10/09/2022

What we did:

  • Pause button
  • Somewhat fix jittery fluid grid via filtering
  • Pass in patchSize to shaders instead of hardcoding 10

Next time:

  • Map the perlin noise to the world instead of one patch
  • Map the fluid grid to the world instead of one patch
  • Expand time controls (and gui)

11/06/2022

What we did:

  • Refactor GUI
  • Make fluid grid use delta time instead of just hardcoded 0.1.
  • Add velocity multiplier and clamp to make fluid grid look better with its low values. (Fixes spiky grass)
  • Separate wind settings for different simulation modes

Next time:

  • Pass the patch size to the shaders
  • Map the perlin noise to the world instead of one patch

06/06/2022

What we did:

  • Fluid grid blade application
  • Added permanent solution to unbinding textures!

Next time:

  • Pass the patch size to the shaders
  • Map the perlin noise to the world instead of one patch
  • Separate wind settings for different simulation modes!
  • Less spiky grass (Find solution to very low velocity values)

29/05/2022

What we did:

  • Fluid grid works! (There may still be bugs who knows)
  • Added TEMPORARY solution to unbinding textures!
  • Visualize fluid grid on texture
  • Made small tool for adding forces to fluid grid

Next time:

  • Make grass obey fluid grid!
  • Pass the patch size to the shaders
  • Map the perlin noise to the world instead of one patch
  • Fix the TEMPORARY solution to unbinding textures!

30/04/2022

What we did:

  • Fixed the weird stuff with WindX and WindY, Perlin Noise gets applied to blades correctly
  • Fixed ambient light on the blades
  • Made ambient light independent of the color of the light source
  • Fixed swapping between simulation modes (checker board simulation mode was missing WindY)

Next time:

  • Pass the patch size to the shaders
  • Map the perlin noise to the world instead of one patch

19/03/2022

What we did:

  • Went over blades.vert and removed fives

Next time:

  • Fix the weird stuff with WindX and WindY, Perlin Noise does not get applied to blades correctly

12/03/2022

  • Fix patch Uvs. The patch Uvs were flipped (x = y and y = x), now that is fixed.
  • Camera changes. Camera now can go to ground level y = 0, and we always subtract 90 from the yaw so that yaw = 0 points forward down -Z.
  • Bf-cull on patch. We now use backface culling on patches, for no real reason :smile:

06/03/2022

What we did:

  • Added button for showing/hiding light
  • Refactoring the patch position to range from 0 to 1 and defiving everything

Next time:

  • Continue defiving (the scaling seems to be correct, but the UVs seem flipped)
  • Continue making the grass listen to the FluidGrid
  • Fix the visualization going to red when simulating in the while loop (might also happen with just clicking), it also teleports randomly and disappears over time

26/02/2022

What we did:

  • Fix the skybox
  • Started on making grass listen to the FluidGrid

Next time

  • Continue making the grass listen to the FluidGrid
  • Fix the visualization going to red when simulating in the while loop (might also happen with just clicking), it also teleports randomly and disappears over time

20/02/2022

What we did:

  • Now the zoom in IMGUI matches the zoom on the patch and the blades.

Next time:

  • Fix the visualization going to red when simulating in the while loop (might also happen with just clicking), it also teleports randomly and disappears over time
  • Make the grass listen to the FluidGrid
  • Fix the skybox

12/02/2022

What we did:

  • Updated ImGUI
  • Found out why the FluidGrid texture wasn't rendered in the center

Next time:

  • Find out why the FluidGrid texture doesn't zoom in the center
  • Fix the visualization going to red when simulating in the while loop (might also happen with just clicking), it also teleports randomly and disappears over time
  • Make the grass listen to the FluidGrid
  • Fix the skybox

04/12/2021

What we did:

  • Added debugging textures for the fluid grid simulation (density, velx & vely) to render onto the patch
  • Broke how the perlin noise renders on the patch (it is not centered anymore)

Next time:

  • Fix the visualization going to red when simulating in the while loop (might also happen with just clicking)
  • Fix the rendering onto patch of FluidGrid (probably something with the mapping)

10/01/2021

  • The compute shader's seed texture seems to be zero
  • The CPU and GPU Perlin Noise should be using the same seed texture
  • The GPU should output the seed texture (which is now shown in IMGUI as the third image)
  • We should not execute generatePerlinNoise() every frame (only on pushing 'generate')

12/01/2021

RESULTS !!!!!!!!!! Res: 512x512 CPU: 48.285 ms GPU: 0.405 ms

  • Investigate why the framerate is so low (It's not GPU Perlin Noise PRESUMABLY)

14/11/2021

What we did:

  • Integrated fluid simulation to the rest
  • Added the visualization to the menu

Next time (04/12 at 10:00):

  • Fix the visualization going to red when simulating in the while loop (might also happen with just clicking)

24/10/2021

What we did:

  • Created release for Perlin Noise on GPU
  • Implemented the functions from "Real-Time Fluid Dynamics for Games"

Next time:

  • Check value for N (may need to do +2 somewhere, since allocation follow Mike Ash and he does this differently)

02/10/2021

What we did:

  • Added tooltips
  • Discussed the documentation
  • Renamed the compute shader to perlin_noise.comp (very important!!)

Homework: Read the paper (again)

18/09/2021

What we did:

  • Refactored to use Texture class
  • Designed the documentation guide

Documentation homework:

Person 1

  • scene
  • scene_object
  • scene_object_arrays
  • scene_object_indexed
  • scene_object_instanced
  • camera
  • debug
  • glmutils
  • patch
  • perlin_noise
  • general documentation
  • video

Person 2

  • main
  • texture
  • shader
  • shader_program
  • primitives
  • util
  • menu (tooltips)

07/08/2021

What we did:

  • Made the grass model prettier

Next time:

  • Get a better texture for the patch
  • Continue thinking about the paper

24/07/2021

What we did:

  • Made PerlinSampleScale work for all patches
  • Made sure alignment works across wind direction (checker pattern does not match with how grass blades bend)
  • Added option for debugBlades (blue is the vertex the pivot vertex that decides when the blades turn, the color at the tip is the sampled color from the noise texture)

IT LOOKS AWESOME NOW

Homework:

  • Read the paper

Next time:

  • Get prettier models for grass & patch
  • Start thinking about the paper

21/07/2021

What we did:

  • Fixed lights
  • Added option to visualize texture
  • Changed vertex color of index 0 of grass to blue
  • Cleaned shaderz

Next time:

  • Make PerlinSampleScale work for all patches
  • Make sure alignment works across wind direction (checker pattern does not match with how grass blades bend)

10/07/2021

What we did:

  • Fix the mapping between the texture on the patch and the blades that are relative to world space, now works for all values of PerlinSampleScale BUT only for a single patch
  • The empty checker cell was just us being stupid, it was correct in fact
  • Removed Wind Direction
  • Made the menu pretty

Next time:

  • Make PerlinSampleScale work for all patches
  • Get the light to work again

21/06/2021

What we did:

  • Fix the mapping between the texture on the patch and the blades that are relative to world space (only works when PerlinSampleScale = 1.0f)
  • Added Harry Styles Settings

Next time:

  • Fix the mapping for other values of the PerlinSampleScale
  • There seems to be an empty checker cell at the side of the patch
  • Remove Wind Direction for this milestone
  • Get the light to work again

Not too distant future:

  • Think about branching and doing the God Of War thing

05/06/2021

  • BufferSizes! Always overshoot, lesson learned. perlinSampleScale was not getting picked up by the shader, cause the name was cut.
  • Added error messages for uniform names
  • Made debug grass placement, they are now in a line
  • We added perlinSampleScale to the texture on the patch
  • New problem: If perlinSampleScale is changed it is relative to the texture on the patch, but blades are getting transformed relative to world space. We need to figure out how to get the two to correlate, so that the blades reflect the same pattern as the texture on the patch in their transformation.

24/05/2021

  • Fixed the eternal bug!!!!! Now perlin noise works
  • Added a button to switch between perlin noise and checker mode
  • Made swayReach for perlin noise
  • Possible bugs: perlinSampleScale does not work

26/04/2021

It seems that in the fragment shader the coordinates go from (0,0) (bottom left) to (20,20) (top right)

06/04/2021

Continued working on the BUG with the perlin noise, we tried to solve it by looking at rendering the vertex positions as colors. We saw that it seems like x and z are flipped (so possibly a * -1 or swap of columns and rows somewhere)..... (magic)

27/02/2021

  • Finished implementing the visualization of the perlinNoise texture on the patch for debugging purposes
  • Tried to debug the wind
    • We think the problem might be the way the compute texture gets mapped to the grass blades (since they're all moving in the same direction at the same time, they might all just be sampling the same pixel)
    • We played with rendering the UVs (actual_pos and texture_pixel) as vertex colors (the blades might not be sampling the correct positions)
    • Also tested how a checkerpattern influences the wind (this introduced twitching and was not helpful)
    • We removed the random rotations on the blades for simplicity

Suggestions:

  • Look at hand-in where the sampling the perlin noise worked
  • Try to render actual_pos as the vertex colors of the blades to ensure that happens correctly

16/02/2021

  • Started implementing the visualization of the perlinNoise texture on the patch for debugging purposes
  • Cleaned the code
  • Removed warnings

03/02/2021

  • Changed the perlinNoise imageTexture into a Texture, this made the sampling smoother (because the Texture going from 0-1 works better than the imageTexture going from 0-512)
  • Maybe it will be helpful to visualize the perlinNoise Texture on the patch for debugging purposes

23/01/2021

  • Fixed performance (it was the PerlinCPU being called every frame)
  • Uploaded the perlin noise texture to blades.vert
  • The grass moves in steps
  • Next time: Figure out why the grass is not moving smoothly, probably has to do with the fact that we aren't treating the perlinNoise as a texture, but as an imageTexture!