Thomas Mangold

Tom Mangold

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Proxy mesh workflow Nov. 15, 2024, 4:58 a.m.

I highly appreciate your help!

Will still have to check the files though.

I made some progress in the meantime and I guess it's been your advice to "import as references" which made the difference. Suddenly it works. The python code with "AddReference()" does the job, "overwriting" the current low res mesh with the link to the high res one. Will post my code/scene later on so that hopefully somebody can profit from it too or tell me that this is the utterly wrong way to do it! : )

Proxy mesh workflow Nov. 13, 2024, 6 p.m.

P.S.: Can my problem be that I'm trying to sublayer a mesh which is probably not a layer in terms of the USD definitions? I also recreated the stage with an inline sop loading the .usd high res files. Just without the proxy meshes.

/
____/parking_lot (xform)
________/cars (xform)
____________/car_a (mesh) -> high res mesh, purpose "render"
____________/car_b (mesh) -> high res mesh, purpose "render"
____________/...

Using a sublayer node with the stage tree as seen in my former post in the 1st input and this tree in the second input also does nothing, EXCEPT from coloring the "cars" xform" green.

I though it would override the car_a and additional cars as well. : (

Proxy mesh workflow Nov. 13, 2024, 10:23 a.m.

Thanks so much! Again! : )

The only thing which stays unresolved yet is that my sublayer mesh doesn't replace the imported sop mesh. I thought by adding a sublayer Houdini/USD would check for another layer with the same name and replace it.

My stage looks a bit like this:

/
____/parking_lot (xform)
________/cars (xform)
____________/car_a__proxy (mesh) -> low res mesh, purpose "proxy"
____________/car_a (mesh) -> low res mesh, purpose "render"
____________/car_b__proxy (mesh) -> low res mesh, purpose "proxy"
____________/car_b (mesh) -> low res mesh, purpose "render"
____________/car_c__proxy (mesh) -> low res mesh, purpose "proxy"
____________/...

This got created by using a sopimport LOP node with import path prefix set to "/parking lot/cars". The meshes do carry the name attributes "car_a" and so on.

Now I use the sublayer LOP and import the high res mesh with the name attribute "car_a". Or the python code you posted. Same result.


I thought that it would replace my low poly mesh since it got the same name attribute. But it doesn't. It just adds it to the stage.

/
____/Geometry
________/car_a
____/parking_lot (xform)
________/cars (xform)
____________/car_a__proxy (mesh) -> low res mesh, purpose "proxy"
____________/car_a (mesh) -> low res mesh, purpose "render"
____________/car_b__proxy (mesh) -> low res mesh, purpose "proxy"
____________/car_b (mesh) -> low res mesh, purpose "render"
____________/car_c__proxy (mesh) -> low res mesh, purpose "proxy"
____________/...


BUT if I save the high res mesh with the name "/parking_lot/cars/car_a" it replaces the low res car like desired.

The problem is that I might want to place "car_a" in another scene not in a parking lot between other cars, but in a landscape.

/
____/landscape
________/car_a

So saving my high res asset with an absolute path is obviously not the best choice, since the car doesn't really now yet where it's going to be placed.

What I expect the tree to look like is

/
____/parking_lot (xform)
________/cars (xform)
____________/car_a__proxy (mesh) -> low res mesh, purpose "proxy"
____________/car_a (mesh) -> high res mesh, purpose "render"
____________/car_b__proxy (mesh) -> low res mesh, purpose "proxy"
____________/car_b (mesh) -> high res mesh, purpose "render"
____________/car_c__proxy (mesh) -> low res mesh, purpose "proxy"
____________/...

An alternative would be to already pass on an ".usd" path to the low res prims as a reference, but this seems to be not possible as far as I can tell.

Sorry for the underscores, but the spaces were removed.