|
 |
hi,
"Chris R" <car### [at] comcast net> wrote:
> A scene I have been working on has a number of objects that lie randomly on an
> uneven surface. I created some SDL code, customized to the objects in question
> to place them so that all points of the bottom surface of the object are on or
> above the corresponding points of the surface. After getting the code to work
> fairly well, I went down a rabbit hole and decided to make it generic for all
> objects and surfaces and add the code to my libraries.
> ...
> The result of all of this is a dictionary representation of a transform that I
> have written, along with code for writing it to a file so you can generate all
> of the transforms before you start rendering the scene. Depending on the size
> and complexity of your object and surface, and the level of detail, this can be
> time-consuming, so I ensure I can run it once, generate the transforms, and then
> just include them in the scene for rendering.
>
> 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...") :-)
that does sound very nice and _useful_, I can think of two or three projects in
the past where I'd have liked having "supporting code" for planting (then
"vegetation") or placing objects.
> ... (in the XZ plane only) ...
I posted a usable quad-tree a few years back, fwiw. no ref but will "dig it up"
if thought useful.
regards, jr.
Post a reply to this message
|
 |