Hello everyone,
I am a researcher simulating snow avalanches. I am using Houdini (Apprentice) to process the results of my simulations.
I am currently trying to get the average height of my snow slab (a big rectangle). For that I have a f@h attribute containing the height of each of my points (I'm using points...). So I want to get the mean value of the height along the Y-axis (vertical) but not along the X-axis or Z-axis (horizontal).
But the "mean" function in "attribute promote" only takes the global average on the whole model. I've also tried using a loop in which I would select a small vertical sample with a wrangle, apply a mean on it, then copy it back to my model. But it takes a lot of time and I can't manage to get the data in the end.
Does anybody has an efficient (and working) way to apply an average function only along one axis ?
PS : my model is attached
How to get a mean value along one axis ?
1032 2 1-
- JoWsky
- Member
- 1 posts
- Joined: April 2024
- Offline
-
- tamte
- Member
- 9384 posts
- Joined: July 2007
- Offline
-
- ObeidaZakzak
- Member
- 128 posts
- Joined: Dec. 2019
- Offline
Here's a possible method without having to loop over samples, which executes fast on 13M points.
Couldn't find your model to test over it, as it wasn't attached on your post.
1. Create f@h attribute and zero-out altitude on points
2. Use a Fuse SOP to snap points and average their f@h value : this will result with an average along Y-axis
3. Transfer f@h from fused/averaged points to the zero-altitude points
4. Copy back f@h to original points
Couldn't find your model to test over it, as it wasn't attached on your post.
1. Create f@h attribute and zero-out altitude on points
2. Use a Fuse SOP to snap points and average their f@h value : this will result with an average along Y-axis
3. Transfer f@h from fused/averaged points to the zero-altitude points
4. Copy back f@h to original points
Edited by ObeidaZakzak - May 27, 2024 16:18:46
Houdini Pipeline Supervisor @ TAT Studio
-
- Quick Links


