yt-project / yt_idv

Interactive volume rendering for yt
Other
8 stars 6 forks source link

[WIP] spherical volume rendering experiment (do not merge) #84

Open chrishavlin opened 1 year ago

chrishavlin commented 1 year ago

This is based off of #64

It attempts to actually use the ray-voxel intersections now calculated in #64 in evaluating the textures rather than evaluating the textures at the vertex points. The configuration that I've pushed here evaluates a single point at the midpoint between the two intersections, though it contains some code for full ray tracing.

Currently working on:

Issue 1: voxels with phi values at y<0 are discarded as having no intersections. This isn't right. I think I ruled out the coordinate transformations within the shader as the source of the problem.

Issue 2: when actually attempting to step along between the intersection points, rendering can start to lag and occasionally crash. This could simply be that the shader is too complex (there's still too many nested if statements, though it is slightly better than in #64) and I'm hitting a memory wall. But until I fix Issue 1 it's a little hard to optimize the shader.

Note: after I work out the kinks here, I'll continue development in #64.

chrishavlin commented 6 months ago

note to self: use the offscreen rendering for debugging. much easier to isolate issues. e.g., the actual ray tracing attempt in this PR returns a blank image....