Skip to content

Conversation

DTCurrie
Copy link
Member

@DTCurrie DTCurrie commented Sep 22, 2025

Adds a PCD to the world state store service visualization to test loading and rendering. We add color to the point cloud by normalized height, and then apply noise and recalculate colors at 1000 points per tick.

Also fixes some animation logic (y vs. z axis swapped) and improves general code cleanliness for maintainability, making this a better example for implementors of world state store service modules.

Screen.Recording.2025-10-06.at.9.28.46.AM.mov

@DTCurrie DTCurrie self-assigned this Sep 22, 2025
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Sep 22, 2025
@DTCurrie DTCurrie changed the title Add pcd to wss fake with color visualization Add PCD to WorldStateStore service fake with color visualization Sep 22, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Sep 30, 2025
@DTCurrie DTCurrie marked this pull request as draft September 30, 2025 15:47
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Sep 30, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Oct 1, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Oct 6, 2025
GPUBufferAlignment = 256

// MinFPS is the minimum non-zero frame rate
MinFPS = 0
Copy link
Member

Choose a reason for hiding this comment

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

should this be 1 to avoid non-zero altogether?

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking is 0 = pause the animation.

Copy link
Member

Choose a reason for hiding this comment

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

Ah! Maybe just a comment then?

MaxFPS = 144.0

// MaxPointCloudSize is the maximum point cloud size
MaxPointCloudSize = 1000000
Copy link
Member

Choose a reason for hiding this comment

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

Would it be easy to locally bump to something like 5m? would love to use this to test rendering optimizations

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a bad field name, it's more "max point cloud chunk size" for how large of chunks we are willing to send in a single stream event.

Copy link
Member

Choose a reason for hiding this comment

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

Ah! then recommend: MaxPointCloudSizePerChunk?

go func() {
defer fake.activeBackgroundWorkers.Done()
fake.animationLoop()
fake.animate()
Copy link
Member

Choose a reason for hiding this comment

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

light rec: call this step() since this is more in line with a physics world than a renderer

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah these were all just quick names to get the experiment out. I will make another pass on variable/function naming assuming the scope (that I need to write) gets approved.

fpsCheckCounter++
if fpsCheckCounter%100 == 0 {
worldState.mu.RLock()
newFPS := worldState.fps
Copy link
Member

Choose a reason for hiding this comment

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

would also probably call anything FPS related "ticksPerSecond" or "stepsPerSecond" since there's no rendering in this context but that's a bigger lift

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

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants