POV-Ray : Newsgroups : povray.binaries.images : Piles of things (with Bullet Physics Playground) Server Time
30 Jul 2024 12:22:03 EDT (-0400)
  Piles of things (with Bullet Physics Playground) (Message 21 to 30 of 44)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 15 Sep 2012 04:32:33
Message: <50543d21$1@news.povray.org>
On 15-9-2012 9:39, Thomas de Groot wrote:
> I am not far enough with Blender, but I have the same experience using
> Poser Physics. Confined to a container, objects seem indeed to bounce
> around more, even when the bounce parameter is set to zero.

One issue (at least with Poser Physics) is when objects "touch" at the 
start; maybe even when they are "too" close. The result is unpredictable.

As in Poser Physics collision is calculated from box, sphere or capsule, 
all other objects need to have a shape fairly close to one of those to 
get believable results.

Thomas


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 15 Sep 2012 05:56:47
Message: <505450df$1@news.povray.org>
On 15/09/12 10:32, Thomas de Groot wrote:
> One issue (at least with Poser Physics) is when objects "touch" at
> the start; maybe even when they are "too" close. The result is
> unpredictable.
>

   This is happening also to me on Koppi's playground... reading about
the Bullet Physics Library, seems this is on purpose: if the objects are
overlapping, the simulation attaches some initial forces to them so they
move apart (and then they start colliding before you wanted).

--
Jaime


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 15 Sep 2012 10:12:13
Message: <50548cbd$1@news.povray.org>
On 15-9-2012 11:56, Jaime Vives Piqueres wrote:
>
>    This is happening also to me on Koppi's playground... reading about
> the Bullet Physics Library, seems this is on purpose: if the objects are
> overlapping, the simulation attaches some initial forces to them so they
> move apart (and then they start colliding before you wanted).

It is understandable as one does not want to have overlapping objects, 
but the force moving them apart seems too strong to me, and cannot be 
controlled by hand unfortunately.

With random objects, the difficulty is to have them as close in shape as 
possible to the basic collision objects. That puts some constrains upon 
the modelling...

Thomas


Post a reply to this message

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 15 Sep 2012 12:55:01
Message: <web.5054b1c72fe15fc5f7aa22b40@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> Well that's excessively cool, Robert. Congrats!

Thanks Sam :)

> What kind of geometry evaluations did you use for the object collisions? Convex
> meshes, triangle (concave) meshes, primitive mathematical representations? Are
> they colliding with a low-poly mesh representation of the cart?

For the shopping cart I made a simple cart-shaped stand-in box, with the top
removed, that fits inside the actual cart geometry (10 triangles). For the
collisions themselves I used:

[Dynamic objects]
Primitives:
   btBoxShape
   btSphereShape
   btConeShape
   btConvexHullShape

[Kinematic objects]
Cart box: btTriangleMesh
Ground: btStaticPlaneShape

After the sim is stable (objects have stopped moving) the transformation data
for each object (via btTransform::getBasis() for rotation and
btTransform::getOrigin() for translation) is written to a POV-Ray include file
as a set of multidimensional arrays, something like this:

// for each collision object
btCollisionObject* obj = m_dynamicsWorld->getCollisionObjectArray()[i];
btRigidBody* body = btRigidBody::upcast(obj);

btMatrix3x3 rot = body->getWorldTransform().getBasis();
btVector3 trans = body->getWorldTransform().getOrigin();

// write to file...

> More than any of those things, I'd like to know how stable everything was at
> runtime. When working in Blender, solid bodies tend to jump around a lot when
> confined in any space, sometimes never stabilizing. This mainly happens when
> performing mesh-mesh collisions.

Working with Bullet is extremely stable. While a sim is running it's pretty much
real-time, like a video game.

I haven't delved into the soft body capabilities yet (although they are
amazing); I just wanted to get my feet wet with the rigid body stuff first.

> BTW, those front wheels seem off. More often than not you'll see them pointed
> the other way... maybe the force of all those dropped objects pushed the cart
> back? :)

Hmm, I hadn't noticed that, it must've rolled backwards a bit indeed :)
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 16 Sep 2012 15:25:01
Message: <web.505626a32fe15fc5cf8c77720@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> It is understandable as one does not want to have overlapping objects,
> but the force moving them apart seems too strong to me, and cannot be
> controlled by hand unfortunately.
>

It makes for some fantastic explosions, though ;)

> With random objects, the difficulty is to have them as close in shape as
> possible to the basic collision objects. That puts some constrains upon
> the modelling...
>

There are many cases in which mesh/collision-shape inconsistencies aren't too
noticeable, if the objects are grouped together somehow.

For example, the attached is a test using compound collision objects in Blender.
A cylinder (head) and cone (tip) were parented to a cylindrical shaft. Each was
given a collision bounding method to automatically match its respective
geometry.

To makes things easier on myself (and also due to upgrading to the new version)
I wrote an addon for Blender which directly exports transformations of all
selected objects to an .inc file, so it's now possible to go straight from
Blender to POV-Ray. It seems like the simplest way to accomplish things,
especially considering all the nice tools that are available in Blender.

Sam


Post a reply to this message


Attachments:
Download 'nails.jpg' (115 KB)

