|
|
My foolish attempt at a new primitive has finally paid off. After much
compiling and bug fixing, and yet finished far sooner than I thought,
the first version of the isoblob patch is working.
The isoblob, for those who haven't been following the project (i.e.,
probably most of you), combines the traits of a blob and an isosurface,
allowing blob-like components to be specified with user-supplied density
functions. The result isn't *perfect*, and nowhere near as good-looking
as a regular blob is where simple shapes are involved, but it's not
half-bad.
I've posted a test scene I made in povray.binaries.images, under the
subject "Behold the isoblob!", if you want to see an example scene file
and its output.
Here's what the syntax looks like (so far):
isoblob
{
/* similar to blob threshold, not to isosurface */
threshold <THRESHOLD>
[accuracy <ACCURACY>]
/* maximum intersections per interval--default is quite high */
[max_trace <MAX_TRACE>]
/* Functions
* <x,y,z> -- coordinates in component space
* <r,s,t> -- coordinates in isoblob space
*
* Functions should generally return a value from 0 to 1.
*/
function { ... } /* function 1--at least one is required */
[function { ... } ...] /* functions 2 and up */
/* Components
*
* Strength is multipled by the density function to yield true
* density, just as in blobs.
*
* Function numbers start at 1, and go in order of definition.
*/
/* Translated so that component space is centered at <0,0,0> */
sphere
{
<CENTER>, <RADIUS>, [strength] <STRENGTH>
[function] <FUNCTION NUMBER>
/* Insert any other blob-component modifiers here. */
}
/* Transformed so that component space is centered around axis from
* <0,0,0> to <0,0,length> */
cylinder
{
<END1>, <END2>, <RADIUS>, [strength] <STRENGTH>
[function] <FUNCTION NUMBER>
/* Insert any other blob-component modifiers here. */
}
}
Lummox JR
Post a reply to this message
|
|