POV-Ray : Newsgroups : povray.binaries.images : Piles of things (with Bullet Physics Playground) Server Time
11 Oct 2026 06:32:46 EDT (-0400)
  Piles of things (with Bullet Physics Playground) (Message 1 to 44 of 44)  
From: Jaime Vives Piqueres
Subject: Piles of things (with Bullet Physics Playground)
Date: 11 Sep 2012 12:46:39
Message: <504f6aef@news.povray.org>
For the moment, I can only make the physics simulation to work with
boxes, but that's enough for some fun... :)

--
Jaime


Post a reply to this message


Attachments:
Download 'bricks-pile-04.jpg' (281 KB) Download 'pens-physics-08-mix.jpg' (216 KB) Download 'tablones-03.jpg' (334 KB)

Preview of image 'bricks-pile-04.jpg'
bricks-pile-04.jpg

Preview of image 'pens-physics-08-mix.jpg'
pens-physics-08-mix.jpg

Preview of image 'tablones-03.jpg'
tablones-03.jpg


 

From: MichaelJF
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 11 Sep 2012 13:55:01
Message: <web.504f7a8e2fe15fc5d80ed6860@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> For the moment, I can only make the physics simulation to work with
> boxes, but that's enough for some fun... :)
>
> --
> Jaime

Indeed!
Michael


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 12 Sep 2012 02:49:11
Message: <50503067$1@news.povray.org>
You truly are a master of realism... except for the wood beams ;-) that 
is looking weird in cross section (but who minds?).

Thomas


Post a reply to this message

From: nemesis
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 12 Sep 2012 09:15:01
Message: <web.50508a222fe15fc5ebb90cbd0@news.povray.org>
such sweet wood


Post a reply to this message

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 12 Sep 2012 14:40:01
Message: <web.5050d5f22fe15fc5cf6bcf5f0@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> For the moment, I can only make the physics simulation to work with
> boxes, but that's enough for some fun... :)
>

Great work as always, Jaime. Those colored pencils look wonderful, but the
scene's missing a sketch somewhere :) The bricks have some nice details as well.

Thanks to you, I decided to try something I've had in mind for a while, but
never got around to until yesterday: using Blender to solve the physics, and
POV-Ray to render the objects. I won't go into the details yet (the process is a
bit convoluted), but for now it's enough to say that any object can be used; it
just takes importing or building a new one in POV. The intermediate .obj file is
fairly small (just four vertices for each object), and preserves per-axis
scaling in addition to rotation and positional data.

Attached is a test using cones of various sizes dropped into a bowl. I'll bring
out the doughnuts later.

Sam


Post a reply to this message


Attachments:
Download 'cones-in-bowl.jpg' (103 KB)

Preview of image 'cones-in-bowl.jpg'
cones-in-bowl.jpg


 

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 12 Sep 2012 15:15:01
Message: <web.5050de0b2fe15fc5510f5afc0@news.povray.org>
A box of doughnuts made from the finest torus cake, blob glazing and CSG
sprinkles. The colors are probably off, since I wasn't picking from a photo or
anything, and the glazing coverage is a tad spotty in places, but hey, it's just
a test :)

The current limitation of using this setup is that only one type of geometry can
be used. A solution might require having separate selection groups and files for
each type of object.

Sam


Post a reply to this message


Attachments:
Download 'box-o'-doughnuts.jpg' (138 KB)

Preview of image 'box-o'-doughnuts.jpg'
box-o'-doughnuts.jpg


 

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 12 Sep 2012 16:15:01
Message: <5050ed45$1@news.povray.org>
On 12/09/12 21:10, Samuel Benge wrote:
> A box of doughnuts made from the finest torus cake, blob glazing and
> CSG sprinkles. The colors are probably off, since I wasn't picking
> from a photo or anything, and the glazing coverage is a tad spotty in
> places, but hey, it's just a test :)
>

   Mmmmm... they look absolutely delicious, and the lighting is beautiful
as usual. Oh, and the placement job looks good: I'm sure the method is
convoluted enough for your standards... ;)

--
Jaime


Post a reply to this message

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 12 Sep 2012 17:15:01
Message: <web.5050fa202fe15fc5865621b80@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> I'm sure the method is convoluted enough for your standards... ;)
>