Preview of image 'nails.jpg'
nails.jpg


 

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 16 Sep 2012 19:35:01
Message: <web.5056615a2fe15fc5f7aa22b40@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> For example, the attached is a test using compound collision objects in Blender.

Wow, very nice! I have almost no experience using Blender.

> I wrote an addon for Blender which directly exports transformations of all
> selected objects to an .inc file, so it's now possible to go straight from
> Blender to POV-Ray. It seems like the simplest way to accomplish things,
> especially considering all the nice tools that are available in Blender.

That's really cool too; I guess it's time to DL the new version myself and check
it out.

As a simple example of going "direct" I grabbed this sim screenshot of the most
basic demo in the Bullet SDK and then appended the resulting POV-Ray image.

-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'bulletbasicdemo.jpg' (381 KB)

Preview of image 'bulletbasicdemo.jpg'
bulletbasicdemo.jpg


 

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 16 Sep 2012 19:40:01
Message: <web.505662842fe15fc5f7aa22b40@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> As a simple example of going "direct" I grabbed this sim screenshot of the most
> basic demo in the Bullet SDK and then appended the resulting POV-Ray image.

Here's a textured version :)
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'bulletbasicdemotextured.jpg' (654 KB)

Preview of image 'bulletbasicdemotextured.jpg'
bulletbasicdemotextured.jpg


 

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 17 Sep 2012 01:10:08
Message: <web.5056b04e2fe15fc56664708b0@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> "Samuel Benge" <stb### [at] hotmailcom> wrote:
> > For example, the attached is a test using compound collision objects in Blender.
>
> Wow, very nice! I have almost no experience using Blender.

Thanks!

It's not the easiest program to use at first. Things are hidden and not very
obvious, but they become clear soon enough.

> > I wrote an addon for Blender which directly exports transformations of all
> > selected objects to an .inc file, so it's now possible to go straight from
> > Blender to POV-Ray. It seems like the simplest way to accomplish things,
> > especially considering all the nice tools that are available in Blender.
>
> That's really cool too; I guess it's time to DL the new version myself and check
> it out.

You really should. This new version is so much better than, say, 2.49.
Everything's so much easier now, and the things it can do... it's an amazing
program, although it does have its quirks :)

If you do DL it, you might try out the exporter addon I just uploaded to
p.b.misc:
http://news.povray.org/povray.binaries.misc/thread/%3Cweb.5056a911b09798c46664708b0%40news.povray.org%3E/

> As a simple example of going "direct" I grabbed this sim screenshot of the most
> basic demo in the Bullet SDK and then appended the resulting POV-Ray image.

Nice. How "direct" are we talking?

Attached is another test, this time showing a ball blasting through a wall of
cubes. For the motion blur effect, I saved two states of the sim at different
time steps and interpolated the transformations in POV over a series of frames.
The images were then averaged together.

Sam


Post a reply to this message


Attachments:
Download 'wall-shot-b.jpg' (88 KB)

Preview of image 'wall-shot-b.jpg'
wall-shot-b.jpg


 

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 17 Sep 2012 03:05:40
Message: <5056cbc4@news.povray.org>
On 16-9-2012 21:21, Samuel Benge wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> It is understandable as one does not want to have overlapping objects,
>> but the force moving them apart seems too strong to me, and cannot be
>> controlled by hand unfortunately.
>>
>
> It makes for some fantastic explosions, though ;)

Absolutely!

> [...]
> To makes things easier on myself (and also due to upgrading to the new version)
> I wrote an addon for Blender which directly exports transformations of all
> selected objects to an .inc file, so it's now possible to go straight from
> Blender to POV-Ray. It seems like the simplest way to accomplish things,
> especially considering all the nice tools that are available in Blender.

One more reason for me to continue learning Blender! I find the program 
much easier now than some versions ago when I just abandoned it.

 From what I see, the end result of the physics animation is much better 
(with objects) than what Poser Physics does (its ragdoll animation is 
good). Somehow I remain with objects not touching each other and 
floating in space within a bowl (See image; Poser render). The objects 
fall very rapidly into position and then remain thus for the rest of the 
animation, even after about a thousand frames.

Thomas


Post a reply to this message


Attachments:
Download 'poserphysicstest.png' (276 KB)

Preview of image 'poserphysicstest.png'
poserphysicstest.png


 

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 17 Sep 2012 07:55:01
Message: <web.50570ec32fe15fc5f7aa22b40@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> "Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> > "Samuel Benge" <stb### [at] hotmailcom> wrote:

> If you do DL it, you might try out the exporter addon I just uploaded to
> p.b.misc:
>
http://news.povray.org/povray.binaries.misc/thread/%3Cweb.5056a911b09798c46664708b0%40news.povray.org%3E/

Thanks Sam, will do!

> > As a simple example of going "direct" I grabbed this sim screenshot of the most
> > basic demo in the Bullet SDK and then appended the resulting POV-Ray image.
>
> Nice. How "direct" are we talking?

Very direct; I just added an export function to the Bullet basic demo app to
write the POV-Ray include file.

> Attached is another test, this time showing a ball blasting through a wall of
> cubes. For the motion blur effect, I saved two states of the sim at different
> time steps and interpolated the transformations in POV over a series of frames.
> The images were then averaged together.

That motion blur effect is outstanding! How many frames did you average to
achieve this shot?

-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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