Farid Posted April 1, 2008 Share Posted April 1, 2008 Hi I have little question if sombody can help me it'll be great So,my problem is that i wanted to instance a plane wich have a image sequences texture on it with the copy node it works all fine but i just want to offset the frame so that i don't get the same behaviour on all the particles,because what i have until now is the same sequences playing at the same time on all over the instanced grid. Thanks for your time cheers Farid Quote Link to comment Share on other sites More sharing options...
rdg Posted April 1, 2008 Share Posted April 1, 2008 HiI have little question if sombody can help me it'll be great So,my problem is that i wanted to instance a plane wich have a image sequences texture on it with the copy node it works all fine but i just want to offset the frame so that i don't get the same behaviour on all the particles,because what i have until now is the same sequences playing at the same time on all over the instanced grid. Thanks for your time cheers Farid There are many ways to get this done. One is to create a attribute on your plane that is named like the diffmap-parameter of your shader. Using the stamp function you can then stamp a random number into the image path, like: $HIP/../tex/myimg.`round(rand(stamp("../copy1", "pnum", 0) * 10.01) * [max])`.png [max] is the highest number you want to insert $HIP/../tex/ needs to be replaced by a path that makes sense in your pipeline myimg.[n].png is the base name of your sequence [n] gets replaced by the stamped random number this assumes that your images are number like myimg.0.png, myimg.1.png, ... the shader will then use for every plane a random image. But there are other ways, too. Depending on how many planes you got, you might want to take a look at "instancing", which is much better for complex setups. Quote Link to comment Share on other sites More sharing options...
SpencerL Posted April 1, 2008 Share Posted April 1, 2008 I havent tested this, but where you are bringing in your image sequence, you will want something like this: myImgSeq.`padzero(4, $F+fit01(rand($ID), -10, 10))`.tif the 4 is if your frames are padded. so adjust that accordingly Quote Link to comment Share on other sites More sharing options...
Farid Posted April 1, 2008 Author Share Posted April 1, 2008 Thanks for the quick answer,i'll give it a try. I used just a regular layered surface shader,i called the image sequences,and what i wanted is just offseting the frame so that each instance start diffently (frame offset),i tend to use in maya the spriteNum to get a random starting frame and of course the ability the loop the sequence. I hope i can see a hip file posted so that i can stop asking to much,wich shader to use,how to loop the sequences etc... Thanks again to all cheers Quote Link to comment Share on other sites More sharing options...
rdg Posted April 1, 2008 Share Posted April 1, 2008 I havent tested this, but where you are bringing in your image sequence, you will want something like this: myImgSeq.`padzero(4, $F+fit01(rand($ID), -10, 10))`.tif the 4 is if your frames are padded. so adjust that accordingly I missed/misinterpreted the sequence part - so this is the way too go. Maybe add a clamp() to catch nonexistent frames? 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.