Jump to content

Sprite Rendering Mantra


Recommended Posts

You are Welcome @simonfarussell..
Now You can Start Some New Topic with Name lets See..." Tricks with Chops" and share some knowledge when you have Time. B):P

...Here you have some codes from Asia . that i use more in combination with Chops and Points..
 

int idx = floor(7*rand(@ptnum)+1);
// diff_colorTextureopacity_colorTexture
// @material_override
s@material_override = 
"{'diff_colorTexture':\"$HFS/houdini/pic/butterfly"+
itoa(idx)+".pic\",'opacity_colorTexture': \"$HFS/houdini/pic/butterfly"+
itoa(idx)+".pic\",}";
//classicshader
s@shop_materialpath = "/mat/classicshader1";
i@butterfly = @ptnum;
4@mat = maketransform(@N,@up,@P);

and rotation

v@P -= v@cen;
int id = @ptnum % 6;
float off = 2*PI*rand(i@butterfly);
float freq = 10+5*rand(i@butterfly);
if(id == 0 || id == 3){
    float ang = 30*sin(freq*@Time+off);
    vector4 quat = quaternion(radians(ang),@N);
    @P = qrotate(quat,@P);
}else if(id == 2 || id == 5){
    float ang = -60*sin(freq*@Time+off);
    vector4 quat = quaternion(radians(ang),@N);
    @P = qrotate(quat,@P);
}
@P += v@cen;


 

Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...