POV-Ray : Newsgroups : povray.binaries.images : cloth and csg: bounding box test Server Time
18 Nov 2024 18:27:09 EST (-0500)
  cloth and csg: bounding box test (Message 1 to 7 of 7)  
From: Apache
Subject: cloth and csg: bounding box test
Date: 14 Mar 2002 17:16:04
Message: <3c912124@news.povray.org>
My first csg test showing the bounding boxes that I'll use for efficient
cloth-solid collission detection. Only those parts of the cloth that are
inside one of those boxes have a chance of interacting with the (csg) solid
object.
The thing 'understands' the pov objects 'sphere' and 'box' and 'merge,
difference, intersection' and the transformations 'scale', 'rotate', and
'translate'. I you folks think it's a good thing adding some extras like
'shear' is very easy. But at this moment I'm still working on 'torus',
'cone' and 'cylinder'.

Next step is getting the code working that determines the csg's normal
vectors efficiently... :-(

--
Apache
http://geitenkaas.dns2go.com/experiments/
apa### [at] yahoocom


Post a reply to this message


Attachments:
Download 'cloth071csgtest01.jpg' (16 KB)

Preview of image 'cloth071csgtest01.jpg'
cloth071csgtest01.jpg


 

From: Shay
Subject: Re: cloth and csg: bounding box test
Date: 14 Mar 2002 17:27:26
Message: <3c9123ce$1@news.povray.org>
How was this accomplished? Is this faster than a smaller number of larger
boxes?

 -Shay

Apache <apa### [at] yahoocom> wrote in message
news:3c912124@news.povray.org...


Post a reply to this message

From: Apache
Subject: Re: cloth and csg: bounding box test
Date: 14 Mar 2002 17:36:40
Message: <3c9125f8@news.povray.org>
I dunno yet. The more boxes and the smaller the boxes, the less collission
testing needed in some circumstances. Probably this will be a something that
depends on the scene and the speeds of the clothes available.
I used povray only for the rendering of the scene file that's been generated
by the cloth program.

--
Apache
http://geitenkaas.dns2go.com/experiments/
apa### [at] yahoocom


Post a reply to this message

From: Hugo
Subject: Re: cloth and csg: bounding box test
Date: 15 Mar 2002 15:42:49
Message: <3c925cc9$1@news.povray.org>
I'm not sure I understand what you're trying to do, so maybe my idea is not
useful.. But if you're trying to detect collision between your cloth (made
up of vertices) and another Pov object, why do you need all this? Wouldn't
it be possible to use the object pattern instead?

1) Include an "object pattern" in the cloth's texture where the object is
the thing you're testing collision with.

2) Run a test over each vertex to see what status the pattern has taken
(inside / outside).. I think this check can be done with function {}.. or..
I just recall having tested pixel values with function.

Just an idea..

Regards,
Hugo


Post a reply to this message

From: Apache
Subject: Re: cloth and csg: bounding box test
Date: 15 Mar 2002 18:48:04
Message: <3c928834$1@news.povray.org>
I have no idea what you mean with "object pattern". Could explain it
further?

The image that I posted shows the area where cloth-object collission has to
be tested. Outside the area the cloth won't have any interaction with the
object, so testing for collission isn't needed at all. This way using
complex csg objects in the scene is more efficient in comparison to testing
all the cloth atoms every time step.

Oh man.... my I've got some kind of brain disease.... I hope I'm explaining
things a bit more clearly  :-p

--
Apache
http://geitenkaas.dns2go.com/experiments/
apa### [at] yahoocom


Post a reply to this message

From: Christopher James Huff
Subject: Re: cloth and csg: bounding box test
Date: 16 Mar 2002 11:41:19
Message: <chrishuff-D16D12.11411116032002@netplex.aussie.org>
In article <3c928834$1@news.povray.org>,
 "Apache" <apa### [at] yahoocom> wrote:

> I have no idea what you mean with "object pattern". Could explain it
> further?

I think he was talking about using the object pattern in MegaPOV/POV 3.5 
to either generate the boxes or do the testing itself.


> The image that I posted shows the area where cloth-object collission has to
> be tested. Outside the area the cloth won't have any interaction with the
> object, so testing for collission isn't needed at all. This way using
> complex csg objects in the scene is more efficient in comparison to testing
> all the cloth atoms every time step.

Seems like an awful lot of boxes to test against. A heirarchial oct-tree 
arrangement would be a lot more efficient, or even testing directly 
against the object.
Why are you coding for individual objects? It seems like doing things 
the hard way. Is this a patch or external program?

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Hugo
Subject: Re: cloth and csg: bounding box test
Date: 17 Mar 2002 15:27:13
Message: <3c94fc21$1@news.povray.org>
> > I have no idea what you mean with "object pattern". Could explain it
> > further?
>
> I think he was talking about using the object pattern in MegaPOV/POV 3.5
> to either generate the boxes or do the testing itself.

I meant the testing itself.  The "object pattern" takes an object (any kind
of object in Pov) and turns it into a 3d pattern, similar to the patterns
"bumps", "granite" or whatever. The result is you can easily test if a point
in space is inside or outside your original object.. So if you apply this
pattern as the texture of your cloth, you will be able to see - or just
test - when parts of your cloth is inside the object.

The benefit is you don't need specific code for all the primitive shapes and
so on.

Regards,
Hugo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.