|
|
Am 24.01.2019 um 00:02 schrieb kendfrey:
> I haven't been able to find a straightforward way to do this. Here are some
> things I considered:
> - Using a macro instead of declaring the object. This would bloat the code quite
> significantly, since each component would need to be stored separately in its
> own identifier, and recombined every time it's used.
This is the approach I would recommend.
You can get around the problem of cluttering up global namespace with
gazillions of identifiers, by making use of a dictionary to store the
components, like so:
#declare MyComponents = dictionary;
#declare MyComponents.Body = mesh { ... }
#declare MyComponents.Hair = mesh { ... }
> * I eventually hope to use UV mapping (or something similar) in a way that
> selects from a 3D texture map instead of directly wrapping a 2D texture onto the
> surface. This is to avoid artifacts that would be caused by tiling a fixed 2D
> image. I don't know if this is relevant to the main question, but I'm including
> it for completeness.
You can always scale and translate a 3D texture to get a different
"chunk" of it, if that's what you're after; and there are creative ways
to nest patterned textures so that different "chunks" of the texture
would have entirely different properties.
Post a reply to this message
|
|