Picture each blob component as an object floating in space. This object is filled with a field that has its maximum at the center of the object and drops off to zero at the object's surface. The field strength of all those components are added together to form the field of the blob. Now POV-Ray looks for points where this field has a given value, the threshold value. All these points form the surface of the blob object. Points with a greater field value than the threshold value are considered to be inside while points with a smaller field value are outside.
There's another, simpler way of looking at blobs. They can be seen as a union of flexible components that attract or repel each other to form a blobby organic looking shape. The components' surfaces actually stretch out smoothly and connect as if they were made of honey or something like that.
A blob is made up of spherical and cylindrical components and is defined as follows:
The threshold keyword determines the total field strength value that POV-Ray is looking for. By following the ray out into space and looking at how each blob component affects the ray, POV-Ray will find the points in space where the field strength is equal to the threshold value. The following list shows some things you should know about the threshold value.
Cylindrical components are specified by the keyword cylinder giving a cylinder formed by the base <END1>, the apex <END2> and the radius. The cylinder has hemispherical caps at the base and apex. Spherical components are specified by the keyword sphere forming a sphere at <CENTER> with the given radius. Each component can be individually translated, rotated, scaled and textured. The complete syntax for the cylindrical and spherical components is:
By unevenly scaling a spherical component you can create ellipsoidal components. The component keyword gives a spherical component and is only used for compatibility with earlier POV-Ray versions.
The strength parameter is a float value specifying the field strength at the center of the object. The strength may be positive or negative. A positive value will make that component attract other components while a negative value will make it repel other components. Components in different, separate blob shapes do not affect each other.
You should keep the following things in mind.
The components of each blob object are internally bounded by a spherical bounding hierarchy to speed up blob intersection tests and other operations. By using the optional keyword hierarchy you can switch this hierarchy off.
An example of a three component blob is:
If you have a single blob component then the surface you see will just look like the object used, i. e. a sphere or a cylinder, with the surface being somewhere inside the surface specified for the component. The exact surface location can be determined from the blob equation listed below (you will probably never need to know this, blobs are more for visual appeal than for exact modeling).
For the more mathematically minded, here's the formula used internally by POV-Ray to create blobs. You don't need to understand this to use blobs. The formula used for a single blob component is:
This formula has the nice property that it is exactly equal to the strength parameter at the center of the component and drops off to exactly 0 at a distance from the center of the component that is equal to the radius value. The density formula for more than one blob component is just the sum of the individual component densities:
The calculations for blobs must be very accurate. If this shape renders improperly you may add the keyword sturm after the last component to use POV-Ray's slower-yet-more-accurate Sturmian root solver.
Where <CORNER1> and <CORNER2> are vectors defining the x, y, z coordinates of the opposite corners of the box.
Note that all boxes are defined with their faces parallel to the coordinate axes. They may later be rotated to any orientation using the rotate keyword.
Each element of <CORNER1> should always be less than the corresponding element in <CORNER2>. If any elements of <CORNER1> are larger than <CORNER2> the box will not appear in the scene.
Boxes are calculated efficiently and make good bounding shapes (if manually bounding seems to be necessary).
Where <BASE_POINT> and \langle CAP_POINT> are vectors defining the x, y, z coordinates of the center of the cone's base and cap and BASE_RADIUS and CAP_RADIUS are float values for the corresponding radii.
Normally the ends of a cone are closed by flat planes which are parallel to each other and perpendicular to the length of the cone. Adding the optional keyword open after CAP_RADIUS will remove the end caps and results in a tapered hollow tube like a megaphone or funnel.
Where <BASE_POINT> and \langle CAP_POINT> are vectors defining the x, y, z coordinates of the cylinder's base and cap and RADIUS is a float value for the radius.
Normally the ends of a cylinder are closed by flat planes which are parallel to each other and perpendicular to the length of the cylinder. Adding the optional keyword open after the radius will remove the end caps and results in a hollow tube. 1) The threshold value must be positive.
2) A component disappears if the threshold value is greater than its strength.
3) As the threshold value gets larger the surface you see gets closer to the centers of the components.
4) As the threshold value gets smaller, the surface you see gets closer to the surface of the components. 1) The strength value may be positive or negative. Zero is a bad value, as the net result is that no field was added - you might just as well have not used this component.
2) If strength is positive, then POV-Ray will add the component's field to the space around the center of the component. If this adds enough field strength to be greater than the "threshold" value you will see a surface.
3) If the strength value is negative, then POV-Ray will subtract the component's field from the space around the center of the component. This will only do something if there happen to be positive components nearby. What happens is that the surface around any nearby positive components will be dented away from the center of the negative component.
Section 7.5.2.2
Box
The geometry of a box.
Section 7.5.2.3
Cone
The geometry of a cone.
Section 7.5.2.4
Cylinder
The geometry of a cylinder.
Table Of Contents