|
|
> See if John Van Sickle's "Thoroughly Useful Macros" is helpful to you.
> It's a nice collection of John's stuff at:
>
> http://enphilistor.users4.50megs.com/macs.htm
Thanks for the link! With his macros I was introduced to matrix transforms
and was able to solve "most" of my problems. Placing:
matrix <1,0,0, 0,0,1, 0,1,0, 0,0,0>
At the end of all the transformations in every object correctly switches the
scene from right to left handed. However the tricky part is creating a
program that knows where to place this. For example:
sphere{
<0,0,0>,2
scale <10,1,10>
rotate <45,67,180>
translate <45,12,-78>
rotate 45*z
matrix <1,0,0, 0,0,1, 0,1,0, 0,0,0>
}
This is easy to place but this is not:
union{
object{
myobject
scale...
rotate...
translate...
}
object{
myobject2
scale...
rotate...
translate...
}
}
Here each object should get a copy of the matrix transform However in the
following:
#declare HgtFld001 = object {
height_field {
tga "C:\Program Files\Moray For Windows\Maps\test - roundabout
street.tga"
water_level 0.0
}
rotate <-90, 0, 0> // Turn onto XY plane. Now points along -Z
scale < 2, 2,-2> // Scale to Cube size. Now points along +Z
translate < -1,-1,-1> // Center around origin
material {
Dirt
}
scale <25.6306, 25.6306, 0.96627>
translate 0.481242*z
matrix <1,0,0, 0,0,1, 0,1,0, 0,0,0>
}
intersection { // CSG001
cylinder { // Cylndr001
<0,0,1>, <0,0,0>, 1
scale <19.211306, 19.211306, 3.194606>
translate -0.791182*z
matrix <1,0,0, 0,0,1, 0,1,0, 0,0,0>
}
object { HgtFld001 }
material {
Dirt
}
}
The placement is even more tricky. Because of this I was only able to get my
program to correctly apply the matrix transformation about 60-70% of the
time. This is a little too complicated for me for now so I've decided to
give up for the time being.
Post a reply to this message
|
|