|
![](/i/fill.gif) |
Christoph Hormann wrote in message <3A34E9C5.48E56C4A@gmx.de>...
> I must admit that i don't understand much of the code. I thought it would
> be something like a displace warp for objects but it does look different.
> Could you explain it a bit more detailed?
I choose keyword "deform" becouse this is short
I know that this is some kind of transformation and perhaps should be placed
beetween object's modifiers but I choose different statment becouse of different
usage it has. This example is simple deformation but I'm thinkin on some
complicated which in the truth create different objects - my defformations are
objects. It means they can be assigned to variables, puted as base of another
deformation, as part of csg, can be scaled, rotated etc.
I try describe but I'm affraid of vocabulary
deform {
TYPE
contained_by{ CONTAINER }
[ DEFORM_PARAMETERS ]
[ DEFORM_TYPE_PARAMETERS ]
[ object modifiers ... ]
}
description:
TYPE: for develop universal deformation module curently only support "turn" but
I want implement more type of deformations (look below)
CONTAINER: syntax is inspired by isosurface and this show space of base object -
this allow deform only part of object - i.e. you can twist middle part of
woodden column and leave rest of it
DEFORM_PARAMETERS:
[ ACCURACY float ]
[ NORMAL_ACCURACY int [ , float ] ]
[ NORMAL_WEIGHTED ]
this is group of parameters for all types of deformations
ACCURACY - this is connected with method of recive deformed shape - during trace
ray is divided by points with distance described in accuracy parameter, every
point is undeformed to original space of base object, this makes some kind of
curved ray, than look for intersection with base and return coordinate to
deformed space - default value is 0.01
NORMAL_ACCURACY - this is followed by two parameters and is connected with
method of deformation normals - after finding intersection with base object this
find neighbouring points distributed evenly around of intersection point on
surface perpendicular to normal. first integer value determine number of this
points (must be greater than 2); second float determine distance beetwen this
points and intersection point (default values are 4 and 0.001); this points are
deformed to space of scene and appear as some surface aproximate as set of
triangles; than average normal of this triangles for output normals
NORMAL_WEIGHTED - determine method of averaging normal - more in thread "should
be normals weighted" at p.a-u
DEFORM_TYPE_PARAMETERS - this is group of parameters proper for type of
deformation; they control deformation i.e. for deformaion "turn" there is
parameter "full_after" followed by float - this tells that going along axis of
container after every full_after distance space should be twisted 360 degrees
I hope after explanation this is more readable, try understand again:
deform {
turn box{-1 1 texture{Texture}}
contained_by { cylinder{ <0,-1,0> <0,1,0> 3 }}
accuracy 0.05
normal_accuracy 3, 0.01
normal_weighted
full_after 8
}
what about next deformation types
second will be deformation showed on right side at
http://www.abx.art.pl/pov/nonlinear/test.jpg - this is still deformation "turn"
but with specified parameter "spindle" followed by float greater than 0
another deformation types:
a) put object in cylinder and place along bezier - for curved texts
b) put object in cylinder and create torpatch, tangle
c) put object in box and place beetwen two bezier_patches as top and bottom
surface of this box
d) put object in cylinder or box and stretch out this like rubber (different in
center and at and)
in future I think that this could speed up if deform vertices of mesh during
parse and play like normal mesh
I not have finished sources but if there is any person interested with this I
can public current state of deform.c
ABX
Post a reply to this message
|
![](/i/fill.gif) |