POV-Ray : Newsgroups : povray.binaries.images : Object study : Re: Object study Server Time
2 Aug 2024 16:25:13 EDT (-0400)
  Re: Object study  
From: Anthony D  Baye
Date: 10 Oct 2012 10:45:00
Message: <web.507588f9e3a8e9c8d97ee2b90@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 10-10-2012 12:15, Jaime Vives Piqueres wrote:
> > On 10/10/12 10:06, Anthony D. Baye wrote:
> >> The boards are made from an isosurface that uses the function:
> >>
> >> f_rounded_box(x,y,z,0.125, W/2-0.03125*OldWood(x-_X,y-_Y,z-_Z).x,
> >> T/2-0.078125*OldWood(x-_X,y-_Y,z-_Z), L/2+0.25)
> >>
> >> Where W, T and L are Width, Thickness and Length and _X, _Y, and _Z
> >> are supposed to be random translations, but I don't think that
> >> they're getting re-calculated every time the macro is called, or if
> >> they are, they're always the same.
> >
> >    But there you are translating the isosurface function, not the texture
> > later applied to it: you need to translate it independently.
>
> Exactly.
>
> >
> >    BTW, after seeing at last the "problem object", I think it has an easy
> > solution, as long the base the texture is the same for all: just lay the
> > "global" texture at each sub-object:
> >
> > union{
> >    object{board1
> >      texture{t_wood
> >        // local transforms here
> >      }
> >      texture{t_dirt}
> >    }
> >    object{board2
> >      texture{t_wood
> >        // local transforms here
> >      }
> >      texture{t_dirt}
> >    }
> >    ...
> > }
>
> And of course, the randomness of the pattern is easy to include in this
>
> union{
>     object{board1
>       texture{t_wood
>         // local random translate here
>         // local transforms here
>       }
>       texture{t_dirt}
>     }
>     object{board2
>       texture{t_wood
>         // local random translate here
>         // local transforms here
>       }
>       texture{t_dirt}
>     }
>     ...
> }
>
> Note that if you use this for the horizontal and diagonal boards, you
> may have to counter-rotate the dirt texture by the same amount, in order
> to get a correct (?) image.
>
I have been translating the texture.  It's still not having an effect because _X
_Y and _Z are always the same...  I'll post the source next time I'm at my
computer.

As for your texture solution:  It might work if dirt was all I was working
with.  But I also want to add serial numbers, company logos and handling
instructions like "this end up" or "fragile" etc...

Added to individual elements, the texture would need to be translated precisely
for each element such that adjacent elements matched up.  It's tedious to even
automate something like that.  Assuming it can be done in the first place.

And it makes the object extremely wasteful in terms of memory, if I need a lot
if them.

Of course,  my spray-paint method might not be any better, and could be much
worse.

Regards,
A.D.B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.