IsoWood Include File 0.3 - Documentation
This POV-Ray include file offers a several maros that generate realistic wooden shapes like planks, posts etc. Most shapes can be generated in different quality levels.
The first version of this tool (0.1) was published in August 2000 for use with the isosurface patch in MegaPOV 0.5 and offered a few basic plank and cylinder macros. The second version (0.2) added more macros and offered additional features like deformation of wood objects and parquet macros.
Meanwhile the isosurface feature has been integrated into POV-Ray 3.5 and this version is designed to be used with this version. Some features will require MegaPOV 1.x. This version is no more syntax compatible to the older versions.
For some features of the IsoWood include file the IsoCSG library is required.
Modelling with isosurfaces is not trivial - it requires a good deal of experience to create good results efficiently. Some basic information about isosurfaces can be found in the POV-Ray documentation and in Mike's isosurface tutorial.
The macros in this include file create different types of wooden objects. The main function of these macros is to disturb the surface of the wood objects according to a wood pattern. Using isosurfaces for this purpose really changes the shape of the surface rather than just modifying the normal vector.
Of course this very detailed geometry has its price - the render speed can be very slow. Therefore the IsoWood include file offers different quality modes for most shapes to allow fast previews.
List of available macros
The main macros included in the file are the following:
-
plank macros
- IW_Plank_Round a simple rounded box
- IW_Plank_RoundW a simple rounded box with warp
- IW_Plank_RoundT a simple rounded box with separate texture
- IW_Plank_Round_Cut rounded box cut at the front/back
- IW_Plank_Round_CutE rounded box cut at the front/back increased roughness to ends
- IW_Plank_Round_CutW rounded box cut at the front/back with warp
- IW_Plank_Round_CutT rounded box cut at the front/back with separate texture
- IW_Plank_Chamfered chamfered box cut at the front/back
- IW_Plank_ChamferedE chamfered box cut at the front/back increased roughness to ends
- IW_Plank_ChamferedW chamfered box cut at the front/back with warp
- IW_Plank_ChamferedT chamfered box cut at the front/back with separate texture
- IW_Plank_DRound double rounded box
-
cylinder macros
- IW_Cylinder cylindrical wood
- IW_CylinderT cylindrical wood with separate texture
- IW_Cylinder_Chamfered cylindrical wood with cut & chamfered ends
- IW_Cylinder_ChamferedT cylindrical wood with cut & chamfered ends with separate texture
- IW_Cylinder_Half half cylindrical wood
- IW_Cylinder_HalfT half cylindrical wood with separate texture
- IW_Cylinder_Half_Chamfered half cylindrical wood with cut & chamfered ends
- IW_Cylinder_Half_ChamferedT half cyl. wood with cut & chamfered ends with separate texture
- IW_Cylinder_Spike4 cylindrical wood spike - 4 cuts
- IW_Cylinder_Spike8 cylindrical wood spike - 8 cuts
- IW_Cylinder_Post_Round cylindrical wood post - rounded end
- IW_Cylinder_Post_RoundT cylindrical wood post - rounded end with separate texture
- IW_Cylinder_Post_Broken cylindrical wood post - broken end
- IW_Cylinder_Post_BrokenT cylindrical wood post - broken end with separate texture
- custom shape macros
-
box wrapper macros
- IW_Box_Round box wrapper macro for
IW_Plank_Round
- IW_Box_RoundW box wrapper macro for
IW_Plank_RoundW
- IW_Box_RoundT box wrapper macro for
IW_Plank_RoundT
- IW_Box_Round_CutE box wrapper macro for
IW_Plank_Round_CutE
- IW_Box_Round_CutW box wrapper macro for
IW_Plank_Round_CutW
- IW_Box_Round_CutT box wrapper macro for
IW_Plank_Round_CutT
- IW_Box_Chamfered box wrapper macro for
IW_Box_Chamfered
- IW_Box_ChamferedE box wrapper macro for
IW_Box_ChamferedE
- IW_Box_ChamferedW box wrapper macro for
IW_Box_ChamferedW
- IW_Box_ChamferedT box wrapper macro for
IW_Box_ChamferedT
- IW_Box_Round box wrapper macro for
-
distorted shapes macros
- IW_Plank_RoundN rounded box distorted
- IW_Plank_Round_CutN rounded and cut box distorted
- IW_Plank_ChamferedN chamfered box distorted
- IW_CylinderN cylinder distorted
-
parquet macros
- IW_Parquet_A parquet macro (geometry A)
- IW_Parquet_B parquet macro (geometry B)
-
warp macros
- IW_Warp_01 warp macro Nbr. 1
- IW_Warp_02 warp macro Nbr. 2
- IW_Warp_03 warp macro Nbr. 3
- IW_Warp_04 warp macro Nbr. 4
- IW_Warp_05 warp macro Nbr. 5
Description of the macros
some general variables
IW_Quality
This is a global quality parameter. Depending on its value the macros generate different kinds wood shapes. This can be useful especially for test renders.
possible values are:
0:
plain color shape1:
textured shape2:
isosurface
This variable has only influence on some of the macros. It can be changed anywhere in the POV-Script and inluences following macro calls. The default value is 2.
The following table shows examples with the different qualities.
IW_Quality 0 | IW_Quality 1 | IW_Quality 2 |
---|
IW_ISO variables
parameters for the isosurface object. See the megapov documentation for their use.
IW_ISOaccuracy
(default=0.001)IW_ISOmaxgrad
(default=1.1)IW_ISOmax_trace
(default=0)
IW_Plain_Tex
This is the texture used for the wood shapes with IW_Quality 0. By default it is a plain red texture.
IW_Rand_Seed
The random seed used in the macros. Default is seed(0)
.
The plank macros
These macros generate box shaped wooden planks. They are created at the origin like shown in the following illustration.
all these macros have a number of common parameters:
Seed:
random seed for pigment variationxSize:
Width of the plankySize:
Height of the plankzSize:
Length of the plankRotate:
Amount of random rotation of the pigment. The pigment is rotated by a random amount influenced by this parameter and the random seed.Translate:
Amount of random translation of the pigment The pigment is translated by a random amount influenced by this parameter and the random seed.
IW_Plank_Round
A simple rounded box shape
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
Rounding radius of the edgesStrength:
Roughness of the surfacePigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Plank_RoundW
Same as IW_Plank_Round but with a warp.
parameters:
- same as IW_Plank_Round +
WarpNbr:
Number of the Warp macro to be applied to the pigment
IW_Plank_RoundT
Same as IW_Plank_Round but with independent texture.
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
Rounding radius of the edgesStrength:
Roughness of the surfacePigm:
Pigment for surface shapeText:
Texture to be applied to the plank
IW_Plank_Round_Cut
A rounded box shape cut at the ends in z-Direction
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
Rounding radius of the edgesStrength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Plank_Round_CutE
Same as IW_Plank_Round_Cut but with roughness
changing towards the ends from Strength
to
Strength2
and warp.
parameters:
- same as IW_Plank_Round_Cut +
WarpNbr:
Number of the Warp macro to be applied to the pigment
IW_Plank_Round_CutW
Same as IW_Plank_Round_Cut but with warp.
parameters:
- same as IW_Plank_Round_Cut +
WarpNbr:
Number of the Warp macro to be applied to the pigment
IW_Plank_Round_CutT
Same as IW_Plank_Round_Cut but with independent texture.
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
Rounding radius of the edgesStrength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for surface shapeText:
Texture to be applied to the plank
IW_Plank_Chamfered
A chamfered box shape cut at the ends in z-Direction
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
chamfer sizeRound2:
chamfer size of the cut ends (z)Strength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Plank_ChamferedE
Same as IW_Plank_Chamfered but with roughness
changing towards the ends from Strength
to
Strength2
and warp.
parameters:
- same as IW_Plank_Chamfered +
WarpNbr:
Number of the Warp macro to be applied to the pigment
IW_Plank_ChamferedW
Same as IW_Plank_Chamfered but with warp.
parameters:
- same as IW_Plank_Chamfered +
WarpNbr:
Number of the Warp macro to be applied to the pigment
IW_Plank_ChamferedT
Same as IW_Plank_Chamfered but with independent texture.
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
chamfer sizeRound2:
chamfer size of the cut ends (z)Strength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for surface shapeText:
Texture to be applied to the plank
IW_Plank_DRound
A double rounded box shape
parameters:
Seed, xSize, ySize, zSize, Rotate, Translate:
see aboveRound:
Rounding radius of the edgesRound2:
Rounding radius of the corners, should be larger thanRound
Strength:
Roughness of the surfacePigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
The cylinder macros
common parameters:
Seed:
random seed for pigment variationRadius:
Radius of the cylinderLength:
Length of the cylinder (z)Rotate:
Amount of random rotation of the pigment. The pigment is rotated by a random amount influenced by this parameter and the random seed.Translate:
Amount of random translation of the pigment The pigment is translated by a random amount influenced by this parameter and the random seed.
IW_Cylinder
simple cylindrical wood shape
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfacePigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_CylinderT
Same as IW_Cylinder but with independent texture.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfacePigm:
Pigment for surface shapeText:
Texture to be applied to the cylinder
IW_Cylinder_Chamfered
cylindrical wood with cut & chamfered ends
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Round:
chamfer sizeStrength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Cylinder_ChamferedT
Same as IW_Cylinder_Chamfered but with independent texture.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Round:
chamfer sizeStrength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for surface shapeText:
Texture to be applied to the cylinder
The half cylinder macros
Syntax is the same as with the full cylinder macros.
IW_Cylinder_Half
simple half cylindrical wood shape.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfacePigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Cylinder_HalfT
Same as IW_Cylinder_Half but with independent texture.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfacePigm:
Pigment for surface shapeText:
Texture to be applied to the cylinder
IW_Cylinder_Half_Chamfered
half cylindrical wood with cut & chamfered ends.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Round:
chamfer sizeStrength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Cylinder_Half_ChamferedT
Same as IW_Cylinder_Half_Chamfered but with independent texture.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Round:
chamfer sizeStrength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Pigm:
Pigment for surface shapeText:
Texture to be applied to the cylinder
The cylindrical wood post macros
These macros create wood shapes to be used as wooden posts. The shapes are only modelled at one end, the other end is left open so it will be cut by the container shape of the isosurface. This will make the function faster than in the conventional cylinder shape macros.
The Length
parameter specifies the distance of the
modelled end from the origin (in z-direction).
IW_Cylinder_Post_Round
Cylindrical wood post with rounded end
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfaceRound:
Rounding RadiusPigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Cylinder_Post_RoundT
Same as IW_Cylinder_Post_Round but with independent texture.
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfaceRound:
Rounding RadiusPigm:
Pigment for surface shapeText:
Texture to be applied to the cylinder
IW_Cylinder_Post_Broken
Cylindrical wood post broken at one end
parameters:
Seed, Radius, Length:
see common parameters.fn_Break:
user defined function for the cracked end. Evaluated in the x-y-plane.Rotate, Translate:
see common parameters.Strength:
Roughness of the surfacePigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Cylinder_Post_BrokenT
Same as IW_Cylinder_Post_Broken but with independent texture.
parameters:
Seed, Radius, Length:
see common parameters.fn_Break:
user defined function for the cracked end. Evaluated in the x-y-plane.Rotate, Translate:
see common parameters.Strength:
Roughness of the surfacePigm:
Pigment for surface shapeText:
Texture to be applied to the cylinder
The cylindrical wood spike macros
IW_Cylinder_Spike4
Cylindrical wood spike with 4 cuts at the end
parameters:
Seed, Radius, Length, Rotate, Translate:
see common parameters.Strength:
Roughness of the surfaceStrength2:
Roughness of the surface at the cut ends (z)Angle:
Angle of the cuts, lower values lead to more pointed spike, keep between 0 and 1Irreg:
Amount of random variation of the cutsPigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_Cylinder_Spike8
Same as IW_Cylinder_Spike4 but 8 cuts at the end.
The custom shape macros
IW_Shape
Creates a wood shape from an arabitrary user defined function, for example a function created with the IsoCSG library.
parameters:
Seed:
random seed for pigment variationfn_Shape:
user defined function defining the shape.Start, End:
Limits of the shape for creating the container boxRotate:
Amount of random rotation of the pigment. The pigment is rotated by a random amount influenced by this parameter and the random seed.Translate:
Amount of random translation of the pigment The pigment is translated by a random amount influenced by this parameter and the random seed.Strength:
Strength of surface irregularity.Pigm:
Pigment for texture and surface shapeFin:
Finish for the textureNorm:
Normal for the texture
IW_ShapeW
Same as IW_Shape but with warp.
parameters:
- same as IW_Shape +
WarpNbr:
Number of the Warp macro to be applied to the pigment
IW_ShapeT
Same as IW_Shape but with independent texture.
parameters:
Seed, fn_Shape, Start, End, Rotate, Translate, Strength:
see above.Pigm:
Pigment for surface shapeText:
Texture to be applied to the shape.
box wrappers for plank macros
The parameters xSize
, ySize
,
zSize
are replaced by two vectors:
Start
and End
.
This way the macros can be used as replacement for the Povray box shape.
IW_Box_Roundsee IW_Plank_Round. IW_Box_RoundWsee IW_Plank_RoundW. IW_Box_RoundTsee IW_Plank_RoundT. |
IW_Box_Round_CutEsee IW_Plank_Round_CutE. IW_Box_Round_CutWsee IW_Plank_Round_CutW. IW_Box_Round_CutTsee IW_Plank_Round_CutT. |
IW_Box_Chamferedsee IW_Plank_Chamfered. IW_Box_ChamferedEsee IW_Plank_ChamferedE. IW_Box_ChamferedWsee IW_Plank_ChamferedW. IW_Box_ChamferedTsee IW_Plank_ChamferedT. |
distorted shapes
These macros generate wood objects distorted by additional functions.
IW_Plank_RoundN
Same type as IW_Plank_Round.
The function used for the distortion is a vector function defining the displacement in x, y and z direction.
parameters:
- same as IW_Plank_Round +
C_Map:
color_map for the texture. This has to be specified separately due to the structure of the macroWarpNbr:
Number of the Warp macro to be applied to the pigmentfn_Disp:
function used for distortionfn_Max_Val:
maximum value of the function to determine container size.
IW_Plank_Round_CutN
Same type as IW_Plank_Round_Cut.
The function used for the distortion is a vector function defining the displacement in x, y and z direction.
parameters:
- same as IW_Plank_Round_Cut +
C_Map:
color_map for the texture. This has to be specified separately due to the structure of the macroWarpNbr:
Number of the Warp macro to be applied to the pigmentfn_Disp:
function used for distortionfn_Max_Val:
maximum value of the function to determine container size.
IW_Plank_ChamferedN
Same type as IW_Plank_Chamfered.
The function used for the distortion is a vector function defining the displacement in x, y and z direction.
parameters:
- same as IW_Plank_Chamfered +
C_Map:
color_map for the texture. This has to be specified separately due to the structure of the macroWarpNbr:
Number of the Warp macro to be applied to the pigmentfn_Disp:
function used for distortionfn_Max_Val:
maximum value of the function to determine container size.
IW_CylinderN
Same type as IW_Cylinder.
The function used for the distortion is a vector function defining the displacement in x, y and z direction.
parameters:
- same as IW_Cylinder +
C_Map:
color_map for the texture. This has to be specified separately due to the structure of the macrofn_Disp:
function used for distortionfn_Max_Val:
maximum value of the function to determine container size.
IW_CylinderR
Same type as IW_Cylinder.
The function used for the distortion is a float function defining the displacement in radial direction. The wood structure does not follow the distortion.
parameters:
- same as IW_Cylinder +
fn_Disp:
function used for distortionfn_Max_Val:
maximum value of the function to determine container size.
parquet macros
These macros can be used for generating parquet floors.
parameters:
Seed:
random seed for pigment variationStart:
starting point of the box containing the parquetEnd:
end point of the box containing the parquetxSize:
Length of the planksySize:
Width of the planksHeight:
Height of the planksRotate:
Amount of random rotation of the pigment. The pigment is rotated by a random amount influenced by this parameter and the random seed.Translate:
Amount of random translation of the pigment The pigment is translated by a random amount influenced by this parameter and the random seed.Round:
rounding/chamfer sizeRound2:
chamfer size for ends (z)Strength:
Roughness of the surfaceStrength2:
Roughness of the surface at the ends (z)Pigm:
Pigment for texture and surface shapesFin:
Finish for the textureNorm:
Normal for the textureText:
Texture to be applied to the planksWarpNbr:
Number of the Warp macro to be applied to the pigmentTyp:
type of the plank to be used
1: IW_Plank_Round
11: IW_Plank_RoundW
12: IW_Plank_RoundT
2: IW_Plank_Round_Cut
20: IW_Plank_Round_CutE
21: IW_Plank_Round_CutW
22: IW_Plank_Round_CutT
3: IW_Plank_Chamfered
30: IW_Plank_ChamferedE
31: IW_Plank_ChamferedW
32: IW_Plank_ChamferedT
xSize
and ySize
must be
dividable without remainder, otherwise an error occurs. Their order does not matter.
Some of the parameters are only needed for certain types of planks. Otherwise you can use anything in those fields.
IW_Parquet_A
Geometry:
------||||---- |------||||--- ||------||||-- |||------||||- ||||------|||| -||||------||| --||||------||
IW_Parquet_B
Geometry:
------||||||-- ||||||------|| ||||||------|| ||||||------|| ||||||------|| ------||||||-- ------||||||--
the warp macros
The warp macros can be used in the E, W and N type wood planks for additional
irregularities like knotholes. The WarpNbr parameter specifies the macro used.
WarpNbr 0
does not use any warp.
All warp macros have 4 parameters for proper placement of the warps:
Seed:
random seed for variationxSize:
Height of the plankySize:
Width of the plankySize:
Length of the plank
There are 4 warp macros that should be considered as working examples, feel free to write additional ones.
The warp macros 3 and 4 require MegaPOV 1.x.