|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Alain <kua### [at] videotronca> wrote:
>
> > As for the wood of the pallets, it's often very rough, using cheap
> > "utility" grade wood. Very rough, unfinished, unplanned, knotty and
> > often split, with some bark left... It's also almost always light
> > coloured: white pine, light yellow pine, light oak,...
>
> rendering a good, convincing wood texture is always a challenge, and I can only
> imagine how to get a good cracked and split wood plank.
>
> I found a pretty amazing carboard box development HERE:
> https://www.verdoorn.nl/tiki-index.php?page=CBCKManual
>
> Really great and extensive work on a simple object.
>
> > > I'm thinking about how to write a macro to shrink-wrap a loaded pallet - not
> > > sure how I'll do the crinkly plastic film...
> > >
> > Good luck on that one.
>
> Thanks - I'm working on it - slowly ;)
do you, perhaps, want to use my packing crate model?
You're welcome to it, though it might take some scaling.
Regards,
A.D.B.
#include "rand.inc"
#include "woods.inc"
#include "functions.inc"
#declare P_OldWood =
pigment {
wood
turbulence <0.3, 0.1, 0.5>
color_map { M_Wood1A }
scale <0.125*ft, 1.0, 1.0*ft>
}
#declare F_OldWood =
function {
pattern {
wood
turbulence <0.3, 0.1, 0.5>
scale <0.125*ft, 1.0, 1.0*ft>
}
}
#macro Board(W, T, L)
#local grain_seed = 15643544181;
#local _X = Rand_Normal(0.0, 1.0, RdmA)*2e5;
#local _Y = Rand_Normal(0.0, 1.0, RdmB)*2e5;
#local _Z = Rand_Normal(0.0, 1.0, RdmC)*2e5;
/*
#debug concat("_X: " str(_X, 0, 6) "\n")
#debug concat("_Y: " str(_Y, 0, 6) "\n")
#debug concat("_Z: " str(_Z, 0, 6) "\n")
*/
isosurface {
function {
f_rounded_box(x,y,z,0.125,
W/2-0.03125*F_OldWood(x-_X,y-_Y,z-_Z),
T/2-0.078125*F_OldWood(x-_X,y-_Y,z-_Z),
L/2+0.25)
}
threshold 0
max_gradient 2
contained_by { box { <-W/2, -T/2, -L/2> <W/2, T/2, L/2> } }
all_intersections
pigment { P_OldWood translate <_X,_Y,_Z> }
finish { ambient 0 diffuse 0.38 specular 0.07 roughness 0.3 }
}
#end
#declare Pallet =
union {
union {
object { Board(4, 2, 63) rotate 90.0*z translate <-30.5, 2.75, 0.0> }
object { Board(4, 2, 63) rotate 90.0*z translate <-3.0, 2.75, 0.0> }
object { Board(4, 2, 63) rotate 90.0*z translate <3.0, 2.75, 0.0> }
object { Board(4, 2, 63) rotate 90.0*z translate <30.5, 2.75, 0.0> }
}
#local sT = -2.4375 ;
#while(sT <= 2.4375)
object { Board(4.5, 0.75, 63) rotate 90.0*y translate <0.0, 0.375, sT*ft> }
object { Board(4.5, 0.75, 63) rotate 90.0*y translate <0.0, 5.125, sT*ft> }
#local sT = sT + 0.4875 ;
#end
}
#declare crossMember =
difference {
object { Board(6, 2.0, sqrt(4608)) }
box { <-3.1, 0.0, -3.0> <3.1, 1.125, 3.0> }
}
#declare EndCap =
union {
#local a = 0;
#while(a < 360)
object { Board(6, 2.0, 54.0) rotate 90.0*y translate <-3.0, 0.0, 27.0>
rotate a*y }
#local a = a + 90;
#end
#local b = -26.0;
#while(b <= 26.0)
object { Board(4, 2, 56) translate <b, 2.0, 0.0> }
#local b = b + 4.0;
#end
intersection {
union {
object { crossMember rotate -45.0*y }
object { crossMember rotate <180.0, 45.0, 0.0> }
}
box { <-24.0, -1.0, -24.0> <24.0, 1.0, 24.0> }
}
}
#declare SidePlate =
union {
#local a = 0;
#while(a < 360)
object { Board(6, 2.0, 52.0) rotate 90.0*y translate <-3.0, 0.0, 26.0>
rotate a*y }
#local a = a + 90;
#end
#local b = -24.0;
#while(b <= 24.0)
object { Board(6, 2, 54) translate <b, 2.0, 0.0> }translated and rotated.
remove rotation and drop 1.0*y to close.
#local b = b + 6.0;
#end
intersection {
union {
object { crossMember rotate -45.0*y }
object { crossMember rotate <180.0, 45.0, 0.0> }
}
box { <-23.0, -1.0, -23.0> <23.0, 1.0, 23.0> }
}
}
// The actual crate, on a pallet
#declare Pallet_Crate =
union {
object { Pallet }
union {
object { EndCap translate 1.0*y }
// Top closed.
object { EndCap rotate <0.0, 0.0, 180.0> translate <0.0, 61.0, 0.0> }
#local a = 0;
#while(a < 360)
object { SidePlate rotate <90.0, -90.0, 0.0>
translate <29.0, 31.0, -1.0> rotate a*y }
#local a = a + 90;
#end
translate 5.5*y
}
scale 1/12
}
Post a reply to this message
Attachments:
Download 'crate2-3.png' (522 KB)
Preview of image 'crate2-3.png'
|
|