pouët.net

Go to bottom

Implicit function to distance function

category: general [glöplog]
Iq: I'm not exactly sure what to look for (never really used depends.exe before)... It does mention that DWMAPI.DLL is missing, though.
added on the 2008-09-09 18:47:18 by kusma kusma
Oh, right. This is Vista only, right? (http://www.processlibrary.com/directory/files/dwmapi/229471 seems to think so at least)
added on the 2008-09-09 18:48:12 by kusma kusma
- doesn't work under vista either. nv8600GT, nv175.19 drivers.
added on the 2008-09-09 20:48:14 by hornet hornet
- excellent presentation though! Thanks :)
added on the 2008-09-09 20:48:33 by hornet hornet
and if the vc++ 2008 runtime dll's don't help, install all .net frameworks up to 3.5 (hi mnemonix :)
added on the 2008-09-09 21:15:23 by Gargaj Gargaj
i would like to point out again how the whole dll situation with the side-by-side assemblies is completely out of control.
added on the 2008-09-09 22:31:42 by ryg ryg
oki doki, good point! I'm gonna statically link the CRT crap (otherwise Im using XP and vista, ati and nvidia, sahder 3 and shader 4 everyday so...)
added on the 2008-09-09 22:39:02 by iq iq
okey, done. It should now work everywhere. Can anybody test again? Thx!
added on the 2008-09-09 23:25:31 by iq iq
works just fine now, thanks.
added on the 2008-09-09 23:42:36 by ryg ryg
I got some stuff going with just ray-marching and bisection so it looks like I'll finish something after all! Thanks m8s.
Quote:

i would like to point out again how the whole dll situation with the side-by-side assemblies is completely out of control.

oh yes... ran into a fine bunch of problems with this already...
added on the 2008-09-10 00:49:44 by raer raer
me too. That's why I never use "Multithreaded DLL" anymore, but just "Multithreaded".

By thw way, on the presentation you can press some keyds ( "q", "a", "s", "d", "f" for the effects)
added on the 2008-09-10 00:55:13 by iq iq
iq: If you have the power to decide that and space/bandwith to distribute those big(ger) files... well...
added on the 2008-09-10 00:58:04 by raer raer
you mean that it's too big for download? Comment you everyday download ten times that size just watching youtube... Size is not a problem anymore. ALthough you are making intros...
added on the 2008-09-10 01:22:42 by iq iq
iq: about your article - any ninja-tricks to fix artifacts when doing domain distortion? If I understand this correctly, the procedural distance can (and will) be pretty non-robust for big distortions...
added on the 2008-09-10 01:23:52 by kusma kusma
iq: very specific/strange requirements @ work, else I wouldn't care much too...
added on the 2008-09-10 01:27:42 by raer raer
kusma . i'm not good at maths, but if d(x) is the distance and f(x) de deformation, then d(f(x)) will still give the correct result if f(x) is has a no "domain compression or dilatation".

My intuition tells me this domain compression has something to do with the determinant of the Jacobian of f(x), |J(f(x))| (>1 means expansion, <1 contraction). Im now guessing, but if the determinant is constant, then the method works just fine. For example, affine transformations (scale, rotations, translations) are ok. Even the twist deromation has constant determinant for the Jacobian (proportional to the twist factor). If the |J f(x) | is not constant then we have problems.

Now, for other crazy deformations like noise drivens ones you are right, it introduces errors on the computation. I guess one could correct that by taking the Jacobian into account (or more derivatives). I guess the thing being like y = d(f(x)) , the chain rule should by applied.

Ryg can perhapse go into math details, or I can try tomorrow to write some eqs in paper and see what's the matter.

