Dark Bit Factory & Gravity
PROGRAMMING => General coding questions => Topic started by: Raizor on November 12, 2011
-
I've been reading up on ray marching with a view to trying to put something together. I think I've got my head around how ray marching works for rendering volumes and creating objects using distance functions but I'm confused about how one would go about using ray matching for a complex mesh (loaded from a 3ds object or whatever). Is such a thing possible? I'm starting to think it's not, or at least not possible easily. Any pointers would be wonderful.
Thanks,
Raizor
-
Us YUP guys have a system of getting an SDF texture from a mesh just based on polygon distances to texel centers and doing some play for the sign. It's quite easy to march through but is much better to use for effects such as AO or SSS, since it's often relatively low-quality compared to the polygon data to reduce memory consumption.
Animated meshes present their own set of problems, too...
-
Us YUP guys have a system of getting an SDF texture from a mesh just based on polygon distances to texel centers and doing some play for the sign. It's quite easy to march through but is much better to use for effects such as AO or SSS, since it's often relatively low-quality compared to the polygon data to reduce memory consumption.
Animated meshes present their own set of problems, too...
Thanks Ferris. SDF sounds like something to look into in the future then. I'll start with the simpler stuff to begin with. I found this (http://www.cs.tau.ac.il/~liors/research/projects/sdf), but you're probably already aware of it (or don't need it, by the sound if it).
K++
-
Actually, by SDF, I meant signed distance field :) Cool link, though!!
-
Heh, damn acronyms! Thanks Ferris. I didn't actually read through that page, but it looked relevant so I bookmarked it for later. Found some stuff on signed distance fields, so all good :)