Voxels / John Lin

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
FirepathAgain
Posts: 30
Joined: March 20th, 2021, 3:01 am

Voxels / John Lin

Post by FirepathAgain » May 21st, 2021, 11:37 pm

Hey everyone

This guy / YouTuber John Lin https://www.youtube.com/watch?v=6Cp9R2J ... LinJohnLin has done some amazing videos on some things I really dig. Voxels and ray-traced audio. I believe the lighting is also ray-traced.

Looking at his stuff I commented on one of his videos that I feel like I know how he's done the voxels, and it is pretty smart. It solves the animation problem with voxels, and I think is probably very efficient.

So from some of the models it seems clear to me he is using normal polygonal geometry (by the Stanford dragon model for one example).

By seeing how the animations work (jumping into the next voxel cell in the worldspace) I believe it works like follows, or at least if not, this would probably be a good way to do it.


Create scene using poly geometry.

"Rasterise" it to the 3D voxel world space / buffer in the same way you would rasterise it to 2D.

Use the pipeline again with these points, that have a colour (the raster buffer) and generate cubes using the appropriate shader (geometry shader?). I don't remember which one, I'm only about halfway through run 2 of 3D stuff from chili, doing 2D stuff atm so not looking at it. I know that something like tessellation isn't done with the tessellation shader basically. It was originally created for that but not really used any more. But I digress.

Now render the new voxel geometry as you would normally just render the polygons. Do lighting on the new voxel geometry, etc.


It's good because it creates a skin of voxels, not a solid block of voxels you won't see. Doing additive / subtractive processes on it required splitting the skin and making more skin BUT you would do that with the original polygonal models, as you normally would with those, and carry on from there, so not a new problem to solve.

Animations work out because you just animate the poly models as normal (basically analog / floating point coordinates) then render that to the discrete digital / int / voxel space.

Also reusing the pipeline two or three times isn't so much of a problem because you can (1) use lower-poly-count models to begin with, and (2) rasterise to fairly coarse buffer / worldspace, so it isn't that intensive. I think also maybe the ray-tracing can be simplified due to the lower-resolution of the world. Less rays as you only need one per block sort of thing, not one per pixel (or less with some sort of averaging / trickery to make it look not noisy).




What do you think?


Also chili, I would love to see you do this. I think I could eventually do this, but yeh... I think you would do this sooo much more easily and quickly, and better. I think you'd love the challenge when you're back in the mood for 3D / games / DirectX.

FirepathAgain
Posts: 30
Joined: March 20th, 2021, 3:01 am

Re: Voxels / John Lin

Post by FirepathAgain » May 21st, 2021, 11:40 pm

Actually the rasterisation to 3D might not be the same as to 2D. Originally my idea was to just rasterise what is visible, like true rasterising, but that was assuming lighting (and thus shadows) was already done. It would be a process of running through all the geometry surfaces and translating them to the coarse-grained 3D world space. Something like that, I haven't thought on it in depth like I was going to implement it.

Post Reply