Justin Keil

jtk700cln

About Me

EXPERTISE
VFX Artist
INDUSTRY
Film/TV

Connect

LOCATION
United States
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Usd preview shader - displacement tiling not functional Dec. 4, 2024, 10:29 p.m.

Curious about the status of this.
To my knowledge the usd preview shader doesn’t inherently support displacement tiling. Working with some megascans materials with multitile image inputs and the displacement does not update with everything else. Does anyone have a workaround for this? Perhaps disabling viewport displacement will suffice in the interim but ya- would love to some insights on this functionality or lack thereof. Im not sure how to properly decouple the rendertime displacement from the preview displacement if that is the only solution available.

Thanks!

Strip file path, return result as referenceable expression Nov. 2, 2024, 9:49 p.m.

So I figured it out--
I made some changes to the pythons script:
the mains script now saves the value result as a new string parameter

i have this script running as a callback script whenever the user changes the file directory.
The file directory gets stripped. The result is added as the new string value for a parameter, and I can then copy and paste this as a reference where needed!

Woot!

Strip file path, return result as referenceable expression Nov. 2, 2024, 4:57 p.m.

Trying to set up an interface for a user.
On the parameter interface I have:
1) a parameter set up to retrieve a directory, example:
D:/MEGASCANS_LIBRARY/Downloaded/surface/ground_forest_vlzjadflw/

2) A multi string python expression that strips everything but the last phrase: vlzjadflw, it is a function that can be called via kwargs.


import hou
import os

def strip_dir_call(node):
# Get the current node
node = hou.pwd()

# Get the parameter (channel) object
parm = node.parm("mat_2_dir")

# Get the value of the parameter
value = parm.eval() if parm is not None else ""

# Extract the last folder name from the evaluated value
last_folder = os.path.basename(os.path.normpath(value))

# Split the last folder by underscore and get the last segment
last_phrase = last_folder.split('_')

# Print the last phrase
print(last_phrase)

# Call the function

strip_dir_call(kwargs)



3) This expression is being called on by another parameter celled execute, which is a simple toggle. When I look at the python console I can see the result that I am hoping for.

vlzjadflw
vlzjadflw
vlzjadflw


The issue is, I want to use this returned value elswhere, ideally as a relative reference in a file name path in a separate node. I'm not finding a logical way to do this last step though. H

Any help would be appreciated. Thank you!