z3r0 Posted February 18, 2011 Share Posted February 18, 2011 (edited) Hi, I'm trying to load multiple images from a directory and map them to multiple copies/instances of a cube (cube attached to points on a grid) which I later want to attach to particles or animate. The images would need to map to only one face of the cube and not repeat. I'm trying to avoid manually mapping each image to each cube as I don't know the exact number of images in the folder. I found these that might help: Image sequence and sprites TV copy For example look at the image grid here: (Jump to 2:51)Each image would need to be manually added to each square. Now if I could automatically load them from a directory (or image sequence) to each corresponding slot I would save lots of time. Each slot would be a cube (instanced on grid), would love to attach each instance to particles and animate. Any ideas on how to approach? Thanks! Edited February 18, 2011 by z3r0 Quote Link to comment Share on other sites More sharing options...
nanocell Posted February 18, 2011 Share Posted February 18, 2011 (edited) Have a look at this: The example hip file there shows you how to override material parameters on a per-point/instance basis. Which is most likely what you want / need for your random textures. Remember, to make things really easy for yourself, keep your texture names consistent, for example: - name all your images numerically, like: 0.exr, 1.exr, 2.exr, etc. This will allow you to override, say, a texture parameter on your shader with something like: /my/random/pics/$PT.exr Obviously, the texture name expression will become a little more involved but the above is just to get you started. HTH. CheerZ, Van Aarde. Edited February 18, 2011 by nanocell 1 Quote Link to comment Share on other sites More sharing options...
Ryan Posted February 19, 2011 Share Posted February 19, 2011 Here is a quick example I came up with. Using the Material SOP override mentioned above with local variables. Hope this helps. randomTextures.hip 2 Quote Link to comment Share on other sites More sharing options...
z3r0 Posted February 20, 2011 Author Share Posted February 20, 2011 Great find Van! This will definitely help, I'll post progress as soon as I can! -z3r0 Have a look at this: The example hip file there shows you how to override material parameters on a per-point/instance basis. Which is most likely what you want / need for your random textures. Remember, to make things really easy for yourself, keep your texture names consistent, for example: - name all your images numerically, like: 0.exr, 1.exr, 2.exr, etc. This will allow you to override, say, a texture parameter on your shader with something like: /my/random/pics/$PT.exr Obviously, the texture name expression will become a little more involved but the above is just to get you started. HTH. CheerZ, Van Aarde. Quote Link to comment Share on other sites More sharing options...
z3r0 Posted February 20, 2011 Author Share Posted February 20, 2011 Thanks Ryan! I plan at looking at this tomorrow, I'll post updates! -z3r0 Here is a quick example I came up with. Using the Material SOP override mentioned above with local variables. Hope this helps. Quote Link to comment Share on other sites More sharing options...
z3r0 Posted February 22, 2011 Author Share Posted February 22, 2011 I'm planning on doing some particle morphs as well with the images: Particle Morphing Here's a sample video: Well at least I think its particle morphing! -z3r0 Quote Link to comment Share on other sites More sharing options...
z3r0 Posted February 28, 2011 Author Share Posted February 28, 2011 Guys, It looks like I would need to have each plane copied to each particle unless I copy one plane then attach different textures on a per particle basis. This hipnc file looks handy: Copying different geometry per particle/ 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.