evan mathis

evanmathis

About Me

EXPERTISE
Generalist
INDUSTRY
Film/TV

Connect

LOCATION
Los Angeles, United States

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Localizing reference textures... there has to be a better way March 30, 2024, 7:04 p.m.

Hm. component output isn't working as well as I'd hoped.

But, there is a "modify paths" lop [www.sidefx.com]

It even has * almost * the solution i'm looking for on the manual page:

Change all UsdVolFieldAsset file paths to point inside a volumes subdirectory

 

if attributepath.endswith('.filePath'):
    parts = assetpath.split('/')
    return '/'.join(parts[0:-1]) + '/volumes/' + parts[-1]
return None

And while I can make sense of what that does, I have no clue how to adapt it to my purposes.

Localizing reference textures... there has to be a better way March 30, 2024, 4:57 p.m.

i'm using 20, i'll have to look at the component output node. that might be the answer i was looking for, thanks!

Localizing reference textures... there has to be a better way March 30, 2024, 3:32 p.m.

I'm packaging up some files for remote render, and moving all of my USD references and textures to $HIP/USD and $HIP/USD/textures

But because I'm moving the locations, the USD files reference just fine, but the textures are all still linking back to their absolute paths.

My solution so far is to use the editmaterial lop. This is very manual and tedious, although it works. When, like I have, a scene with hundreds of references loaded from several local network locations, this will take me a long time to sort out via the manual method.

I have some ideas, but bear in mind I'm largely an idiot that knows enough Houdini to be a pain in the ass to actual power users.

So in the reference LOP there is an inputs:file parameter that contains the file path.
In this case, it is formatted like this:
@../../wrong_texture_directory/4k/basecolor.png

Is there a way to localize this on load?

Were I a python wizard I'd whip up something to go in the reference hda that does something along the lines of

filename = "whatever/python/uses/to/strip/out/everything/before/the/finalname.png"
texturePath="../correct_texture_path/4k/"
inputs:file = @texturePath+filename

I am useless with python unfortunately.

Can I edit the mtl.usdc file? I've opened one in a text editor and it looks like compiled code that I have no idea what to do with and / or business trying to mess with.