How to use APEX's rig::RBFInterpolation?

   2161   10   2
User Avatar
Member
373 posts
Joined: June 2023
Offline
I was quite excited when I noticed APEX has an RBF node built-in:



However, without any document or example, I have no idea how to get it work

Another possibility is just use sop::linearsolver, but while I kinda know how to use it, it's a very generic node that requires a huge amount of parameters. And it's an SOP, so I have to pipe in the all the data as attributes first. It's a big bummer that especially we have a rig::RBFInterpolation sitting right next to us.
Edited by kodra - Dec. 7, 2023 10:34:21

Attachments:
Screenshot 2023-12-07 232526.png (45.0 KB)

User Avatar
Member
275 posts
Joined: March 2011
Online
Any help from SESI guys on this?
User Avatar
Member
373 posts
Joined: June 2023
Offline
guilhermecasagrandi
Any help from SESI guys on this?

I actually sent an email to SideFX suppport.

Here is their reply:

> APEX is still in Beta and so the documentation is currently under development as well.

(that's it)
User Avatar
Member
275 posts
Joined: March 2011
Online
kodra
guilhermecasagrandi
Any help from SESI guys on this?

I actually sent an email to SideFX suppport.

Here is their reply:

> APEX is still in Beta and so the documentation is currently under development as well.

(that's it)

A simple example file from their side would help...
User Avatar
Member
275 posts
Joined: March 2011
Online
I have great news: I've managed to make it work. Not so simple, though. At some point this week I'll have an example file and I'll share it here, probably by Thursday.
User Avatar
Member
275 posts
Joined: March 2011
Online
Here it is. The setup needs to be rebuilt to be more streamlined, but it works well as it is.

Attachments:
RBF_solver.mp4 (3.6 MB)
RBF_solver.hiplc (376.9 KB)

User Avatar
Member
373 posts
Joined: June 2023
Offline
guilhermecasagrandi
Here it is. The setup needs to be rebuilt to be more streamlined, but it works well as it is.

Hooray!
User Avatar
Member
9078 posts
Joined: July 2007
Online
guilhermecasagrandi
Not so simple, though
that's mostly because APEX lacks a lot of convenience functions that would make working with arrays and therefore assembling such setup a lot easier

like getting an array of attribute values from geo
multiplying array with another array per component or also scaling array components with single float
sum of an array elements
...

I'm not really sure what is the plan for the future, but I'm very distracted by APEX having all the signatures expanded as a separate node types
and it's lacking a lot of signatures also, I'd expect more generic functions with support for all datatypes, especially arrays
Edited by tamte - Dec. 13, 2023 01:30:15
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
259 posts
Joined: March 2023
Online
tamte
I'm not really sure what is the plan for the future, but I'm very distracted by APEX having all the signatures expanded as a separate node types
and it's lacking a lot of signatures also, I'd expect more generic functions with support for all datatypes, especially arrays

this is usually simply an UI thing, it would be the UI's job to guess the correct node type based on the connection, this will come in time! Believe it or not, but when houdini 20 was released, there wasn't even a copy/paste feature haha
Edited by ASquirrel - Dec. 13, 2023 07:31:32
Head of Pipeline @ LightVFX
User Avatar
Member
46 posts
Joined: Jan. 2017
Online
guilhermecasagrandi
Here it is. The setup needs to be rebuilt to be more streamlined, but it works well as it is.

Thanks for this! I've been trying to figure this out too, there's some documentation now but your scene was really useful, and I think I've got something working.

I think as of 20.5 we don't need to calculate the distances, we just need to send a flattened array of whatever we're measuring against into the RBFInterpolation, it seems to figure itself out internally from those values.

For example if it's P, turn the vector into a float array for the target input, and the example points to measure against into another array of floats . If there are 10 example points flattened into 30 floats, and the target is 3 floats, it'll give a result with 10 weights.

Does that make any practical difference to the result? I don't know, I'll admit I don't understand the maths, but it seems to work, and there's fewer loops needed.

I've attached my test project, it's pretty grotty with a lot of VEX, so needs a big old cleanup, but might be useful if anyone else is trying to figure this out!

Attachments:
RBFtest.hip (223.6 KB)
2025-03-06 09-09-36.mp4 (5.0 MB)

https://www.noad.co [www.noad.co]
User Avatar
Member
275 posts
Joined: March 2011
Online
danfitz82
guilhermecasagrandi
Here it is. The setup needs to be rebuilt to be more streamlined, but it works well as it is.

Thanks for this! I've been trying to figure this out too, there's some documentation now but your scene was really useful, and I think I've got something working.

I think as of 20.5 we don't need to calculate the distances, we just need to send a flattened array of whatever we're measuring against into the RBFInterpolation, it seems to figure itself out internally from those values.

For example if it's P, turn the vector into a float array for the target input, and the example points to measure against into another array of floats . If there are 10 example points flattened into 30 floats, and the target is 3 floats, it'll give a result with 10 weights.

Does that make any practical difference to the result? I don't know, I'll admit I don't understand the maths, but it seems to work, and there's fewer loops needed.

I've attached my test project, it's pretty grotty with a lot of VEX, so needs a big old cleanup, but might be useful if anyone else is trying to figure this out!

Thanks for the files. I've been away from Apex for one year since rebuilding my studio's pipeline, but it's pretty close to being finished, and I'm getting back into Apex with full force next week. I'll take a look at your file between now and then.
  • Quick Links