Jump to content

Same UVs-same object multiple times-different textures (UPDATE)


Justin K

Recommended Posts

Hey, 

I have an object made up of 6 different poly groups--6 petals in this case.  Each of the petals has the same uv set as all the others.    The goal is to assign different textures to each petal.   Im leveraging some of houdini capabilities to build venation systems and then sending these venation maps out as displacement maps.  These are then driving materials and textures made in substance designer.  My question though is, at some point all of these textures are gonna have to come back into the project right?  

So lets say eventually this flower with 6 petals is iterated 180 times-- so 1080 petals - this then becomes 1080 texture maps --   most likely will not be that abusive with the amounts but still you get the idea.  

 

To apply a different material to each petal id have to split every single petal off--either inside an object or outside (doesnt really matter--same principle) and give it its own material and texture assignments.  Getting clever with expressions will probably alleviate some of the work here, but Im just wondering (1), if there is a methodology for this I should be following --im sure in games they do this type of procedural texture variation stuff all the time, and (2),  is the render speed gonna be slow if am using so many shaders- as opposed to perhaps a udim tile workflow with 1 shader?  --setting up udims would be tedious as well, but overall, just looking for some suggestions...

 

Key thing--one uv set, same type of material, but different texture sets.  

Thanks!!

 

 

Edited by Justin K
Link to comment
Share on other sites

18 hours ago, Jesper Rahlff said:

you should just use one shader and then each of your petals should have an unique id attrib that defines who they are. You can then name your map albedo_id, and in the shader load in the texture path, but based on the id it reads its own map.

Hey Im actually having some trouble implementing this--where does the id attribute have to live on the petals to be accessed by the shader?  Also, just doing a stress test, if i put all my albedos in a folder,

 

example:

albedo_1

albedo_2

albedo_3

 

i can then read them in as a sequence, but this just changes which texture is called per frame.  How do i set it up so that the petals with their ids recognize the textures coming from the folder based on their id?  

Sorry for the trouble,

ill send over a small scene so you can check this out if you need it.  

Thanks!

Justin

Edited by Justin K
Link to comment
Share on other sites

18 hours ago, Jesper Rahlff said:

you should just use one shader and then each of your petals should have an unique id attrib that defines who they are. You can then name your map albedo_id, and in the shader load in the texture path, but based on the id it reads its own map.

I think im close to the answer looking through some old posts: https://www.sidefx.com/forum/topic/50236/

Edited by Justin K
Link to comment
Share on other sites

2 minutes ago, toadstorm said:

i wrote this test file a while back to experiment with GL tagging in shaders, but it also shows you how to use the Material SOP to control textures per-primitive based on an existing string attribute.

 

opengl_tagging_toadstorm.hip

Saw this while writing the other response--thank you!  Looking at your file now

Link to comment
Share on other sites

Hey all, as I said yesterday I have everything working (well from a technical perspective lol) for my maps thanks to all your help. 

 

I am doing look dev now, and the feedback is well....a bit slow.   It's not like I'm being brutal with settings either--I just have one flower I'm look-deving.    Im doing my due diligence and am gonna try to use mantra for this--however--as an example- a scene with just a 1k environment light+one area light, one flower without material overrides,  1 displacement map for theflower, and two shaders (one for a sphere sitting between the petals and the area light, and one for the petal) is taking 10 minutes to render with standard mantra settings and a 1280x720 camera :huh:????     Displacement effect scale is at .002- the geo is low res, transparency is set to .1152 --slightly translucent-- and the subsurface is set fully to 1.   Im not sure this is gonna be all that efficient, unless mantras optimization starts to showcase itself when the amount of geometry significantly increases......

 

 

My question is would it be worth switching over to Arnold for this.  Arnold has some really nice translucency capabilities-- and I have some decent experience with it for a paper project I did a while big. 

However, the big question then becomes:  

 can I use these material override setups inside a third party renderer?  or is this just a mantra specific technique?  

 

Thank you!

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