Jump to content

Librarian

Members
  • Content count

    1,277
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    81

Librarian last won the day on May 14

Librarian had the most liked content!

Community Reputation

644 Excellent

About Librarian

  • Rank
    Grand Master
  • Birthday 03/04/1976

Contact Methods

  • Website URL
    https://gumroad.com/houd

Personal Information

  • Name
    Tesan Srdjan
  • Location
    Göteborg/Sarajevo

Recent Profile Visitors

13,078 profile views
  1. HUD-FUI-UI-DESIGN IN HOUDINI

    cut any dir string in0 = @OpInput1; int nprims = nprimitives(in0); int op; string operation = chs("keep"); if(operation == "above")op= 1; if(operation == "below")op= 2; else op= 0; vector cutDir = normalize(chv("cutDir")); vector cutOrigin = chv("cutOrigin"); float dist = ch("dist"); ////////////////////////////////////////////////////////////////// for(int primnum = 0; primnum < nprims; primnum++) { int vers[] = primvertices(0, primnum); int length = len(vers); int border=0; int prim0pts[]; int prim1pts[]; int numNewPts = 0; // check if this mesh is split for(int i = 0; i< length; i++) { int srcPoint = vertexpoint(in0, vers[i]); vector srcP = point(in0, "P", srcPoint); vector srcPDir = normalize(srcP - cutOrigin); float dot = dot(cutDir, srcPDir); if(dot<=0)border += 1; } // if it is not cut, maybe remove and done. if(border == 0) { if(op == 2)removeprim(geoself(),primnum,1); // continue;continue; } else if(border == length) { if(op == 1)removeprim(geoself(),primnum,1); //continue; } else { // cut mesh int srcPoint; float srcDot; for(int i = 0; i< length; i++) { int hedge = vertexhedge(in0, vers[i]); //int primary = hedge_isprimary(in0, hedge); //if(primary == 0)continue; int destVtx = hedge_dstvertex(in0, hedge); srcPoint = vertexpoint(in0, vers[i]); int destPoint = vertexpoint(in0, destVtx); vector srcP = point(in0, "P", srcPoint); vector destP = point(in0, "P", destPoint); vector srcPDir = normalize(srcP - cutOrigin); vector destPDir = normalize(destP - cutOrigin); srcDot = dot(cutDir, srcPDir); float destDot = dot(cutDir, destPDir); if(srcDot > 0) { push(prim0pts, srcPoint); } else if(srcDot == 0) { push(prim0pts, srcPoint); push(prim1pts, srcPoint); } else if(srcDot < 0) { push(prim1pts, srcPoint); } if((sign(srcDot) != sign(destDot)) && srcDot != 0 && destDot != 0) { //@Cd=set(float(i)/length, float(border)/length, 0); float bias = -destDot/(srcDot - destDot); int newPt = addpoint(geoself(), lerp(destP, srcP, bias)); push(prim0pts, newPt); push(prim1pts, newPt); numNewPts += 1; } } // remove original mesh, and add 2 meshes which cover original removeprim(geoself(),primnum,1); if(op != 2) { int newPrim = addprim(geoself(), "poly"); foreach(int pt; prim0pts) { addvertex(geoself(), newPrim, pt); } } if(op != 1) { int newPrim = addprim(geoself(), "poly"); foreach(int pt; prim1pts) { addvertex(geoself(), newPrim, pt); } } } } alpha+info e90.hiplc
  2. HUD-FUI-UI-DESIGN IN HOUDINI

    in this order int dim = sqrt(@numelem); vector pos = set(@elemnum%dim,@elemnum/dim)/(dim-1); float point_spacing = 1.0/(dim-1) + 0.00001; pos -= {0.5,0.5}; if (length(pos)*2<0.9*noise(pos*5.1)*@Time){ int pt = addpoint(0,pos); setpointattrib(0,"pt_sp",pt,point_spacing); } int near_pts[] = pcfind(0,"P",@P,@pt_sp,999); if (len(near_pts)<chi("fate")) @Cd = hsvtorgb(dot(@P,{1,1,1}),1,1); else @Cd = {0,0.1,0}; vector pos = @P; i@class = pcfind (1,"P",pos,1000,2)[0]; @Cd = rand(@class); int pts[] = pcfind(0,"P",@P,@pt_sp,999); i[]@pt= pts; int near_pts; int class; foreach(int pt; pts){ int bool = @class == point(0,"class",pt); if(bool) near_pts++; } if(near_pts<chi("fate")) @P.z += 0.001*@class+0.3; else @Cd ={0,0.1,0}; int pts[] = pcfind(0,"P",@P,@pt_sp+ch("r"),999); i[]@pt= pts; int near_pts; int class; foreach(int pt; pts){ int bool = @class == point(0,"class",pt); if(bool) near_pts++; } if(near_pts<chi("fate")) @P.x -= 0.7; //@P.z += 0.001*@class+0.1; else {@P.x -=1.4;} int pts[] = pcfind(0,"P",@P,@pt_sp,999); i[]@pt= pts; int near_pts; int class; foreach(int pt; pts){ int bool = @class == point(0,"class",pt); if(bool) near_pts++; } if(@P.z == 0 && near_pts<chi("fate")){ @P.z += 0.1; @Cd = {1,0,0}; } else if(@P.z == 0.1) @Cd = rand (@class); foreach int pts[] = pcfind(0,"P",@P,@pt_sp,999); i[]@pt = pts; int near_pts; int class; foreach(int pt; pts){ int bool = @class == point(0,"class",pt); if(bool) near_pts++; } float u =float(detail(1,"iteration"))/(detail(1,"numiterations")-1); if(@P.z == 0 && near_pts<chi("fate")){ @Cd = rand(@class); @P.z += 0.1*chramp("ramp",u); }
  3. Break object using material data

    maybe this file can have info https://forums.odforce.net/topic/44999-on-growth-and-form/?do=findComment&comment=221245
  4. HUD-FUI-UI-DESIGN IN HOUDINI

    int prim,pt; float u; for(int j;j <100 ;j++){ prim = addprim(0,"polyline"); for(int i;i<100;i++){ pt = addpoint(0,set(i,j,0)); addvertex(0,prim,pt); setpointattrib(0,"u",pt,sin(PI*i/99.0)); } } solver if (@Frame < 210 ){ float speed = ch("speed"); vector pos = {50,50} +30 *set(cos(speed*@Time),sin(speed*@Time)); vector deriv = set(-sin(speed*@Time),cos(speed*@Time)); float dist =distance(@P,pos); float strength = ch("strength"); dist = fit(dist,0,1,strength,0); @accel = deriv *dist; } else{ @accel = 0; } v@vv = @accel; @Cd = relpointbbox(0,@P) -length(@accel); int near_pts[] = neighbours(0,@ptnum); vector p0 = point(0,"P",near_pts[0]); vector p1 = point(0,"P",near_pts[1]); float length = ch("length")*fit01(@u,1,0.8); if(distance(@P,p0)>1) @accel += (p0,@P)*length; if(distance(@P,p1)>1) @accel += (p1,@P)*length; if( len(neighbours(0,@ptnum))-1){ @v += @accel *@TimeInc ; @P += @v *@TimeInc; }
  5. HUD-FUI-UI-DESIGN IN HOUDINI

    for(int j;j<2;j++){ prim = addprim(0,"poly"); for(int i;i<n;i++){ u = -float(i)/(n-1); pos.z = u; t = clamp(-i+5*@Time,0,1); pos.x = lerp(pos.x,0.3*pow(-1,j+1)*u*rand(10*u+50*(j+pow(-1,j))*0.01),t); pos.x *= chramp("ramp",u); pt = addpoint(0,pos); addvertex(0,prim,pt); if( i == n-1){ pos.x= pos.x+pow(-1,j)*0.5; addvertex(0,prim,addpoint(0,pos)); pos.z = 0; addvertex(0,prim,addpoint(0,pos)); } pos = 0; } }
  6. HUD-FUI-UI-DESIGN IN HOUDINI

    string curve = "op:../curve4"; vector cur_uvw,next_uvw; vector cur_center,next_center; vector v,up,side,p; int prim =addprim(0,"polyline"); setprimattrib(0,"Cd",prim,{1,0,0}); for (int i=1;i<@Frame +1;i++){ cur_uvw.x= fit(i,1,240,0,1); next_uvw.x= fit(i+1,1,240,0,1); cur_center = primuv(curve,"P",0,cur_uvw); next_center=primuv(curve,"P",0,next_uvw); v = next_center -cur_center; if(i==1){ p = cur_center+0.2*rand(0); }else{ p +=v; v = normalize(v); up = normalize(p-cur_center); p += up *0.002; side = normalize(cross(v,up)); p += side*0.05; addvertex(0,prim,addpoint(0,p)); } } addpoint(0,cur_center); addpoint(0,p);
  7. HUD-FUI-UI-DESIGN IN HOUDINI

    It can be useful, play with parm..have Fun
  8. Extract/Apply transforms and rotations

    Points to Voxel Y or ? HM transformCnf.hipnc
  9. HUD-FUI-UI-DESIGN IN HOUDINI

    Have Fun detail float r; float theta; vector p,v; int n = 360*0.5; int j, seed, prim; float l; float u; int pt; int t = min(n,1*@Frame); while (j< 10){ r = rand(++seed); l = max(0,350*rand(j)-50*@Time); theta = t*4*PI/n; p = r*set(cos(theta),sin(theta)); pt = addpoint(0,p); v = -set ( -p.y,p.x); setpointattrib(0,"v",pt,v); setpointattrib(0,"r",pt,r); v = -set (-p.y,p.x); setpointgroup(0,"group",pt,1); if(theta > 6*PI) setpointgroup(0,"group",pt,0); if (r> 0.5){ j++; prim=addprim(0,"polyline"); for (int i;i<n;i++){ if(i<t && i>t-l){ u = fit(i,t-l+1,t-1,0,1); theta = 4 *PI*i/n; p = r*set(cos(theta),sin(theta)); pt = addpoint(0,p); addvertex(0,prim,pt); setpointattrib (0,"Cd",pt,hsvtorgb(u+@Time,1,6*u)); setpointattrib (0,"Cd",pt,hsvtorgb(u,1,6*u)); setpointattrib (0,"width",pt,u*0.003); setpointattrib (0,"r",pt,r); v= -set (-p.y,p.x)*5; setpointattrib (0,"v",pt,v); } } } } solver(emitter(detail) and trail) vector pos ; vector v; int ptnum; int life ; float r; float maxangle; float u; int @age = 0; foreach(int pt;expandpointgroup(1,"group")){ r = point(1,"r",pt); v = point(1,"v",pt); pos = point(1,"P",pt); if(r>0.5){ for(int i;i<10*rand(pt);i++){ ptnum = addpoint(0,pos); life = fit01(rand(r),0.4,1)*50+rand(i+pt); setpointattrib(0,"life",ptnum,life); v = sample_direction_cone(v,0.05,rand(i)); v = normalize(v)*float(rand(ptnum+pt)); setpointattrib(0,"v",ptnum,v); } } } trail/points if (@age > @life) removepoint(0,@ptnum); else{ @v += 0.05*onoise(@v*0.5)*@TimeInc; @v += 0.5 *@TimeInc*float(@age)/@life*normalize(-@P); //@v += -0.1*set(-@P.y,@P.x)*@TimeInc; //@v = normalize(@v)*clamp(length(@v),0.1,1.2); @P += @v *@TimeInc; @age++; float h = fit(@age,0,@life,1,0); @Cd = hsvtorgb (h,1,1); }
  10. int dim = chi("dim"); int npt = chi("npt"); vector pos ; vector prev_pos; int prev_prim; vector dir; vector uv; vector prim_pos; float dist; float min_dist = 0.5; float max_dist = length({0.5,0.5,0}); int pt; int prim; for(int j;j<dim*dim;j++){ prim_pos = set(j%dim,j/dim); prim = addprim(0,"polyline"); for (int i;i<npt;i++){ pos=lspline(i/float(npt-1),{0,0,0},{0,1,0},{1,1,0},{1,0,0},{0,0,0}); dist = length(pos-{0.5,0.5,0}); dist= smooth(min_dist,max_dist,dist,ch("rolloff")); dist =fit01(dist,0.5,0); dir = normalize ({0.5,0.5,0}-pos); pos += dist *dir; pos += prim_pos; uv = pos/(dim-1); pos = uvsample(1,"P","uv",uv); dist = distance(pos,prev_pos); if(dist>1 && prev_prim == prim){ prim = addprim(0,"polyline"); } else { pt = addpoint(0,pos); addvertex(0,prim,pt); prev_pos = pos; prev_prim = prim; } } } attribtransferbyuv
  11. Need expertise

    Found some picturein some Asia Forums... just wondering ...Can this be of some value for someone ? What is this for what ? Codes water cccc MM.hiplc
  12. growth organic portrait

    Kak Dela ? @wacool Try Tutorials Tesla's fan Vimeo and Entagma Physarum Tutos ... HM or "that Dude" just use points solver-ring something and exporting to XParticles Cinema 4d hm..
  13. Original file From Qiita .Asia Students-he don't share anymore But i Have File from -dec last year -@TF_siri Redshift and I changed to Mantra just to see result ..just play with file .Have Fun. t.rar
  14. ice crack pattern

    shader ,Play with freq in uniNoise.Have Fun IceCracks.hiplc
  15. ice crack pattern

    For color-Vop shading or actual fracture ? second One need more Adjusting Sh.hiplc Huji.hiplc
×