ITdreamer Posted December 1, 2008 Share Posted December 1, 2008 (edited) Hello I have a sequance of 100 images, which can be looped. I use this sequence as a texture for sprites. But what I need to do is I want different starting frame for every single sprite. How can I create this? Edited December 1, 2008 by ITdreamer Quote Link to comment Share on other sites More sharing options...
aracid Posted December 1, 2008 Share Posted December 1, 2008 hey hey u could use the expression "wrap" in combination with padzero so the wrap will wrap ($F, 5, 10) : Creates a sawtooth function between 5 and 10 padzero(5, 126) = 00126 so u could have something like padzero (4, wrap ($F+(rand ($ID)*50), 1,100)) therefor u can have padding with a sawtooth iteration through ur sprite. hope this helps Quote Link to comment Share on other sites More sharing options...
ITdreamer Posted December 1, 2008 Author Share Posted December 1, 2008 Thanks a lot, it helped! Quote Link to comment Share on other sites More sharing options...
ITdreamer Posted December 1, 2008 Author Share Posted December 1, 2008 But where I need to write this expression? If I try to write it in SHOPs, in the material's path to the texture it doesn't understand $ID. Quote Link to comment Share on other sites More sharing options...
aracid Posted December 3, 2008 Share Posted December 3, 2008 But where I need to write this expression? If I try to write it in SHOPs, in the material's path to the texture it doesn't understand $ID. Hey hey This seemed to work for me $HOME/Downloads/Tolpa/images/wlk000_Dave/lr_color/lr_CW_Dave`padzero (4,wrap ($F+ (rand ($ID)*100),1,100))`.rat I quickly built up a scene that does just this hope this helps sprite.hip Quote Link to comment Share on other sites More sharing options...
ITdreamer Posted December 3, 2008 Author Share Posted December 3, 2008 (edited) Thanks for your time. Scene renders. But if you look closely to your render (your sprites are very small and maybe you didn't check that), you'll see that all sprites have the same texture. And it seems to me that this doesn't work. Edited December 3, 2008 by ITdreamer Quote Link to comment Share on other sites More sharing options...
aracid Posted December 4, 2008 Share Posted December 4, 2008 Thanks for your time.Scene renders. But if you look closely to your render (your sprites are very small and maybe you didn't check that), you'll see that all sprites have the same texture. And it seems to me that this doesn't work. mmm, im not sure I agree, with the sequence not working. try deleting some files from the sequence, they seem to disappear out of the render, thats how i did the test. as for the scale, yeah, I just quickly built the scene to show u how point attributes can be passed to the sprite procedural, allowing u to override material attributes on a per particle basis. let me know if deleting the files didnt work for u Quote Link to comment Share on other sites More sharing options...
ITdreamer Posted December 8, 2008 Author Share Posted December 8, 2008 Yeaaaa! I did it :-) I understood how to override the SHOPs attributes. Thanks for help to everyone. Quote Link to comment Share on other sites More sharing options...
aracid Posted December 8, 2008 Share Posted December 8, 2008 hey man well done ! as a matter of interest, did u happen to come up with a more cunning way to achieve this or did point attr overriding do the trick ? Quote Link to comment Share on other sites More sharing options...
ITdreamer Posted December 9, 2008 Author Share Posted December 9, 2008 I've created few point attributes which create a path to the texture with a different starting frame. And than it overrides SHOPs attributes. This way is good, but not so flexible. For example, if I want more than 5 kinds of textures, I need to recreate a script little bit. So, now I am working on a python SOP, which will do everything automatically with any number of textures. I'll post the results. Quote Link to comment Share on other sites More sharing options...
burns Posted February 22, 2010 Share Posted February 22, 2010 I've created few point attributes which create a path to the texture with a different starting frame. And than it overrides SHOPs attributes. This way is good, but not so flexible. For example, if I want more than 5 kinds of textures, I need to recreate a script little bit. So, now I am working on a python SOP, which will do everything automatically with any number of textures. I'll post the results. Hi, ITdreamer, I'm trying to achieve the same thing. have a sprite seq start depending on $ID. I couldn't figure it out. Could post a simple scene? I'm kinda new to houdini thanks Quote Link to comment Share on other sites More sharing options...
rob Posted February 23, 2010 Share Posted February 23, 2010 (edited) Hi , do a search for my posts in the wip section I built a sprite crowd tool that uses lots of techniques rob Edited February 23, 2010 by rob 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.