POV-Ray : Newsgroups : povray.binaries.images : Piles of things (with Bullet Physics Playground) : Re: Piles of things (with Bullet Physics Playground) Server Time
30 Jul 2024 12:27:21 EDT (-0400)
  Re: Piles of things (with Bullet Physics Playground)  
From: Samuel Benge
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

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