Jump to content

Export HDA with With texture


Recommended Posts

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?...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
 
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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". 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...