Librarian Posted February 26, 2022 Share Posted February 26, 2022 (edited) Problem ..some Pictures tutorial from Asia ..error ..its Like Spanish village for me .. need Help. Packed3d.hiplc Edited February 26, 2022 by Librarian Quote Link to comment Share on other sites More sharing options...
Atom Posted February 27, 2022 Share Posted February 27, 2022 (edited) A slight typo...camel case function name. packedprim.setIntrinsicValue('pivot',pivot) Edited February 27, 2022 by Atom 1 Quote Link to comment Share on other sites More sharing options...
Librarian Posted February 27, 2022 Author Share Posted February 27, 2022 (edited) Thanx @Atom Edited February 27, 2022 by Librarian 1 Quote Link to comment Share on other sites More sharing options...
vinyvince Posted February 27, 2022 Share Posted February 27, 2022 (edited) I 'm still a python numbie so i will use vex 2022-02-27 23-05-12.mp4 Edited February 27, 2022 by vinyvince Quote Link to comment Share on other sites More sharing options...
vinyvince Posted February 27, 2022 Share Posted February 27, 2022 (edited) ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas Edited February 27, 2022 by vinyvince 1 Quote Link to comment Share on other sites More sharing options...
Librarian Posted February 28, 2022 Author Share Posted February 28, 2022 (edited) @Atom what if we have BBox how to use those in DOP like Transformer effect or somthing. Best approach?? @vinyvince post "your" files ...share with peoples ... oh I found on Cgworld Japan new file under tutorial yesssssss int dotranslate = chi("dotranslate"); int dotrotate = chi("dotrotate"); int doscale = chi("doscale"); int uniformscale = chi("uniformscale"); vector min0,max0,min1,max1; float pb0[] = primintrinsic(0,'packedbounds',@primnum); float pb1[] = primintrinsic(1,'packedbounds',@primnum); for(int i;i<3;i++){ min0[i]= pb0[i*2]; max0[i]= pb0[i*2+1]; min1[i]=pb1[i*2]; max1[i]=pb1[i*2+1]; } vector size0 = max0-min0; vector center0 = (max0+min0)/2; vector size1 = max1 -min1; vector center1 = (max1+min1)/2; matrix T = 1 ; matrix R = 1 ; matrix S = 1 ; if ( dotranslate){ vector t = center1 -center0; translate(T,t); } if (dotrotate){ float size0_array[]= set(size0); float size1_array[]= set(size1); int size0_argsort[]= argsort(size0_array); int size1_argsort[]= argsort(size1_array); vector newsize = size0; vector mr[]; for(int i;i<3; i++){ vector axis; axis[size1_argsort[i] ]=1; mr[size0_argsort[i] ]=axis; newsize[size0_argsort[i]]= size0[size0_argsort[i]]; } size0 = newsize; //mr[2]= cross(mr[0],mr[1]); R = set(mr); } if(doscale){ //@P = fit(@P,min0,max0,min1,max1); vector s = size1/size0; if (uniformscale){ s = min(s); } scale(S,s); } vector p = center0;matrix X = 1;translate(X,p); matrix xform = invert(X)*R*S*T*X; matrix fulltransform = primintrinsic(1,'packedfulltransform',@primnum); setpackedtransform(0,@primnum,X*xform*fulltransform); can be useful for 3d Print Pack.hiplc Edited February 28, 2022 by Librarian Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.