Visualize Arrays

   4047   10   3
User Avatar
Member
339 posts
Joined: June 2013
Offline
Hi
Is it possible to display arrays with Visualizers? I'm getting strange behaviors. Bellow, a point attribute that is an array of integers, 0, 2 and 5. But only two values are displayed per point and well, I don't know what they are.


I was expecting something more like this (XSI):



Am I missing something? It's something Houdini can't do? Or just a bug?

Chees

Attachments:
VisualizeArrays.hipnc (95.7 KB)

User Avatar
Member
339 posts
Joined: June 2013
Offline
I guess this is something people don't usually do…
User Avatar
Member
4189 posts
Joined: June 2012
Offline
Arrays are an XSI workflow pigeon-holed into Houdini… perhaps you can be the first to explain why you need them so much.
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
@probiner: I don't use vops…at this stage in my use of Houdini I use wrangles.

From there(wrangles) arrays are simple to set up and use. But since I'm not well versed in vops I can't show an equivalent version in a wrangle to what your trying to do in vops
User Avatar
Member
339 posts
Joined: June 2013
Offline
Hi @aRtey

I need them for matrix chain workflows. This allows me to treat local matrices like an hierarchical chain without needing items in the scene.

Here are some Houdini and XSI examples:
https://vimeo.com/219608735 [vimeo.com]
https://www.youtube.com/watch?v=OAFgkTH_U90 [www.youtube.com]

Here are the solvers to be able to go back and forward between a unstructured list of matrices and a hierarchical list of matrices.


While the second solver might be easy to set up the first one requires me to have access to a bigger and bigger number of matrices to get the result, and I don't see how this could be worked out if for example I were to instead of using an array, have a place holder equal amount of points, meaning how could I do arbitarly "For point 5, multiply the matrix it has in attribute Mtrx with the matrix that point 4 has in attribute Mtrx and then with 3, 2… up to 0. For all points."?

Is this clear?

Cheers
Edited by probiner - June 5, 2017 16:35:51
User Avatar
Member
85 posts
Joined: May 2011
Offline
Hy,

Have you tried to convert them to string (just for display purpose) ?
I"m not even sure if that's work.
— dedeks 3000 —
User Avatar
Member
4189 posts
Joined: June 2012
Offline
@probiner - thanks! yep, first time I've seen that on the forums here or anywhere for Houdini.
User Avatar
Member
339 posts
Joined: June 2013
Offline
Hi, so I've came up with something to visualize Detail matrix arrays Scene attached
Might do something similar soon for 3D vectors.
The hardest part ended up being to take the object scaling into account to put those at the origin (Object Context Data)
It was also a bit weird that “Axes” doesn't work for m4, just m3, i.e. shows the axes posed, but it doesn't place them in 3D space.

Either way I think this could be a standard in array visualization.
I like to make mistakes fast, and to be able to visualize my assumptions is a must for a workspace where I'm to build things and solve problems. If I feel slowed down in my dumb attempts it will mean I will learn much much slower.

Cheers
Edited by probiner - June 7, 2017 17:36:16

Attachments:
MatrixVisualizer.hipnc (149.5 KB)

User Avatar
Member
339 posts
Joined: June 2013
Offline
@dedeks3000

How would that be? I don't even…
Seriously I don't know what are you alluding to.
Edited by probiner - June 7, 2017 19:34:52
User Avatar
Member
339 posts
Joined: June 2013
Offline
One application of it, eh!
Edited by probiner - June 8, 2017 16:01:12
User Avatar
Member
1 posts
Joined: Dec. 2015
Offline
I also encountered the same problem and ended up here. It didn't seem possible to display the array by default, but I was able to resolve this by converting it to a String for display.
The problem with the Visualize Properties SOP causing the same thing to appear twice can be resolved by turning off Parameters > Update Visualizers.
string s_patches[];
foreach (int patch; i[]@patches)  // e.g. i[]@patches = {5, 6, 7}
    push(s_patches, itoa(patch));
s@s_patches = '[' + join(s_patches, ' ') + ']';

Attachments:
visualize_array.jpg (155.6 KB)

———————
Masayuki Osaka
———————
  • Quick Links