Guys,
Is there any expression to find the highest value in an attribute for the group of points in a geometry similar to point average expression function which returns the average of an attribute across all points in a geometry. I want to return the highest value of a pointattribute which is working among the points in a geometry. Is there a way to do this?
Regards,
nittin
How to return the highest value in a point attribute?
24627 10 1- Nittin
- Member
- 29 posts
- Joined: 5月 2011
- Offline
- tamte
- Member
- 8833 posts
- Joined: 7月 2007
- Offline
- Nittin
- Member
- 29 posts
- Joined: 5月 2011
- Offline
Hi tamte,
Even i was thinking of the same idea, but i thought position of a point attirbute alway exsists and can never be promoted using attribute promote node. only custom attributes can be promoted, where it will start exisisting as a detail atrribute from the next node. But postion of point in space is not something like that. But if what u are saying is possible what should i keyin the channel of “ORIGINAL NAME” in the attribute promote node. I want to promote P attribute of points using the maximum option method in promote attribute node. But i dont know wat should i keyin the channel of 'ORIGINAL NAME" for p. If i am typing in P it is showing all sorts of error and the promotion is not happening. Can u help me with the syntax to be used there.
Regards,
nittin
Even i was thinking of the same idea, but i thought position of a point attirbute alway exsists and can never be promoted using attribute promote node. only custom attributes can be promoted, where it will start exisisting as a detail atrribute from the next node. But postion of point in space is not something like that. But if what u are saying is possible what should i keyin the channel of “ORIGINAL NAME” in the attribute promote node. I want to promote P attribute of points using the maximum option method in promote attribute node. But i dont know wat should i keyin the channel of 'ORIGINAL NAME" for p. If i am typing in P it is showing all sorts of error and the promotion is not happening. Can u help me with the syntax to be used there.
Regards,
nittin
- tamte
- Member
- 8833 posts
- Joined: 7月 2007
- Offline
- Nittin
- Member
- 29 posts
- Joined: 5月 2011
- Offline
- thexon
- Member
- 86 posts
- Joined: 8月 2010
- Offline
- Thomas_FX
- Member
- 12 posts
- Joined: 2月 2018
- Offline
How do you do that but overtime tho?
Let's consider a pop sim with points being generated and dying over the course of the sim.
I want to record what was the highest point count over the course of the whole sim.
If I promote to max, it's going to evaluate every frame.
I tried recording with a solver but I can't find a clever way to do it yet.
If anyone has any ideas?
Let's consider a pop sim with points being generated and dying over the course of the sim.
I want to record what was the highest point count over the course of the whole sim.
If I promote to max, it's going to evaluate every frame.
I tried recording with a solver but I can't find a clever way to do it yet.
If anyone has any ideas?
- tamte
- Member
- 8833 posts
- Joined: 7月 2007
- Offline
Thomas_FXsince you are already in POPs, you can just keep max point count in the detail attrib using Geometry Wrangle and just increase it if its exceeded
Let's consider a pop sim with points being generated and dying over the course of the sim.
I want to record what was the highest point count over the course of the whole sim.
int point_count = npoints(0); i@max_point_count = max(i@max_point_count, point_count);
Edited by tamte - 2021年3月31日 23:35:29
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Thomas_FX
- Member
- 12 posts
- Joined: 2月 2018
- Offline
- Thomas_FX
- Member
- 12 posts
- Joined: 2月 2018
- Offline
Hey guys I'm back at it with a similar matter:
This time, I'm looking for an all-in-VEX version to determine a max value of a float overtime.
Last time it turned out that I was using a popsim and there was an already build-in attribute that I didn't know about, but for this specific case I don't have any build-in attribs.
Maybe I'm doing it wrong but the use for that would be pretty generic, however I mostly use that when I wanna determine the distance between 2 points, the highest one and lowest one over the course of the whole frame range.
The reason why I'd like to do that is to fit() this distance later on, and I'd like the range of the fit() to be procedurally updated.
EDIT: The way I currently do it with a solver writing down the point at every frame with the attribute, so I timeshift to $FEND after and promote the max and min attribute, but doing that is really not light just to output a max attribute value over time, I'm sure there is a better way to do it.
This time, I'm looking for an all-in-VEX version to determine a max value of a float overtime.
Last time it turned out that I was using a popsim and there was an already build-in attribute that I didn't know about, but for this specific case I don't have any build-in attribs.
Maybe I'm doing it wrong but the use for that would be pretty generic, however I mostly use that when I wanna determine the distance between 2 points, the highest one and lowest one over the course of the whole frame range.
The reason why I'd like to do that is to fit() this distance later on, and I'd like the range of the fit() to be procedurally updated.
EDIT: The way I currently do it with a solver writing down the point at every frame with the attribute, so I timeshift to $FEND after and promote the max and min attribute, but doing that is really not light just to output a max attribute value over time, I'm sure there is a better way to do it.
Edited by Thomas_FX - 2021年4月30日 13:02:26
- tamte
- Member
- 8833 posts
- Joined: 7月 2007
- Offline
Well, you have to consider all time values which you can't just with the wrangle on any specific frame unless that frame geo already contains all frame values represented as array or points for example
So you need something that will allow you to step through all frames or gather all frame values for further processing, some of your options are:
- sim (solver sop or in general any dopnet) and lookup last frame
- trail sop, freeze last frame and then attrib promote
- geometry chop and chop processing
- for each with timeshift inside
So you need something that will allow you to step through all frames or gather all frame values for further processing, some of your options are:
- sim (solver sop or in general any dopnet) and lookup last frame
- trail sop, freeze last frame and then attrib promote
- geometry chop and chop processing
- for each with timeshift inside
Edited by tamte - 2021年4月30日 22:38:49
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links