Hehe, yeah. You know, it never starts out that way, yet before I know it the
number of steps needed to do one thing have skyrocketed, and I'm burned out on
the project that I had begun in the first place. I should just start releasing
the programs and POV script I make along the way, since the images I render from
them are usually unpostworthy ;)

Sam


Post a reply to this message

From: Paolo Gibellini
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 13 Sep 2012 04:32:31
Message: <50519a1f$1@news.povray.org>
>Samuel Benge  on date 12/09/2012 21.10 wrote:
> A box of doughnuts made from the finest torus cake, blob glazing and CSG
> sprinkles. The colors are probably off, since I wasn't picking from a photo or
> anything, and the glazing coverage is a tad spotty in places, but hey, it's just
> a test :)
>
> The current limitation of using this setup is that only one type of geometry can
> be used. A solution might require having separate selection groups and files for
> each type of object.
>
> Sam
>
Yum yum...
Paolo


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 13 Sep 2012 05:52:51
Message: <5051acf3$1@news.povray.org>
On 12/09/12 08:49, Thomas de Groot wrote:
> You truly are a master of realism... except for the wood beams ;-)
> that is looking weird in cross section (but who minds?).

   I'm randomly differencing the same heightfield on each side of the
box, so yes, at the ends it doesn't look right. Now that you mention it,
I could use a more appropriate HF for the ends, with a concentric
circles pattern...

--
Jaime


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 13 Sep 2012 06:13:23
Message: <5051b1c3@news.povray.org>
On 12/09/12 20:35, Samuel Benge wrote:
> Great work as always, Jaime. Those colored pencils look wonderful,
> but the scene's missing a sketch somewhere :) The bricks have some
> nice details as well.

    Thanks! Yes, I had the more fun moments with the pencils... I did
trace like 30 different arrangements. The pen itself was a 15min job on
Wings3D, but it really came out pretty nice.

> Thanks to you, I decided to try something I've had in mind for a
> while, but never got around to until yesterday: using Blender to
> solve the physics, and POV-Ray to render the objects. I won't go into
> the details yet (the process is a bit convoluted), but for now it's
> enough to say that any object can be used; it just takes importing or
> building a new one in POV. The intermediate .obj file is fairly small
> (just four vertices for each object), and preserves per-axis scaling
> in addition to rotation and positional data.
>

    It would be nice to have a tool specifically made to interface the
Bullet Physics library with POV-Ray, to have a more simpler process
(run the simulation, export and render). Searching for such a program on
the net I found Koppi's Playground, and also this other one which I
could not make to work on my current system (but it looks very
interesting and promising):

    http://www.arishapiro.com/dance/

--
Jaime


Post a reply to this message


Attachments:
Download 'pens-physics-11.jpg' (177 KB)

Preview of image 'pens-physics-11.jpg'
pens-physics-11.jpg


 

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 13 Sep 2012 14:50:00
Message: <web.505229e02fe15fc5fd5daddd0@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> On 12/09/12 20:35, Samuel Benge wrote:
> > Thanks to you, I decided to try something I've had in mind for a
> > while, but never got around to until yesterday: using Blender to
> > solve the physics, and POV-Ray to render the objects. I won't go into
> > the details yet (the process is a bit convoluted), but for now it's
> > enough to say that any object can be used; it just takes importing or
> > building a new one in POV. The intermediate .obj file is fairly small
> > (just four vertices for each object), and preserves per-axis scaling
> > in addition to rotation and positional data.
> >
>
>     It would be nice to have a tool specifically made to interface the
> Bullet Physics library with POV-Ray, to have a more simpler process
> (run the simulation, export and render).

Yeah, it would be nice. My method isn't too horrible:

Blender:
-> prepare the physics simulation
-> run the "game" using the Bullet physics solver, saving its results to the IPO
-> copy the transformations of all rigid body objects (.py script)
-> paste the transformations to four-point mesh objects (.py script)
-> export all four-point meshes to a single .obj file

System:
-> run Obj2POVA.exe* with command line options (only a single step when using a
..bat file)

POV-Ray
-> run the scene file

The worst part of the process is battling with Blender. When you duplicate
objects and try to transform them after things have been saved to the IPO,
subsequent transformations will revert to past configurations, which means that
any changes made to the objects' orientations is all for nothing. You can delete
all IPO data, and it still happens. To avoid this, all rigid body actors must be
deleted and reduplicated if previously saved to the IPO, otherwise links to old
data must be cleared individually for every_single_object. After I learned what
was (unnecessarily) happening, things started going a lot more smoothly. Current
Blender versions might not have this problem.

