Little shader question

   3707   2   1
User Avatar
Member
113 posts
Joined: 7月 2005
Offline
Hi everybody,

Here comes an other question…

I have got 2 boxes, the first one has got 7 in Y size and the second one 3 . I'm applying a brick pattern on these objects . How can my shader “read” those Y sizes so it can, according to that value, create a brick pattern 10 times smaller than that Y size. So, depending on which objects it's applied on, the pattern will have different sizes …

I'm not sure if I have to do that in VEXbuilder or elsewhere …

Thanks again in advance

Julien
User Avatar
Member
154 posts
Joined: 7月 2005
Offline
i would have the same size of the brick or box to start off with, or if its not a standard object then match it with a a transformation sop accordingly.

ie, get both objects scaled to the same size, then apply your transformation sop, to scale to your needs, then uvtexture sop that uses the inverse of the scale info from ur transform sop.

ie.
copy the parameters from ur transform scalex, and paste using relative refs in the uvtexture size parameters, and have 1 divided by that

ie 1/ ch (“obj/box/xtramsform/sx”) *10

its keeps it relative to the scale of the object

hope this works

aracid
User Avatar
Member
113 posts
Joined: 7月 2005
Offline
Indeed that trick is working thanks for helping !

But I think my question should have been more precise, in fact when I see my networks, I think I really should try to find a way to get my object size in VOPS, a sort of input :?


but thanks, that's helping anyway !

Julien
  • Quick Links