|
|
Hi,
I want to render a measured data set. I have it in a 3D NumPy array. The array
is binary - ones for solid locations, zeros for empty locations.
How can I import it to PovRay? I tried exporting .obj isosurface, but it gives
me just the surface, and I want the solid. Tried to go with a .df3 file - but a
density function is not really appropriate here - I don't want a density map,
but a solid body.
Another question: my data is quite "staircased" - lots of squares that result
from the measurement pixels. Once I import it, how can I smoothen it? There are
lots of noise functions in PovRay, is there something for denoising/smoothing?
Thanks!
Post a reply to this message
|
|
|
|
> Hi,
>
> I want to render a measured data set. I have it in a 3D NumPy array. The array
> is binary - ones for solid locations, zeros for empty locations.
>
> How can I import it to PovRay? I tried exporting .obj isosurface, but it gives
> me just the surface, and I want the solid. Tried to go with a .df3 file - but a
> density function is not really appropriate here - I don't want a density map,
> but a solid body.
You can only render the surface of an object, or make it transparent and
fill it with some media that use your data as a density map.
The object, even if you can only see it's surface, IS solid.
If you cut away from any object with a clipped_by object, you only get
thin surfaces. You probably want to use a difference or intersection
instead. This will fill up the cut.
If using an isosurface, DON'T use the open modifier.
>
> Another question: my data is quite "staircased" - lots of squares that result
> from the measurement pixels. Once I import it, how can I smoothen it? There are
> lots of noise functions in PovRay, is there something for denoising/smoothing?
>
> Thanks!
>
>
To reduce the "staircase" aspect, you can use one of the interpolation
option. In your case, I'd simply use tri-linear interpolation. You may
want to experiment with the other interpolation options, but tri-cubic
interpolation WILL cause you some problems unless you replace your 0 by
something like 0.01 and ones by something like 0.99.
Using interpolation is highly recomended if you use your 0-1 data with
an isosurface. It will greatly reduce the max_gradient from near
infinity to around 2.
An object that is transparent can be given an interior attribute that
can make it refractive: interior{ior 1.5}// Typical glass
Post a reply to this message
|
|