Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. float lon = relbbox(0,@P).z;
  2. float hei = relbbox(0,@P).y;
  3. float thi = relbbox(0,@P).x;;
  4. float minu = ch("minu"), maxu = ch("maxu"), minv = ch("minv"), maxv = ch("maxv");
  5. float uOffset = ch("uOffset"), vOffset = ch("vOffset");
  6. float fitu = fit01(lon,minu,maxu) + uOffset;
  7. float fitv = fit01(hei,minv,maxv) + vOffset;
  8. vector customUv = set(fitu,fitv,0);
  9. vector uvPos = uvsample(1,"P","uv",customUv);
  10. vector uvN = uvsample(1,"N","uv",customUv);
  11. vector uvColor = uvsample(1,"Cd","uv", customUv);
  12. v@P = uvPos;
  13. v@P += uvN*thi*ch("thickness");
  14. v@Cd = uvColor;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement