Point & Primitive Colors Problem in Merge Node

   5892   2   0
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
hello guys.
I have a little problem in houdini today.
I created simple box and sphere either in polygon mode. after done that i create two color nodes and connected to them. set color and class for box to (1,0,0) and Point.
these settings for sphere color node are (0,0,1) and Primitive.
then i connected both color nodes to merge node but unfortunately color of sphere convert to white (1,1,1) !!!!!!!!!!!
i attached my project file for better understanding problem.
any help will be appreciated.
thanks.

Attachments:
Color Problem.hip (71.1 KB)

User Avatar
Member
918 posts
Joined: March 2014
Offline
Hi,
a quick solution is to add an attributepromote SOP which transfers your color attribute from primitive to points. May I ask why you're using different assignments in the first place?

Be aware that the merge SOP merges your attributes correctly. Your sphere now has a point attribute ‘Cd’ with default values of (1,1,1) and your cube has a primitive attribute ‘Cd’ with default values of (1,1,1) too. In your case the point attribute for color has precedence for display in the viewport hence the white sphere.

I wonder if it's a good idea to have the default merge values for non existing attributes default to 1 instead of 0. Anyone?


Cheers,
Andy

Attachments:
color_problem_solution.hip (73.1 KB)

User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
thanks that's work best.
i use different assignment because in some cases we have color attributes in point and primitives.
e.g imported image with attribute from map node contain Cd for points but alongside of this if we have big primitives of Geo with specific Cd on that, you encounter with this problem in merge node…
that's interesting because this problem just show itself on merging two or more Geo with different Cd which is on point and primitives class. (not happened if we have vertex and point class Cd simultaneously)
thank you.
  • Quick Links