> Searching for such a program on the net I found Koppi's Playground

Would I really need to build Koppi's Playground myself? Seems like a lot of work
to go though. Tangling with Blender is looking more and more like an easier way
to go when I consider trying to download and install the tool chain necessary to
get KBPP up and running %(

Nice updated pencils scene, BTW. Those "no_image" erasers are a kick :) Are you
using geometries other than boxes now? It would appear that the erasers' rounded
edges are behaving as such, although some pencils seem to be balancing on their
edges, so I'm not sure.

Sam

*Obj2PovA.exe is a program I put together using kixor's objLoader library:
http://www.kixor.net/dev/objloader/ It is used for converting .obj data to POV
arrays. I plan to release a version of it soon, since having mesh data readily
available as arrays is useful for so many things. For example, two-point
polygons can be read and converted, thus allowing POV-Ray to render hair created
in Blender.


Post a reply to this message

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 13 Sep 2012 17:05:02
Message: <web.505249fa2fe15fc5f7aa22b40@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> For the moment, I can only make the physics simulation to work with
> boxes, but that's enough for some fun... :)
>
> --
> Jaime

Nice!

Okay, here is Gille Tran's shopping cart filled to overflowing with primitives
via a custom program I wrote using the Bullet library. Still pondering easier
integration with POV-Ray...

Cheers,
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'rwm_shoppingcart1.jpg' (1050 KB)

Preview of image 'rwm_shoppingcart1.jpg'
rwm_shoppingcart1.jpg


 

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 13 Sep 2012 19:20:01
Message: <web.50526a0b2fe15fc5f7aa22b40@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
>     It would be nice to have a tool specifically made to interface the
> Bullet Physics library with POV-Ray, to have a more simpler process
> (run the simulation, export and render)...
> --
> Jaime

I have been thinking about (and working on) this quite a lot lately :)

fyi, I noticed some mirroring of the "no_image" text on some erasers (literally
mirrored text) that may need to be fixed...

:)
------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 14 Sep 2012 02:42:55
Message: <5052d1ef$1@news.povray.org>
On 13/09/12 20:45, Samuel Benge wrote:
>> Searching for such a program on the net I found Koppi's Playground
>
> Would I really need to build Koppi's Playground myself? Seems like a
> lot of work to go though. Tangling with Blender is looking more and
> more like an easier way to go when I consider trying to download and
> install the tool chain necessary to get KBPP up and running %(

   No, you are already doing more complex things than Koppi's playground
allows... so it' would not be of much use for you. At this moment,
Koppi's playground is very limited.

> Nice updated pencils scene, BTW. Those "no_image" erasers are a kick
> :) Are you using geometries other than boxes now? It would appear
> that the erasers' rounded edges are behaving as such, although some
> pencils seem to be balancing on their edges, so I'm not sure.

   No, just boxes... even for the pencils (that's why you see them
floating a little bit at some places), as cylinders were behaving a
bit erratically instead resting on the floor. The rounded erasers look
right just because I tried the simulation several times until I found a
result without obvious flaws.

--
Jaime


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 14 Sep 2012 02:49:29
Message: <5052d379$1@news.povray.org>
On 14/09/12 01:19, Robert McGregor wrote:
> Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
>> It would be nice to have a tool specifically made to interface the
>> Bullet Physics library with POV-Ray, to have a more simpler
>> process (run the simulation, export and render)...
>
> I have been thinking about (and working on) this quite a lot lately
> :)

   I've plenty of ideas for the interface, if you really are going to
start such a tool...

> fyi, I noticed some mirroring of the "no_image" text on some erasers
> (literally mirrored text) that may need to be fixed...

   Yeah... I was lazy enough to just use planar mapping without realizing
it would give and inverted image at the other side: time for some
uv_mapping.

--
Jaime


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 14 Sep 2012 02:53:04
Message: <5052d450$1@news.povray.org>
On 13/09/12 23:02, Robert McGregor wrote:
> Okay, here is Gille Tran's shopping cart filled to overflowing with primitives
> via a custom program I wrote using the Bullet library. Still pondering easier
> integration with POV-Ray...

   Just... :O


