Jump to content

manx151089

Members
  • Content count

    10
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Posts posted by manx151089


  1. s@name = "piece_" + itoa(@ptnum);
    //Randomize Velocity
    float x,y,z,minX,minY,minZ,maxX,maxY,maxZ,sx,sy,sz,sminX,sminY,sminZ,smaxX,smaxY,smaxZ;
    //source min max velocity
    vector min=chv("minVelRandom");
    vector max=chv("maxVelRandom");
    //randomize min max velocity
    x = fit01(rand(@ptnum),min.x,max.x);
    y = fit01(rand(@ptnum*222),min.y,max.y);
    z = fit01(rand(@ptnum*333),min.z,max.z);
    //assign the same to force which doesnt work
    //v@force=set(x,y,z);
    //assign the random velocity to each bone which worked for me
    v[]@v_agent;
    i@myBones= agenttransformcount(0, @ptnum);
    for(int i;i<=@myBones;i++)
        {
        append(@v_agent,@force);
        }
    //Initial Spin Random
    vector smin=chv("minSpinRandom");
    vector smax=chv("maxSpinRandom");
    sx = fit01(rand(@ptnum*1000),smin.x,smax.x);
    sy = fit01(rand(@ptnum*1222),smin.y,smax.y);
    sz = fit01(rand(@ptnum*1333),smin.z,smax.z);
    //assign Spin Random in Torque
    v@torque=set(sx,sy,sz);
    
    //Oscilation Setup
    //In the below vex code the only value I have used in the simulation is the v@oscillation's Y component but the code also creates an array which is currently not being used
    
    
    /*vector oMin         =   chv("oscillationMin");
    vector oMax         =   chv("oscillationMax");
    vector oRandom      =   fit01(random(@ptnum),oMin,oMax);
    v@oscillation       =   oRandom;
    v@zeroOscillation   =   set(0.0,0.0,0.0);
    
    v[]@oscillation_agent;
    i@myBones= agenttransformcount(0, @ptnum);
    for(int i;i<=@myBones;i++)
        {
          
        if(i==30||i==32||i==1)
            {
            append(@oscillation_agent,v@oscillation);
            }
        if(i!=30||i!=32||i==1)
            {
            append(@oscillation_agent,v@zeroOscillation);
            }
        }
    */
    //Create v_agent array and a vector array for oscillation of certain selected bone numbers

    The above code will create some custom velocity for the agents in sop level and then later you can use the v[]@v_agent in a sop solver to copy to the particular agents you need to apply it to. So basically what we are are doing here is defining random velocity and torque to a certain number of bones in the crowd agents. You should feel free to bypass the codes that you do not need. I have already bypassed the oscillation bit of the code for you.

    Cheers,

    Manishkumar Makhija


  2. For more bendy simulations:

    Just try the same by adding more collision geometry per bone. I see you just have one bone for your spine that might need to increase to around 3-5 bones depending on how much bending you want the spine to have.

    For the joints getting dismembered:

    Firstly, I will suggest you make sure you have you scene file setup properly. For that i would recommend you to copy and paste nodes from the Test Simulation : Rag-doll which you get when you press tab inside your SOP level.

    Secondly, If this still does not work with that try adding collision objects to all the bones between the end and the start of the hierarchy that you have selected to be rag-dolls.


  3. The hda and also the codes are on GitHub link you'll find both of them in the video description. I used python for export and Vex to compile the matrix into the Octane readable matrix format.

    Let me know if it works.

    Cheers,

    Manish


  4. On 5/14/2016 at 7:53 PM, malexander said:

    The syntax for UDIM files is filename%(UDIM)d.ext where %(UDIM)d takes the place of the frame number. So if you had image1001.exr, image1002.exr, it'd be image%(UDIM)d.exr.

    The texture fields in the principled shader accept this format, and if you're writing your own shader, the Texture VOP has a parameter to expand UDIM sequences which you'll want to enable.

    Thanks!

    But what if I am using and arnold standard shader?


  5. Hi,

    I am trying to paint on specific areas of my shards and scatter points on them using for each loop and then further fracture them.But the problem is I painted the areas with red and scatter is not able to use the attribute Cd to scatter in only the painted areas.

    Also, I wanted to randomize the seed of the scatter inside the for each loop per shard.

    Hope you guys could help me with the same.

    Thanks,

    Manishkumar M.

×