External Python script integration in action graphs?

APP : Isaac Sim 2022.1.1

I’m trying to generate synthetic data where I need to constantly rotate a 3D object at a fixed angle, change its material shader input textures (albedo/metal/roughness/normal etc) and export a viewport image.

I built an action graph driven by tick events to rotate the object and then replace its material shader’s input textures.

I can rotate the object as I want it to. However, I wasn’t able to replace the input textures because the Write Prim Attribute function in Action Graph cannot access the attributes of these input textures.

So I created a Python script in Omniverse’s script editor to do the job using Omniverse’s USD Python API, and it worked fine.

But the problem is that I have to execute the script manually. I’m wondering if scripts can be driven by events of action graphs, how can I do that?

You could try to use the script node. I’m not sure about the texture. but you can drive the tick via the script node.

Also you could output a variable in the action graph back into code then use the variable in the script editor to select the texture on the back end. If that makes sense?

2 Likes

Sirens, thank you for your reply! I did try Script Node, but there was an import error that I didn’t know how to deal with.

Mati from NVIDIA suggests me the best way to solve this problem is to move to Create-2022.3, because they’ve made some significant changes to it. I will try it and see if it works!

Many thanks to @mati-nvidia and @Sirens_uk I was able to solve my problem using Script Node and Create-2022.3.

Thanks @renton.hsu.vfx, @mati-nvidia is super helpful.

Love how that we are building a community of devs working together, this work is not easy. Honest is the best policy here! I love how we admit limitations. Team work == dream work

2 Likes

You all, the community, make this place great! Thank you.

2 Likes