--
Jaime


Post a reply to this message

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 14 Sep 2012 16:35:00
Message: <web.505393b62fe15fc56454fc670@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> Okay, here is Gille Tran's shopping cart filled to overflowing with primitives
> via a custom program I wrote using the Bullet library. Still pondering easier
> integration with POV-Ray...
>

Well that's excessively cool, Robert. Congrats!

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?

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.

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? :)

Sam


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 15 Sep 2012 03:39:23
Message: <505430ab$1@news.povray.org>
On 14-9-2012 22:29, Samuel Benge wrote:

> Well that's excessively cool, Robert. Congrats!

I join that!

Jaime, Sam, Robert, you are presenting very interesting work here.

>
> [...]
>
> 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.

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.

Thomas


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 15 Sep 2012 03:47:29
Message: <50543291$1@news.povray.org>
On 14/09/12 22:29, Samuel Benge wrote:
> 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.

   I find this problem too when using Koppi's Playground, specially
cylinders are unusable as they start to roll as if they were spheres,
instead of resting on the floor. With boxes, when they are long and
thing, I also have stability problems: there is always some that will
start shaking, sometimes spreading the problem to near boxes. Seems the
bullet physics simulation is more suited for animations of the
simulation, rather than for stills of the simulation result...

--
Jaime


Post a reply to this message

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

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 17 Sep 2012 10:15:01
Message: <web.505730552fe15fc586ff1d480@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
>  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.

It looks like the collision shapes just aren't corresponding to the actual
geometry closely enough. Is a hull or mesh collision shape available in Poser
Physics?
-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 17 Sep 2012 13:30:01
Message: <web.50575d592fe15fc5a48fdb00@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> Somehow I remain with objects not touching each other and
> floating in space within a bowl (See image; Poser render).

Nuts! Is there any sort of padding setting for colliding objects? I mean, do the
objects try to keep a distance from other objects to avoid errors?

Another thing that occurs to me (although I haven't used Poser since around
1999) is that you are using displacement maps for your objects. Perhaps Poser is
using the /unmodified/ meshes for collisions, not the modified versions. That
would cause some spacing issues for sure.

> The objects fall very rapidly into position and then remain
> thus for the rest of the animation, even after about a thousand frames.

I'm guessing the objects are "sleeping" too soon after settling. Is there a "no
sleeping" or similar option you can disable?

Sam


Post a reply to this message

From: Samuel Benge
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 17 Sep 2012 14:00:01
Message: <web.5057642f2fe15fc5a48fdb00@news.povray.org>
"Robert McGregor" <rob### [at] mcgregorfineartcom> wrote:
> "Samuel Benge" <stb### [at] hotmailcom> wrote:
> > 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?

Forty, though it looks like fewer because I jittered the camera's position at
each frame for antialiasing/focal blur. All frames together finished rendering
in about 4 minutes 45 seconds using three 2.4GHz cores, which isn't too bad at
all. Radiosity and area_light settings were low, everything got a scaled-down
bumps normal, and no AA was used.

On a related subject, I noticed that POV-Ray's actual focal blur uses the same
set of samples for each frame. I'm guessing this is due to the Halton sequence
used, but is very annoying when trying to have very low focal blur settings with
the intention of averaging frames together. If each frame used a different
sample set, you could get away with a blur_samples value of 1, which as far as I
can tell, adds nothing to the render time. It would be nice to have the option
of using random focal blur samples for each frame :)

Sam


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 18 Sep 2012 03:20:02
Message: <505820a2@news.povray.org>
To Robert:
I think that is the case indeed. Poser Physics uses Ball, Box, and 
Capsule (a cylinder with rounded ends), and Ragdoll as collision 
objects. While I couple each mesh to one of the collision objects, it 
seems that the mesh has to be exactly conform, so no initial transform 
to it should be done, or that is what I guess presently.

To Sam:
No, there is no padding setting.
My meshes are /pure/ meshes; however see my answer to Robert.
There is no sleeping option available.

