 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Josh English <Jos### [at] joshuarenglish com> wrote:
> The only other way I could think to do this
Way back, people were using Koppi's Bullet Physics to drop and place objects.
Presumably there is code one can look at to understand how object collision was
detected, and how objects were placed once finally coming to rest.
I'd probably bet money that Rune also came up with a robust algorithm for things
like this.
- BE
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 21/07/2025 15:57, Bald Eagle wrote:
> Josh English <Jos### [at] joshuarenglish com> wrote:
>
>> The only other way I could think to do this
>
> Way back, people were using Koppi's Bullet Physics to drop and place objects.
> Presumably there is code one can look at to understand how object collision was
> detected, and how objects were placed once finally coming to rest.
>
Deep in my hard drive, in a 2001 archives, I found a Jonathan Rafael
Ghiglia demo that stacks letters.
I'm attaching the archive to this message, in case it's of any use.
--
kurtz le pirate
compagnie de la banquise
Post a reply to this message
Attachments:
Download 'archive.zip' (11 KB)
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
kurtz le pirate <kur### [at] free fr> wrote:
> On 21/07/2025 15:57, Bald Eagle wrote:
> > Josh English <Jos### [at] joshuarenglish com> wrote:
> >> The only other way I could think to do this
> > Way back, people were using Koppi's Bullet Physics to drop and place objects.
> > Presumably there is code one can look at to understand how object collision was
> > detected, and how objects were placed once finally coming to rest.
>
> Deep in my hard drive, in a 2001 archives, I found a Jonathan Rafael
> Ghiglia demo that stacks letters.
> I'm attaching the archive to this message, in case it's of any use.
interesting for sure, thanks. (need to find time to explore beyond the demo)
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Josh English <Jos### [at] joshuarenglish com> wrote:
> On 7/18/2025 7:07 AM, Chris R wrote:
>
> >
> > The code needs a lot more testing before I put documentation and official
> > examples into the GitHub repo with my libraries, but I thought I'd share the
> > idea in case there are comments, (like "someone has already done this...") :-)
> >
> > -- Chris R
>
> I'm kind of reminded of my cloth simulation renders from way way back.
> It used a lot of trace commands and spring functions that could
> determine a bunch of normals, but trace would give that anyway.
>
> The only other way I could think to do this is to sample a bunch of
> projections of the shape onto the surface until I was satisfied with the
> highest point of contact, then find the second highest point of contact
> and adjust the shape's orientation to touch those two points, then find
> the next highest point and orient again.
>
> I look forward to seeing what you've put together.
>
> Josh
I'll be looking at all of the suggestions in this thread as improvements on the
algorithm. What I am doing right now avoids non-stable looking placements when
you have small plateaus in the surface by examining point combinations at the
edge of the object first, rather than finding the 3 highest points. This allows
the algorithm to tilt the object into a valley before making smaller adjustments
using closer point combinations.
BTW: the idea behind this was an aborted attempt at doing cloth simulation that
never worked really well. I should see if I can find your code for doing it.
-- Chris R
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
kurtz le pirate <kur### [at] free fr> wrote:
> On 21/07/2025 15:57, Bald Eagle wrote:
> > Josh English <Jos### [at] joshuarenglish com> wrote:
> >
> >> The only other way I could think to do this
> >
> > Way back, people were using Koppi's Bullet Physics to drop and place objects.
> > Presumably there is code one can look at to understand how object collision was
> > detected, and how objects were placed once finally coming to rest.
> >
>
>
> Deep in my hard drive, in a 2001 archives, I found a Jonathan Rafael
> Ghiglia demo that stacks letters.
>
>
> I'm attaching the archive to this message, in case it's of any use.
>
>
>
>
> --
> kurtz le pirate
> compagnie de la banquise
Thanks for digging this up. I am thinking I will try and implement this method
as an alternative using my own coding style, POV 3.8 features, and fitting into
my library code framework, and then compare the results with the triangle-based
version. It appears there is some interesting code to deal with the problem of
local, small plateaus on the surface object to try out.
-- Chris R
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris R" <car### [at] comcast net> wrote:
> kurtz le pirate <kur### [at] free fr> wrote:
> > On 21/07/2025 15:57, Bald Eagle wrote:
> > > Josh English <Jos### [at] joshuarenglish com> wrote:
> > >
> > >> The only other way I could think to do this
> > >
> > > Way back, people were using Koppi's Bullet Physics to drop and place objects.
> > > Presumably there is code one can look at to understand how object collision was
> > > detected, and how objects were placed once finally coming to rest.
> > >
> >
> >
> > Deep in my hard drive, in a 2001 archives, I found a Jonathan Rafael
> > Ghiglia demo that stacks letters.
> >
> >
> > I'm attaching the archive to this message, in case it's of any use.
> >
> >
> >
> >
> > --
> > kurtz le pirate
> > compagnie de la banquise
>
> Thanks for digging this up. I am thinking I will try and implement this method
> as an alternative using my own coding style, POV 3.8 features, and fitting into
> my library code framework, and then compare the results with the triangle-based
> version. It appears there is some interesting code to deal with the problem of
> local, small plateaus on the surface object to try out.
>
> -- Chris R
I wrote the code based on the letter stacking code in libcollide.inc and
debugged it, and added the grid generation piece to my libmesh.inc library.
Here are the results of repeatedly adding 20 discs to the same uneven surface
using the algorithm. I think it does pretty well and it's actually quick enough
that you could run it during rendering, but I kept the option to write the
transforms to a file so you can pre-create them.
More testing to do...
-- Chris -R
Post a reply to this message
Attachments:
Download 'libcollide_test.png' (149 KB)
Preview of image 'libcollide_test.png'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris R" <car### [at] comcast net> wrote:
> I wrote the code based on the letter stacking code in libcollide.inc and
> debugged it, and added the grid generation piece to my libmesh.inc library.
> Here are the results of repeatedly adding 20 discs to the same uneven surface
> using the algorithm. I think it does pretty well and it's actually quick enough
> that you could run it during rendering, but I kept the option to write the
> transforms to a file so you can pre-create them.
Damn, that is nice.
I'm hoping to see a pile of many more primitives on a much more uneven surface!
Nice work!
- BW
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 31/07/2025 21:44, Chris R wrote:
>>
>> Thanks for digging this up. I am thinking I will try and implement this method
>> as an alternative using my own coding style, POV 3.8 features, and fitting into
>> my library code framework, and then compare the results with the triangle-based
>> version. It appears there is some interesting code to deal with the problem of
>> local, small plateaus on the surface object to try out.
>>
>> -- Chris R
> I wrote the code based on the letter stacking code in libcollide.inc and
> debugged it, and added the grid generation piece to my libmesh.inc library.
> Here are the results of repeatedly adding 20 discs to the same uneven surface
> using the algorithm. I think it does pretty well and it's actually quick enough
> that you could run it during rendering, but I kept the option to write the
> transforms to a file so you can pre-create them.
>
Hope that help a little...
--
kurtz le pirate
compagnie de la banquise
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> "Chris R" <car### [at] comcast net> wrote:
>
> > I wrote the code based on the letter stacking code in libcollide.inc and
> > debugged it, and added the grid generation piece to my libmesh.inc library.
> > Here are the results of repeatedly adding 20 discs to the same uneven surface
> > using the algorithm. I think it does pretty well and it's actually quick enough
> > that you could run it during rendering, but I kept the option to write the
> > transforms to a file so you can pre-create them.
>
> Damn, that is nice.
>
> I'm hoping to see a pile of many more primitives on a much more uneven surface!
>
> Nice work!
>
> - BW
Coming Real Soon Now...
I plan to add documentation to the library code files and create a usable sample
scene using them as an example. In the mean time, I can create a version of
this scene with additional object types and I can pervert the surface as well.
-- Chris R
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris R" <car### [at] comcast net> wrote:
> In the mean time, I can create a version of
> this scene with additional object types and
> I can pervert the surface as well.
This sounds far more exciting than simply perturbing the surface!
Perhaps a saucy image_map?
I can't wait to see what "additional object types" you'll use . . . ;)
Hopefully the sample scene doesn't perturb anyone too much. :D
- BW
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |