I´ve updated the file with some tests with VEX.
I believe there is an odd behavior with the “usd_setvisible” VEX function. It creates the time sample when the visibility is “invisible”, but not for when It should be “inherited”.
I´ve forced the values on the string attrib “visibility” (inherited/invisible) and It works fine.
Found 185 posts.
Search results Show results as topic list.
Solaris and Karma » No time samples with VEX in Prune LOP? [BUG?]
-
- guilhermecasagrandi
- 275 posts
- Online
Solaris and Karma » No time samples with VEX in Prune LOP? [BUG?]
-
- guilhermecasagrandi
- 275 posts
- Online
Hi,
I´ve attached a file in which I want to prune the primitives based on a primvar.
When I use keyframes on the prune LOP, It authors the time samples on the usd file.
When I use VEX with the prune LOP with an animated primvar to prune, the resulting usd file doesn´t have the time samples in the visibility attribute.
I´ve searched the docs and I didn´t find a way to force the creation of time samples in the attribute. I believe LOPs does this automatically, right?
Anyway, are there problems with my approach or It is a bug?
I´ve attached a file in which I want to prune the primitives based on a primvar.
When I use keyframes on the prune LOP, It authors the time samples on the usd file.
When I use VEX with the prune LOP with an animated primvar to prune, the resulting usd file doesn´t have the time samples in the visibility attribute.
I´ve searched the docs and I didn´t find a way to force the creation of time samples in the attribute. I believe LOPs does this automatically, right?
Anyway, are there problems with my approach or It is a bug?
Solaris and Karma » Configuring file sequences on a layer
-
- guilhermecasagrandi
- 275 posts
- Online
mtucker
If you want a separate USD file per frame, value clips is the only way to combine them back into a single animated clip at composition time. I would like at some point to have the Value Clip LOP capable of doing the “stitching” step automatically as part of the USD ROP save step, but that's probably a ways off.
If you don't specifically want a separate USD file per frame, you can create a massive single USD file which is very efficient to read in (USD only loads the data for the time samples that it needs at any given time). This is much easier than working with value clips.
Sure, but a massive file is not too good when sending to a cloud farm or for working remotely through dropbox or something alike, because It has to download the entire file to make It available for the user.
Solaris and Karma » Configuring file sequences on a layer
-
- guilhermecasagrandi
- 275 posts
- Online
jsmackguilhermecasagrandijsmackguilhermecasagrandijsmackHi jsmack, thanks for the reply. But can´t I do that in the same LOP network, right? (so Solaris would and up creating all the necessary dependencies when generating the resulting usd file)
Sequences have to be combined with usd stitch clips or with a valueclip prim.
In my understanding, I need to do that manually, and then get the stitched usd back to LOPs, right?
Correct, it has to be a two-step process. Mark, maybe you can clarify? Value clips are a dark art that eludes my understanding.
The (two step) process is ok for me, but It would be really usefull if we could set up this kind of info in the network (with nodes) and solaris would end up building the “correct” usd file. This “two-step” process makes the workflow not so procedural when we are getting geo from SOPs, because we must bake the sequence of usds before rendering (or adding switchers in the network) to test the render befor creating the “final” usd file.
It has to be two step because creating the manifest or stitching requires opening all of the frames, whereas the usd rop operates frame-by-frame.
Well… so that´s It. Thanks for the answers!!
Solaris and Karma » Configuring file sequences on a layer
-
- guilhermecasagrandi
- 275 posts
- Online
jsmackguilhermecasagrandijsmackHi jsmack, thanks for the reply. But can´t I do that in the same LOP network, right? (so Solaris would and up creating all the necessary dependencies when generating the resulting usd file)
Sequences have to be combined with usd stitch clips or with a valueclip prim.
In my understanding, I need to do that manually, and then get the stitched usd back to LOPs, right?
Correct, it has to be a two-step process. Mark, maybe you can clarify? Value clips are a dark art that eludes my understanding.
The (two step) process is ok for me, but It would be really usefull if we could set up this kind of info in the network (with nodes) and solaris would end up building the “correct” usd file. This “two-step” process makes the workflow not so procedural when we are getting geo from SOPs, because we must bake the sequence of usds before rendering (or adding switchers in the network) to test the render befor creating the “final” usd file.
Solaris and Karma » Configuring file sequences on a layer
-
- guilhermecasagrandi
- 275 posts
- Online
jsmackHi jsmack, thanks for the reply. But can´t I do that in the same LOP network, right? (so Solaris would and up creating all the necessary dependencies when generating the resulting usd file)
Sequences have to be combined with usd stitch clips or with a valueclip prim.
In my understanding, I need to do that manually, and then get the stitched usd back to LOPs, right?
Solaris and Karma » Configuring file sequences on a layer
-
- guilhermecasagrandi
- 275 posts
- Online
Hi,
I´m rendering a crowd sim with Karma, and usually I create the configure layers pointing to the right locations so I can bake the usd to the disk and then render It using PDG.
The problem arises when using a sequence of .usd in the layer configure LOP. Is It possible to do this kind of workflow or do I have to bake the sequence on disk, create another single .usd with “stitch clips” and sublayer It in the stage?
I´m rendering a crowd sim with Karma, and usually I create the configure layers pointing to the right locations so I can bake the usd to the disk and then render It using PDG.
The problem arises when using a sequence of .usd in the layer configure LOP. Is It possible to do this kind of workflow or do I have to bake the sequence on disk, create another single .usd with “stitch clips” and sublayer It in the stage?
Solaris and Karma » Copy2Pts x PointXform [Bug] [SOLVED]
-
- guilhermecasagrandi
- 275 posts
- Online
briansThank you guys for the awesome support!!! (as always).
Hi guys
The spotlight transform-scaling bug has been fixed and will be out in the next nightly build.
Thanks!
Solaris and Karma » Copy2Pts x PointXform [Bug] [SOLVED]
-
- guilhermecasagrandi
- 275 posts
- Online
mtucker
The bug is that there is any scale being set at all. This is happening because we are doing some internal orientation calculations at half-float precision in the Instancer LOP. This problem will be fixed in tomorrow's build.
I don't know how to judge if karma is responding “correctly” to these scale values…
Thanks again!
At least in the flipbook, I don´t see the scaling effect, only in the render (with Karma).
Solaris and Karma » Copy2Pts x PointXform [Bug] [SOLVED]
-
- guilhermecasagrandi
- 275 posts
- Online
jsmackYes, and the copy2points behaves the same in the viewport, only in the rendered images It behaves differently.
That's really strange. I modified the pointxform side to see if putting the transform on the reference instead of the light produced the same result but it was still normal. The matrices are slightly different, but only after the 5th or 6th sig fig.
Solaris and Karma » Copy2Pts x PointXform [Bug] [SOLVED]
-
- guilhermecasagrandi
- 275 posts
- Online
Hi,
I´m having problems with copy2points in LOPs when copying spot lights.
There is an animated “N” attrib controlling the direction of the light. In the viewport It seems fine, but when rendering, the direction of the light flickers.
I´ve done the same thing using the Point Xform and the render behaves like the viewport, so I´m thinking this is a bug. Can anyone confirm It?
Anyway, is this approach fine? Does It have a big performance hit while creating primitives when compared with just changing their attributes?
I´m having problems with copy2points in LOPs when copying spot lights.
There is an animated “N” attrib controlling the direction of the light. In the viewport It seems fine, but when rendering, the direction of the light flickers.
I´ve done the same thing using the Point Xform and the render behaves like the viewport, so I´m thinking this is a bug. Can anyone confirm It?
Anyway, is this approach fine? Does It have a big performance hit while creating primitives when compared with just changing their attributes?
Edited by guilhermecasagrandi - Oct. 28, 2020 21:16:40
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
rafalguilhermecasagrandiThat was fixed just a few days ago, so should work in a daily build.
Changing the setup to 1 assign material doesn´t solve the problem,
Also, both `@foo` and `usd_attrib('foo')` read the attribute value directly from the primitive. We may need `usd_primvar()` to evaluate the inherited primvar from parents.
Assign Material LOP creates new Material prims (that specialize the base material) and authors new parm values (overrides) on it, and this ability makes it suitable for overriding parameters of materials that don't have a primvar reader to drive the variation. But, since you are using principled shader, you should be able to use primvars directly on the geoemtry to drive the variation. In this case, you can use Wrangle LOP to author the `primvars:baseColor_texture` on skin of the agents (I think).
Thanks Rafal,
But the “usd_attrib” VEX function doesn´t seem to get the inherited attribute either (at least for primvars, since we get those kind of attribs with the copy to points LOP).
If you need, I can send you another file.
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
mtuckerThanks! Sorry about the stash thing, I should´ve checked that before sending.
mat_overrides.hipnc (1.5 MB)
I wasn´t sure on how solaris was handling the overrides. I thought they were just attributes set on the primitives, not new materials.
Changing the setup to 1 assign material doesn´t solve the problem, but since now I know how Solaris is doing that (thanks again for the info), I found a solution: I duplicated the material and changed the name. It´s not as clean as It could be, but It's working for now!
I´m attaching the agents here, so you can further dig into the file if you want.
Thanks again!
Edited by guilhermecasagrandi - Oct. 23, 2020 09:12:48
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
Here is the scene. I can´t share the textures, but I´ve stashed the agents so anyone that wants to help can visualize It.
1. In the first image, the assign material is overriding the textures of the skin of the agent “claudia”. We can see the binding of the texture in the scene graph details.
2. In the second image, the target is different, It targets the skin subset of the agent “carla” (AFAIK). So, in my mind, the second assign material should only override the textures of the agent “carla”, not the other one.
1. In the first image, the assign material is overriding the textures of the skin of the agent “claudia”. We can see the binding of the texture in the scene graph details.
2. In the second image, the target is different, It targets the skin subset of the agent “carla” (AFAIK). So, in my mind, the second assign material should only override the textures of the agent “carla”, not the other one.
Edited by guilhermecasagrandi - Oct. 22, 2020 21:13:25
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
jsmack
What is the reason for targeting the child prim, instead of the level where the primvar is located?
It doesn't matter where the material is assigned, as the inheritance is a material property.
The reason is: I´m shading crowds. The attribute is in the parent prim and I have to target (to change the shader and textures) a geometry subset, in this case, the skin. Each agent has It´s own skin texture.
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
Tim Crowson
I have used this approach before and it seems to work, for primvars at least:from pxr import UsdGeom stage = hou.pwd().editableStage() prim = stage.GetPrimAtPath("/path/to/some/prim") pvAPI = UsdGeom.PrimvarsAPI(prim) primvar = pvAPI.FindPrimvarWithInheritance("some:attribute:name") primvarValue = primvar.ComputeFlattened()
That´s cool, thanks! But It would be very good if the vex function could read “with inheritance”
Solaris and Karma » Indie Karma switch to non commercial
-
- guilhermecasagrandi
- 275 posts
- Online
Are render galleries working for you guys? I don´t know if It´s something to do with the non-commercial problem.
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
It´s working for the crowd. I´m using random textures to geo subsets and It´s really cool to work this way with LOPs, but (in my mind) It would be easier if I could find the attributes in the child prim instead of getting them from the parent prim that has the attribute assigned to It.
Here I´m using a for loop to transverse to the parent prim.
Here I´m using a for loop to transverse to the parent prim.
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
Using the “usd_parentpath” function I´ve managed to get the attribute, but the doubt still remains about the inheritance of attributes…
Solaris and Karma » Reading Attribute from Parent Prim
-
- guilhermecasagrandi
- 275 posts
- Online
Hi,
I´m trying to randomize some textures for a crowd sim with the assign material LOP.
I do have the id (primvars:id) attribute in the parent primitive, but not on the geometry prims which I´m assigning the shader.
The VEX function usd_attrib don´t read the inherited (?) attribute from the parent prim. So…
1. Does the prim really inherit the attribute(s) from the parent prims? (At least, I see It in the scene graph details)
2. Makes sense reading the inherited attribs with the usd_attrib function?
3. Right now, what´s the best approach, copying the attrib from the parent prim or building the path to the parent prim that has the attrib?
I´m trying to randomize some textures for a crowd sim with the assign material LOP.
I do have the id (primvars:id) attribute in the parent primitive, but not on the geometry prims which I´m assigning the shader.
The VEX function usd_attrib don´t read the inherited (?) attribute from the parent prim. So…
1. Does the prim really inherit the attribute(s) from the parent prims? (At least, I see It in the scene graph details)
2. Makes sense reading the inherited attribs with the usd_attrib function?
3. Right now, what´s the best approach, copying the attrib from the parent prim or building the path to the parent prim that has the attrib?
-
- Quick Links