I want to do the same with only collision objects and see what happens 
but I believe that there is a serious constrain on Poser Physics... :-(

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 18 Sep 2012 04:23:44
Message: <50582f90@news.povray.org>
On 18-9-2012 9:19, Thomas de Groot wrote:
>
> I want to do the same with only collision objects and see what happens
> but I believe that there is a serious constrain on Poser Physics... :-(
>

It seems to be as I thought. Simulating with only collision objects 
works well. This means that mesh objects need to be as close in shape to 
the collision objects as possible.

Thomas


Post a reply to this message


Attachments:
Download 'poserphysicstest_02.png' (178 KB)

Preview of image 'poserphysicstest_02.png'
poserphysicstest_02.png


 

From: Robert McGregor
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 18 Sep 2012 08:00:01
Message: <web.505862222fe15fc5f7aa22b40@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> It seems to be as I thought. Simulating with only collision objects
> works well. This means that mesh objects need to be as close in shape to
> the collision objects as possible.

Maybe you could use combined collision shapes like Sam did with the nails? After
seeing that little trick I dug into Bullet a bit more and found how to do it
directly. While I was poking around I also found that the ragdoll is really just
a simple collection of capsules and joint constraints:

class RagDoll
{
   enum
   {
      BODYPART_PELVIS = 0,
      BODYPART_SPINE,
      BODYPART_HEAD,

      BODYPART_LEFT_UPPER_LEG,
      BODYPART_LEFT_LOWER_LEG,

      BODYPART_RIGHT_UPPER_LEG,
      BODYPART_RIGHT_LOWER_LEG,

      BODYPART_LEFT_UPPER_ARM,
      BODYPART_LEFT_LOWER_ARM,

      BODYPART_RIGHT_UPPER_ARM,
      BODYPART_RIGHT_LOWER_ARM,

      BODYPART_COUNT
   };

   enum
   {
      JOINT_PELVIS_SPINE = 0,
      JOINT_SPINE_HEAD,

      JOINT_LEFT_HIP,
      JOINT_LEFT_KNEE,

      JOINT_RIGHT_HIP,
      JOINT_RIGHT_KNEE,

      JOINT_LEFT_SHOULDER,
      JOINT_LEFT_ELBOW,

      JOINT_RIGHT_SHOULDER,
      JOINT_RIGHT_ELBOW,

      JOINT_COUNT
   };

   ...
   ...

   m_shapes[BODYPART_PELVIS] = new btCapsuleShape(
      btScalar(0.15), btScalar(0.20));
   m_shapes[BODYPART_SPINE] = new btCapsuleShape(
      btScalar(0.15), btScalar(0.28));
   m_shapes[BODYPART_HEAD] = new btCapsuleShape(
      btScalar(0.10), btScalar(0.05));
   m_shapes[BODYPART_LEFT_UPPER_LEG] = new btCapsuleShape(
      btScalar(0.07), btScalar(0.45));
   m_shapes[BODYPART_LEFT_LOWER_LEG] = new btCapsuleShape(
      btScalar(0.05), btScalar(0.37));
   m_shapes[BODYPART_RIGHT_UPPER_LEG] = new btCapsuleShape(
      btScalar(0.07), btScalar(0.45));
   m_shapes[BODYPART_RIGHT_LOWER_LEG] = new btCapsuleShape(
      btScalar(0.05), btScalar(0.37));
   m_shapes[BODYPART_LEFT_UPPER_ARM] = new btCapsuleShape(
      btScalar(0.05), btScalar(0.33));
   m_shapes[BODYPART_LEFT_LOWER_ARM] = new btCapsuleShape(
      btScalar(0.04), btScalar(0.25));
   m_shapes[BODYPART_RIGHT_UPPER_ARM] = new btCapsuleShape(
      btScalar(0.05), btScalar(0.33));
   m_shapes[BODYPART_RIGHT_LOWER_ARM] = new btCapsuleShape(
      btScalar(0.04), btScalar(0.25));

   ...
   ...
}

Another thought, maybe try making the collision shapes smaller for the floating
meshes?

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


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 18 Sep 2012 10:38:21
Message: <5058875d$1@news.povray.org>
On 18-9-2012 13:59, Robert McGregor wrote:
> Maybe you could use combined collision shapes like Sam did with the nails? After
> seeing that little trick I dug into Bullet a bit more and found how to do it
> directly. While I was poking around I also found that the ragdoll is really just
> a simple collection of capsules and joint constraints:
>
> Another thought, maybe try making the collision shapes smaller for the floating
> meshes?
>

The problem is that in Poser Physics you have no control on these. You 
can set one of the pre-defined collision objects to (e.g.) a mesh, but 
you have no control over those collision objects. This seems to be a 
serious limitation on the Poser Physics plugin for Poser.

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 18 Sep 2012 15:30:05
Message: <5058cbbd$1@news.povray.org>
On 18/09/2012 8:19 AM, Thomas de Groot wrote:
> I want to do the same with only collision objects and see what happens
> but I believe that there is a serious constrain on Poser Physics... :-(

Too true. I believe that it is unsupported now.

-- 
Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 19 Sep 2012 02:44:42
Message: <505969da@news.povray.org>
On 18-9-2012 21:30, Stephen wrote:
> On 18/09/2012 8:19 AM, Thomas de Groot wrote:
>> I want to do the same with only collision objects and see what happens
>> but I believe that there is a serious constrain on Poser Physics... :-(
>
> Too true. I believe that it is unsupported now.
>

However, there is a Poser Physics 2012, for Poser Pro 2012.

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 19 Sep 2012 14:21:59
Message: <505a0d47@news.povray.org>
On 19/09/2012 7:44 AM, Thomas de Groot wrote:
> On 18-9-2012 21:30, Stephen wrote:
>> On 18/09/2012 8:19 AM, Thomas de Groot wrote:
>>> I want to do the same with only collision objects and see what happens
>>> but I believe that there is a serious constrain on Poser Physics... :-(
>>
>> Too true. I believe that it is unsupported now.
>>
>
> However, there is a Poser Physics 2012, for Poser Pro 2012.
>
I don't think it is worth upgrading from Pro 2010 just for that, do you.

I do intend to get to grips with the latest version of Blender though.

Sometime


-- 
Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 20 Sep 2012 03:51:56
Message: <505acb1c$1@news.povray.org>
On 19-9-2012 20:21, Stephen wrote:
>> However, there is a Poser Physics 2012, for Poser Pro 2012.
>>
> I don't think it is worth upgrading from Pro 2010 just for that, do you.

No, I don't think so. I shall upgrade to Poser Pro one day however.

>
> I do intend to get to grips with the latest version of Blender though.

Me too...

>
> Sometime

slowly... ;-)

Thomas


Post a reply to this message

From: Stephen
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 20 Sep 2012 11:20:01
Message: <web.505b33322fe15fc5f2eb76540@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 19-9-2012 20:21, Stephen wrote:
> >> However, there is a Poser Physics 2012, for Poser Pro 2012.
> >>
> > I don't think it is worth upgrading from Pro 2010 just for that, do you.
>
> No, I don't think so. I shall upgrade to Poser Pro one day however.
>

I find that Poser Pro is much faster than Poser 8 (I think that it is 8 I have).
It is faster to load and close and the cloth room simulations are faster too.

> >
> > I do intend to get to grips with the latest version of Blender though.
>
> Me too...
>
> >
> > Sometime
>
> slowly... ;-)
>

I have a project that I would like to start in Blender as well. A 1908 MB
Rennwagen but I don’t have the time.
So I might try a still life to try and improve my textures.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 21 Sep 2012 03:20:03
Message: <505c1523$1@news.povray.org>
On 20-9-2012 17:16, Stephen wrote:
> I find that Poser Pro is much faster than Poser 8 (I think that it is 8 I have).
> It is faster to load and close and the cloth room simulations are faster too.

Yes, it takes advantage of multiple cores, doesn't it? As soon as there 
is an interesting offer to upgrade I shall probably make the move.

> I have a project that I would like to start in Blender as well. A 1908 MB
> Rennwagen but I don’t have the time.
> So I might try a still life to try and improve my textures.

Textures are fun to work on. I learned a lot when I used Moray on a 
daily basis. And there are all those macros provided by friendly povers.

Thomas


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Piles of things (with Bullet Physics Playground)
Date: 27 Sep 2012 17:35:22
Message: <5064c69a$1@news.povray.org>
On 16/09/12 21:21, Samuel Benge wrote:
> It makes for some fantastic explosions, though ;)

   Thanks for the idea! I used it to do some primitive fireworks, adding
random vertical velocities too:

   http://www.youtube.com/watch?v=t0ys3EBgROs

--
Jaime


Post a reply to this message

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