Is there a straightforward way to view channel primitives?

   1593   7   7
User Avatar
Member
373 posts
Joined: June 2023
Offline
From my understanding, channel primitives, unlike the traditional CHOPs, actually "live" in a geo. Which means they're passed through the SOPs just like the geometry primitives.

But how could I view them? How to inspect their values/curves? Geometry primitives can be easily inspected in Geometry Spreadsheet. But there isn't an "Channel Spreadsheet". One can view some of them in Animation Editor, but it's very inconvenient: you need to get into Animate state, then select the controls. How can I just view all the channel primitives passed with a geo?

Unpacking the animation from packed folder seems to get channel primitives, but very confusingly, they're not time dependent. Each channel is just a single "pending" (what does it mean?) value, not a curve.
Edited by kodra - Dec. 8, 2023 10:09:27
User Avatar
Member
8730 posts
Joined: July 2007
Offline
kodra
, but very confusingly, they're not time dependent. Each channel is just a single "pending" (what does it mean?) value, not a curve.
Channel primitives are not time dependent, that's the main point, they contain full animation curve

I don't know if you can view them directly, Animation Editor would be a good place for that if it worked in conjunction with selected packed prim in rig tree view containing channels

You can use Prim Wrangle for example and VEX chprim_* functions to evaluate channel primitives and rebuild them as geometry curves for preview until more straightforward way to preview them comes along, unless it's already possible to see them somewhere
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
18 posts
Joined: Nov. 2018
Offline
You can use Prim Wrangle for example and VEX chprim_* functions to evaluate channel primitives and rebuild them as geometry curves for preview until more straightforward way to preview them comes along, unless it's already possible to see them somewhere

What is the flow of nodes you are using to alter channel primitives in the wrangle, (rig wrangle)? I have attached a unpack folder to unpack the animation directory and plugged that into a regular attribute wrangle and tried out some of the chprim_* functions but I did not see any keys added or altered in the animation editor. Do I need to pack the channels back up again and insert them back into the root directory? What nodes do i need to get channel primitives into a place where they can be edited in a wrangle and how do I get them back into an animation I can see in the animation editor or in the viewport?

Thanks,
Sky
User Avatar
Member
373 posts
Joined: June 2023
Offline
playBlaster
in the animation editor

I don't think animation editor shows them unless you have an Animate state (APEX Animate Scene SOP's state) activate and have the controls selected. Which means even if you correctly unpacked and altered them, you would still need to use APEX Scene Add Animation SOP to pipe them into the packed folder, then use another APEX Animate Scene to view them.

I hope I'm wrong cause this whole workflow is so convolute
Edited by kodra - Dec. 9, 2023 02:28:57
User Avatar
Member
231 posts
Joined: March 2023
Offline
One of the magic of Houdini is that you can create all the tool and node that do not exist yet, there virtually no limit if you know python.

I didn't had much time but here is a simple scene with electra and an hda that read a channel prim and turn them into a polyline for view.
I used python here cause that the quickest way I could figure out how to do it, haven't checked for vex.

if you limit yourself to what exist, you may never achieve what you really want, I do understand that not everybody can learn coding, but knowing a bit of python can turn into a limitless amount of power when using houdini.

a few thing to know about the sceneanimate :

- the animation data is saved in a stash geometry parameter ( a hidden parm named 'animation')
- similar to a stash, nothing would prevent you from getting the stash's data, editing it with a network of sop or vex, and feed back the edited data into the original's stashed parameter.
- you can also unlock the scene animate hda and change how it work internally, you can even create your own hda with your own logic that run with the scene animate state.

Apex is still in it infancy, there little documentation about it, but sidefx went far and beyong to make sure Apex is by design, easy and flexible to lets us alter how it work, we're virtually limited only by our own imagination !

I hope I didn't sound too aggressive with this post, I was a bit in a hurry, I would be happy to answer any of your question or help you making a better primitive preview tool when I get a bit more time.

extra note :
the primitive is a 'hou.channelPrim' : https://www.sidefx.com/docs/houdini/hom/hou/ChannelPrim.html [www.sidefx.com]
there some information about how to display them in the Animation editor
Edited by ASquirrel - Dec. 10, 2023 07:10:09

Attachments:
007496_houdini_UR5Trp4LiU_2023-12-10_13-00-03.webm (622.7 KB)
channelviewer.hiplc (185.1 KB)

Head of Pipeline @ LightVFX
User Avatar
Member
16 posts
Joined: April 2021
Offline
Thanks for sharing your hip file! learned a bunch from it!
User Avatar
Member
16 posts
Joined: April 2021
Offline
I did some playing around with this today.

I created this small hda. where you can easily view and edit the curves.

inside the hda there is only a stashnode. you can see the code on the screen. it's pretty simple.

I believe there is also a callback method that should be able to store the keyframes for you after editing them, but I was not able to get that to work.

Attachments:
2024-08-24 21-46-08.mov (4.7 MB)

User Avatar
Staff
478 posts
Joined: April 2014
Offline
Look for hou.ChannelList.addGeometryChannels() in the hom documentation. It allows you to put the channel in the animation editor.
You’ll also need to call hou.playbar.setChannelList().
  • Quick Links