|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Working on a tree macro for the irtc (don't think I'm going to make the
deadline).
Sorry about the mildly obscene top-left version.
--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM
Post a reply to this message
Attachments:
Download 'various.jpg' (28 KB)
Preview of image 'various.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3cc4283d@news.povray.org...
BTW here's the code (which is based on some lightning code I wrote ages ago):
#macro Cylinder_Object(CStart, CVec, CWidth, CAng, CLev)
#local cylLen = 4 * ((rand(myRand) + 0.5)/CLev);
#local cylTran = transform{
rotate x*(2 * CAng * rand(myRand) - CAng)
rotate y*(360 * rand(myRand))
Reorient_Trans(y * 1, CVec)
translate CStart
}
#declare segPosB = vtransform(y * cylLen, cylTran);
#declare segVec = segPosB - CStart;
cylinder{
0, y * cylLen, CWidth, 1
transform{cylTran}
}
#end
#macro Make_Tree(TArraySize, TSeed, TBWidth, THt, TCutoff, TBranch, TAng, TLevs)
#declare PosArray = array[TArraySize];
#declare VecArray = array[TArraySize];
#declare WidArray = array[TArraySize];
#declare LevArray = array[TArraySize];
#declare PosArray[0] = <0,0,0>;
#declare VecArray[0] = <0,1,0>;
#declare WidArray[0] = TBWidth;
#declare LevArray[0] = 1;
#declare checkCount = -1;
#declare highCount = 0;
#declare myRand = seed(TSeed);
#declare Tree =
blob{
threshold 0.5
#while (checkCount < highCount)
#declare checkCount = checkCount + 1;
#declare segPosA = PosArray[checkCount];
#declare segVec = VecArray[checkCount];
#declare segWidth = WidArray[checkCount];
#declare segLev = LevArray[checkCount];
#declare segPosB = segPosA;
#declare CarryOn = true;
#while(vlength(segPosB) < THt & segWidth > 0.05 & CarryOn)
#declare segPosA = segPosB;
Cylinder_Object(segPosA, segVec, segWidth, TAng, segLev)
#declare randNum = rand(myRand);
#if(randNum > 1 - ((segLev^2)/500))
#declare CarryOn = false;
#end
#if (randNum < (TBranch/(segLev^0.25)) & segLev < TLevs &
vlength(segPosB) > TCutoff)
#declare segWidth = segWidth * 0.75;
#declare highCount = highCount + 1;
#declare PosArray[highCount] = segPosB;
#declare VecArray[highCount] = segVec;
#declare WidArray[highCount] = segWidth * 0.95;
#declare LevArray[highCount] = segLev + 1;
#end
#end
#end
}
#end
//#macro Make_Tree(TArraySize, TSeed, TBWidth, THt, TCutoff, TBranch, TAng,
TLevs)
Make_Tree(50000, 1868, 5, 40, 8, 0.45, 30, 9)
object{Tree pigment{Gray50}}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
The tops of the trees look very nice. Is the entire structure built with
blobs? If so, what is the render time?
-Shay
Tom Melly <tom### [at] tomandlucouk> wrote in message
news:3cc4283d@news.povray.org...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Shay" <sah### [at] simcopartscom> wrote in message news:3cc43a18@news.povray.org...
> The tops of the trees look very nice. Is the entire structure built with
> blobs? If so, what is the render time?
>
I think one of the versions just used cylinders, but the other 3 are blobs.
Render time is okay
for an 800*600 w/AA 0.3 time is about 2-4 minutes (depending on amount of
splitting and random seed) (P3 - 733)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I think that top left or bottom right would look convincing if the bottom
were cut off or buried in the ground. The rounding at the bottom really
destroys the illusion, but if I put my thumb over it, it looks good. A shot
from a more natural viewing angle would be more telling.
-Shay
Tom Melly <tom### [at] tomandlucouk> wrote in message
news:3cc43b80$1@news.povray.org...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
the tops of the trees are great (almost WOW great :), the trunks need some
work though.
ross
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Shay" <sah### [at] simcopartscom> wrote in message
news:3cc43c89@news.povray.org...
> I think that top left or bottom right would look convincing if the bottom
> were cut off or buried in the ground. The rounding at the bottom really
> destroys the illusion, but if I put my thumb over it, it looks good. A
shot
> from a more natural viewing angle would be more telling.
>
Well, the code's moved on a little - I'll hopefully try it out in a test
scene tonight, w/ some texturing on the tree. The basic code looks like it
would be good for other things (ginseng, ginger, sweet potatoes, coral?),
but, as usual w/ my macros, I can't get the parameters to do anything
particularily predictable. Also, w/ no gravity, it's very dependant on luck
and rand to generate a useful shape.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Looks very nice and thank you for posting the code! !
Regards,
Hugo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
They look like wierd mutant carrots :) I think if you were to add a imilar
brancing to the bottom they would make excellent aliean trees.
Corey
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I like it! Reminds me of some kind of roots...
Robert
Tom Melly wrote:
> Working on a tree macro for the irtc (don't think I'm going to make the
> deadline).
>
> Sorry about the mildly obscene top-left version.
>
>
>
> --
> #macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
> B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
> 2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
> }light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
> 146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM
>
>
>
> various.jpg
>
> Content-Type:
>
> image/jpeg
> Content-Encoding:
>
> x-uuencode
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|