Rob P Posted January 18, 2016 Share Posted January 18, 2016 Hi, I'm doing a simulation with lot of books in houdini and I have to render it in Vray Maya. I want to assign them random books textures. The first thing I do was to separate each books during the export. So in maya I have one .abc with one object per books inside. The problem is this method is too slow when the books number is too high. I was wondering if there's a way to assign my texture randomly in houdini and export an HDA of the simulation with the texture inside. Any ideas?... Quote Link to comment Share on other sites More sharing options...
fathom Posted January 18, 2016 Share Posted January 18, 2016 how many different textures? you could do a udim setup and just offset your uv's to land randomly in each tile. so if you have 75 different book textures, you'd randomly generate a number between 0 and 74. let's say it's 35. you add 3 to the v coordinate and 5 to the u coordinate for that instance of your book geo. then you name all your textures something like "bookTexture.####.tif" where #### is your udim coordinate and would range between 1001 and 1075 (yes, it's offset by 1 if i recall correctly). in vray, you call your shader with the udm tab inserted (i think it'd be "bookTexture.{UDIM}.tif") and you should be able to pull in all your books with a single abc and a single material. Quote Link to comment Share on other sites More sharing options...
Rob P Posted January 18, 2016 Author Share Posted January 18, 2016 Thank for your answer fathom, I have Something like 100 textures. Ok, I understand your idea. I have multiple Sim with different books number and all my books have the sames UV so I would like a procedural system. I have an attribute name per books I would like a modulus but I never done this before. Quote Link to comment Share on other sites More sharing options...
fathom Posted January 19, 2016 Share Posted January 19, 2016 it should be pretty simple. but just keep in mind you're mimicking the udim system so you can utilize it in vray. google udim and mari and i'm sure you'll get lots of hits about how things are layed out and it might help explain the system in more detail. Quote Link to comment Share on other sites More sharing options...
Rob P Posted January 19, 2016 Author Share Posted January 19, 2016 I succeed to assign random textures according to a stamp attribute with only on shader But when I import my HDA in Maya I lost my textures. Is it an attribute mistake that maya can't read ? Or is it just impossible to do it this way?.. according to Quote Link to comment Share on other sites More sharing options...
fathom Posted January 19, 2016 Share Posted January 19, 2016 so when you say textures, you mean the actual material or the uv coordinates? is the hda running the sim or is it just to get the data into maya? you could run your sim in houdini and export as an alembic, then import that alembic into maya. then you should be able to apply a vray material to it and supply the UDIM tag to the texture in vray. Quote Link to comment Share on other sites More sharing options...
Rob P Posted January 19, 2016 Author Share Posted January 19, 2016 (edited) I mean my shader's diffuse. The hda runs a file which read a baked sim. Edited January 19, 2016 by Rob P Quote Link to comment Share on other sites More sharing options...
fathom Posted January 19, 2016 Share Posted January 19, 2016 if it's already baked, then don't bother with an hda (which i don't think can make maya materials). use houdini to generate your books in an alembic file with all the uv's set up and then just load them into maya as a single abc file. then do everything in maya/vray-native operations. Quote Link to comment Share on other sites More sharing options...
Rob P Posted January 19, 2016 Author Share Posted January 19, 2016 Houdini engine can convert his shader to a Blinn, with texture file in the good input I tried it. Now I'm trying to export one Shader with multiple diffuse Texture file cause I don't want to create 100 shaders.. Quote Link to comment Share on other sites More sharing options...
fathom Posted January 19, 2016 Share Posted January 19, 2016 you're making it more complicated than it needs to be. vray textures understand udim coordinates. read in your geo as an abc. make a vray material with a texture on the diffuse. the bitmap for the texture would be "myBookTexture.<UDIM>.tif" (assuming your book textures are called "myBookTexture.1001.tif" thru "myBookTexture.1100.tif". Quote Link to comment Share on other sites More sharing options...
Rob P Posted January 20, 2016 Author Share Posted January 20, 2016 My bad ! I just read back the conversation and I realise that I have misunderstood your first answer. Yes if I clamp my random tiling distribution to my final textures number, I can have only one diffuse map with all my books texture on each tile. Thank you for the tips fathom I'm gonna apply it! 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.