For the momment, the ninja-trick is probably: as the distance gets smaller (you approach the object), be more carefull on your steps (ie, multiply the computed distance with a distance-dependant-constant). When I'm very close to objects I step in 0.25 times the estimated distance. When I'm far, I just use the estimated disntace cause is similar enough to reality. ... Dissapointed? :)
added on the 2008-09-10 03:38:30 by iq iq
Now, that sampling problem is easy to solve (at least in brute force), like all sampling problems: sample more (adaptively as I said)

Now, what is worring me a lot more is that many deformations introduce a volume loss or gain. For example, under strong noise deformations, the tentacles of the monster in Slisesix become too thin in some points.

Again just leting intuition fly, this should have something to do with the divergence of the deformation f(x). For affine transforme, again, divergence is zero. For the twisting deformation, the divergence is zero also (there is a nice term cancelation maginc there) (what also makes sense by looking to the field lines of a rotation).

Now, the trick would be to build divergence-free deformation fields. Actually now that I think about it it should not be that difficult :) One can take a random deformation field g(x) and compute it's rotational (f(x) = nabla x g(x) ), that should give a divergence free deformation field and therefor a volume preserving distortion... Hm... Again, those math experts here could confirm this.

added on the 2008-09-10 03:51:45 by iq iq
hmm, let's go through it in turn. for this to work properly, your distance bounds should transform correctly.

affine transformations first: translations are definitely ok. rotations and reflections (orthogonal transforms) too. scaling, depends - uniform scaling probably works, nonuniform scaling most likely won't: your distance bounds correspond to spheres around the current position along the ray. with nonuniform scaling, you distort them into ellipsoids; if your transform expands along the ray direction and contracts along the vector to the closest geometry, your computed step size will be too far (of course, it can also end up too small; that causes a few unnecessary steps but no real harm). via singular value decomposition, you can write any affine transform as A(x)=translate + rotation2*diag(sx,sy,sz)*rotation1*x. (this is not a conventional SVD - i'm constraining the two orthogonal matrices to be rotations but allow negative values in the diagonal matrix; it's more suited to the problem at hand). my guess is that the distance bounds work out whenever |sx|=|sy|=|sz|.

for general (differentiable) transforms, i'd guess that it works out as long as the jacobian for every point has that form, with sx,sy,sz constant everywhere. which boils down to "the rows of the jacobian are pairwise orthogonal and have a constant norm c != 0". again, the pairwise orthogonal is important, otherwise you have shears that can wreak havoc with your distance bounds.

i'm not sure whether this is too pessimistic; but i am pretty confident that any transform that obeys these criteria will work out ok. if your transformation has the |sx|=|sy|=|sz| in one point and is divergence-free, the jacobian should fulfill the requirements everywhere, so that might be the most practical way to check the condition.
added on the 2008-09-10 04:44:01 by ryg ryg
Quote:
...computer algebra packages are really powerful tools, but in my experience they're a total bitch to work with...

yeah that's more-or-less true. the main problem is that humans make lots of assumptions unconsciously which the cas' of course cannot make. in practice, you need really lots of painful experience to really be able to exploit a cas. Also, doom(?) mentioned the Maple api, let me spare you the pain, the Maple api *sucks* balls.

As for the actual problem, i'm way too drunken to understand or even read it, maybe tomorrow. Though, i have been drunken for at least 3 weeks straight...

And, ryg writes totally sensible and meaningful sentences, which is a pleasant surprise :)
added on the 2008-09-10 05:00:34 by blala blala
iq: liked your presentation! always enjoying to read about
your discovered tricks and see how you use them!

(I really want to try some raytracing this semester, seems
like a cool challange)
added on the 2008-09-10 05:43:05 by quisten quisten
where has old putpixel() gone? :-)
added on the 2008-09-10 09:42:24 by Jcl Jcl
iq: Ok, so the voodoo magic is just being a bit more conservative, fair enough. Thanks a lot, the technique is really interresting! :)
added on the 2008-09-10 10:56:24 by kusma kusma
*starts scrambling manically through his math books to understand what the fuck everyone is talking about which is so smart*

login

Go to top