Jump to content
[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Posts posted by Librarian


  1. vector pos(float u,t){
            vector p = set(0,u,0);
            p+= u *0.2*curlnoise(p+0.1*t);
            return p;
            
        }
        
    int npt = 30;
    for (int i;i<npt;i++){
    
        float u = i/float(npt-1);
        vector p= pos(u,@Time);
        vector next_p = pos(u+0.1,@Time);
        vector up = normalize(next_p-p);
        vector4 ori = dihedral({0,1,0},up);
        int pt = addpoint(0,p);
        setpointattrib(0,"orient",pt,ori);
        matrix3 r =qconvert(ori);
        vector v = set(r.xx,r.xy,r.xz);
        vector side = set(r.zx,r.zy,r.zz);
        setpointattrib(0,"v",pt,v);
        setpointattrib(0,"side",pt,side);
        }
    int pts0[];
    int pts1[];
    
    for(int i;i<i@numpt;i++){
    
    
            vector p = point(0,"P",i);
            vector dir = point(0,"side",i);
            dir = normalize(dir);
            float u = float(i)/(@numpt-1);
            u = chramp("ramp",u);
            vector p0= p+dir*u;
            vector p1= p-dir *u;
            int pt0 = addpoint(0,p0);
            int pt1= addpoint(0,p1);
            append(pts0,pt0);
            append(pts1,pt1);
            
            }
            
     for (int i;i<@numpt-1;i++){
     
     
            addprim(0,"poly",i,i+1,pts0[i+1],pts0[i]);
            addprim(0,"poly",pts1[i],pts1[i+1],i+1,i);
            }

    use Sweep Node Best


  2. int count = chi('count');
    float seed = chf('seed');
    int iarr[] = array();
    for (int i = 0;i<@numpt;i++){
        iarr[i]=i;
    }
    
    function void shuffle( int a[];float seed 
        float b[] = {};
        for(int i = 0;i<len(a);i++){
            push(b,rand(i+seed));
            }
            int c[] = argsort(b);
            a = reorder(a,c);
    }
    shuffle(iarr,seed);
    i[]@arr = iarr;
    i@variant = iarr[@ptnum]%count;
    
    //i@variant = floor(rand(@ptnum)*count);

    function void shuffle( int a[];float seed
    this Line its Wrong total Stop 
    Solved

    "function void shuffle(int a[];float seed ){"


  3. hm maybe to use shallow-water Solver then you can use those attributes on texture and make displacement its fast  you have 2 ex in .
    C:/Program Files/Side Effects Software/Houdini 19.5.303/houdini/help/examples/nodes/
     

    • Like 1
×