Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: glennmarshall on May 06, 2013, 09:39:14 PM




Title: DE function for 'cloth draping' type deformation ?
Post by: glennmarshall on May 06, 2013, 09:39:14 PM
Hi all
I'm currently getting into Distance fractals / Distance generative art, I've been using this code, built in Processing,
http://www.openprocessing.org/sketch/73427

anyway - I've been going though all the articles by our two luminaries, Syntopia and Inigo, but being such a new area of CGI, there's a limited amount of examples and tutorials.  I've managed to understand repetition, boolean CSG, noise displacement, twisting and blending of objects so far.

One thing I'm trying to achieve is deforming a plane to wrap over an irregular object - say for example I have an sdBox (d1) at the origin, and a plane at 4-p.y , is it possible to deform the plane as if it were draped on top?

Maybe not possible - but any other suggestions for interesting ways of creating 'geometry' or Distance Fields, I'd love to hear about, thanks,
Glenn.




Title: Re: DE function for 'cloth draping' type deformation ?
Post by: Sockratease on May 07, 2013, 12:07:16 AM
Hello and welcome   O0

...One thing I'm trying to achieve is deforming a plane to wrap over an irregular object - say for example I have an sdBox (d1) at the origin, and a plane at 4-p.y , is it possible to deform the plane as if it were draped on top?

Maybe not possible - but any other suggestions for interesting ways of creating 'geometry' or Distance Fields, I'd love to hear about, thanks,
Glenn.

My programming days are long behind me now, unfortunately.  But I do know it's possible!

Many 3D Programs do this already.  You may want to have a look at Blender, as it is free and open source.  Every other program I know of that does draping is closed source and commercial.

Good luck with it!  I'd love to see the results.

See you around the forum.


Title: Re: DE function for 'cloth draping' type deformation ?
Post by: cKleinhuis on May 07, 2013, 12:18:46 AM
as far as i know you wont fight a straight DE function for this, if yes it would be ridiculous, you need to implement a physical simulator for it, many public physic engines support clothes as well, you would need to create a solid object out of your DE object, then put it into the physics solver and with that you would have an object laying on top of yours ... ;)


Title: Re: DE function for 'cloth draping' type deformation ?
Post by: eiffie on May 07, 2013, 05:07:15 PM
Well this is close to ridiculous but I have done deformation (like a spider walking on water) where you simply measure the distance from your plane to the object deforming it - if the distance is negative you push the plane down to meet it. Something like:

float DEDeformedPlane(vec3 p){
  return p.y-max(DEObject(p),0.0);
}

This is only going to "work" with simple signed distance estimates. (and then only an estimate!)
It would work better if you have a seperate distance estimate to the object that only accounts for the distance thru the axis perpendicular to the plane.


Title: Re: DE function for 'cloth draping' type deformation ?
Post by: glennmarshall on May 08, 2013, 06:54:47 PM
Thanks all ! sorry for late reply - I was expecting an email notification of any replies - but didn't have it switched on..

I don't need an accurate cloth simulator - just a basic way of adding the max height of one object to a plane below- eiffie, your formula looks just what i'm looking for - i'll give it a try,

great to have support on these forums - i'll be around a lot - my whole new direction is ray marched, generative art and animation created from code :)


www.butterfly.ie



Title: Re: DE function for 'cloth draping' type deformation ?
Post by: Syntopia on May 08, 2013, 06:59:41 PM
Hi Glenn, and welcome to the forums!

I've been following Glenn's work for some years, and he has made a lot of great stuff:
http://vimeo.com/52690038

Looking forward to see what you can do with distance estimators!
 


Title: Re: DE function for 'cloth draping' type deformation ?
Post by: eiffie on May 08, 2013, 09:33:28 PM
Awesome, I really liked the latte.


Title: Re: DE function for 'cloth draping' type deformation ?
Post by: glennmarshall on May 08, 2013, 11:50:50 PM
thanks!