这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@teodosin
Copy link
Collaborator

@teodosin teodosin commented Aug 6, 2025

This is a proof of concept and RFC for a new example which converts a mesh into a gaussian cloud based on its points, edges, or triangles, on the CPU.

The motivation for this was strictly aesthetic. I thought it would be an interesting art style to have low- or medium-poly 3D assets converted to gaussian clouds in order to look more painterly and dreamlike.

Maybe this could also be an interesting way to debug and help enhance the rendering pipeline. I think I already see some popping and rendering artefacts from looking around the converted model. Might also be due to my flawed understanding of the library or bevy meshes in general, maybe I flipped some axis by accident or something. I had very little experience manipulating meshes so I had to rely on AI to help, which I hope doesn't diminish the value of this example, at least as a starting point for discussion.

The mesh in this example is Blender's Suzanne monkey model, which from my searches doesn't seem to have license restrictions. I also haven't yet removed the basic cube which I used for debugging the splat orientations.

Please share your thoughts when you can spare the time. Personally this would be my ideal art style for a game right now, so I would like to understand its limitations. With that in mind, my questions are:

  • Is this a feasible use case for gaussians in general? Are there limitations I'm not thinking of?
  • Do you think this conversion would be possible to do in real time with compute shaders? To support skinned meshes and animations and so forth. I have no expertise with shaders but would be willing to learn and attempt such an example if detailed guidance is possible.
  • Would it be desirable to decouple the coloring from spherical harmonics? This use case would benefit from a single splat color which could also reference the shaded color of a mesh for real time lighting.
  • Can the gaussian distribution be adjusted to adjust the length of the falloff?
  • What does "bevy 3D camera to gaussian cloud pipeline" mean in the todo list in the readme? Does it have any relation to something like this?
image

@mosure
Copy link
Owner

mosure commented Aug 6, 2025

thanks for sharing, aesthetic work like this is interesting!

the popping is caused by gaussian sort updates and mesh clipping. sort update popping will be resolved in the future (waiting on the wgpu radix sort /w subgroup support)

questions:

  • this is generally feasible, though additional features would improve quality. balancing gaussian count/scale and performance would be required. multiple gaussian objects are currently not merged/globally sorted (planned feature), object occlusion/intersections will have popping.

  • compute shaders driving the gaussian properties are possible. here is an example of compute node driven gaussian positions:

    position_visibility[point_index] = new_position;

a related project (a very useful reference for geometry -> gaussian compute shaders):
https://github.com/runevision/Dither3D

ideally, mesh skinning can be left native, where the compute shader is converting surfaces -> gaussians post-morph.

  • by setting sh0 feature, sh is a single vec3, rgb -> sh can be done like sh = (rgb - 0.5) / 0.2821 (rgb can be derived from pbr render passes). making this more runtime configurable would be nice, maybe a configuration can support RGB more directly.

  • the gaussian cutoff isn't a uniform/setting but it could be. it is found here:

the current configuration does clip edges of gaussians with full opacity.

  • bevy 3D camera to gaussian cloud pipeline idea was initially creating multi-view bevy renders of a scene as test data for gaussian optimization pipeline testing. the final gaussian artifacts would be very similar to what you are describing, however, it'd be minimizing reconstruction loss instead of creating an aesthetically different scene.

I appreciate the example! I'll add a few suggestions. generally, I think work like this can definitely help iron out some of the wrinkles in the gaussian render pipeline and align the project towards game workflows

faces: Vec<Gaussian3d>,
) {
// Vertices cloud - visible by default
if !vertices.is_empty() {
Copy link
Owner

Choose a reason for hiding this comment

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

multiple gaussian clouds occupying similar space will cause popping due to object-level centroid sorting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Could you clarify if you're suggesting a change here? I don't think I understand.

@teodosin
Copy link
Collaborator Author

teodosin commented Aug 7, 2025

Thanks for the comments :) I applied the changes, asked for clarification on one.

Is that wgpu feature planned or on the way? If it’s only a rendering artefact then other experiments can probably proceed while waiting for it. Do you have a timeline for the global sorting?

I would presume that the memory for the gaussians for the real-time conversion would still have to get allocated on the rust side? Or is it possible to instance the gaussians for the meshes in the shader directly?

If you accept this example PR, next I could make the cutoff a uniform as a small warmup for the compute shader conversion example. I’ll do my best to do that one independently, but I would open a draft PR if I get stuck. Hope that’s not a bother :)

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.

2 participants