Get Avarage Color Value of a Group

   1684   1   0
User Avatar
Member
2 posts
Joined: Oct. 2013
Offline
hey,

I need to get the avarage color value of a primitive group.
So i can check if(AvarageColorValue > Vec3(0,0,0))

Thanks for help

Lukas
http//lukasarts.jimdo.com/
User Avatar
Member
228 posts
Joined: Dec. 2012
Offline
You could use an AttribPromote node. Set ‘Original Name’ to the attribute that you want to take the average of, ‘Original Class’ to ‘Primitive’, and ‘New Class’ to ‘Detail’. I would also check ‘Change New Name’ and put something like ‘AverageColor’ and then also uncheck ‘Delete Original’ unless you want to delete the color. Leave ‘Promotion Method’ to ‘Average’. You will then have ‘AverageColor’ as a detail attribute and it will be the average of all the prims' colors.

If you want to average just a specific group, I would isolate the group with a blast node and ‘Delete Non Selected’ checked, do the average, and then merge that result with the result of a blast node with ‘Delete Non Selected’ unchecked. Make sense?

Hope that helps.
www.kmcnamara.com
  • Quick Links