(Resolved) Can't figure out Multi ID Texture

Hey guys,

I’m trying to randomly apply multiple textures to books I scattered with copy to points, randomly rotated with a for each loop, and unpacked. I followed this thread: https://forums.chaosgroup.com/forum/…98#post1071698 and tried using Multi ID Texture to try and add different diffuse textures to each individual book with the sampler node and random_by_polyshell.

It seems to work, except I can only get at most 2 textures to show on the books out of the 4 I’m testing with. Ideally, I’d have 20 different textures for the diffuse and bump of the material, to create a wide variety of books. Any help trying to make this happen would be greatly appreciated.

I’m using V-Ray Core, 5.00.50 and Houdini 18.5.351


Hey @charles_breach ,

unpacking the geometry will cause V-Ray to treat all the books as a single mesh, thus none of the “random_by” options on the Sampler will give you what you’re looking for - a single value per book.
The easiest thing to do would be to add a float attribute on the packed primitives, before unpacking them, and set it to e.g. rand(@ptnum).
You can then use this attribute in material network, pass it through a V-Ray Random VOP and plug that into the Multi ID texture.

I’ve attached an example scene here: https://drive.google.com/file/d/15Id…ew?usp=sharing

PS: Performance-wise it would be better to keep the books as packed primitives - the VRScenes would be smaller in case you’re planning to render on the farm, and the time to first pixel will be lower too because V-Ray will only need to write out the unique geometry and the instance points instead of the entire scene.

Hope that helps!

That did it! Thank you for helping me with something so basic. The example scene helped a lot. Hopefully, there are other beginners like myself out there who’ll find this helpful!

cheers.

Glad I could help.

There’s also an example scene for more complicated workflows where you want to target a particular named primitive on the documentation page for the Pattern ID texture: V-Ray for Houdini

Best regards!