Coloring CMODs
Posted: 28.03.2011, 19:46
Hi! In experimenting with the CMOD's colors, I wished to achieve the condition in which several points clouds were differently colored within the same model. And I can achieve that, through the categories below:
where the first three points of the first mesh are reds and the remains are blue and the points of the second mesh are all yellows. The problem what is: is that whether I do set the opacity lesser than 1 in the main material attributes, I do not get the partial translucency of whole model, but just of the second mesh; while the first mesh remains completely opaque, both reds and blue. And it doesn't matter of which numbers of meshes I do add, always the last will be translucent.
In more extent this could be avoided through the insertion of yet the second mesh onto the first as row of points, but should be impossible to achieve targeted traslucency upon point meshes without doing use of new CMODs (one for colors).
At this point the sense of my post.
Reading the CMOD's categories and its definitions on Wiki, I've seen that to the vertex semantic "color0, color1..." is possible to assign the format "ub4", being specified as "four unsigned bytes (the usual format for colors" (from CelestiaWiki - CMODs), at the first sight some kind of way to say RGBA. But trying to add even the alpha to the points rows doesn't work, either in decimal form or in RGB values. In short, is this acknowledged and I'm on the wrong path, having thought with blindness? Thanks in advance anyhow.
Code: Select all
material
end_material
mesh
vertexdesc
position f3
color0 f3
end_vertexdesc
vertices 6
1 0 0 1 0 0
2 0 0 1 0 0
3 0 0 1 0 0
4 0 0 0 0 1
5 0 0 0 0 1
6 0 0 0 0 1
points 0 6
0 1 2 3 4 5
...
mesh
vertexdesc
position f3
color1 f3
end_vertexdesc
vertices 6
7 0 0 1 1 0
8 0 0 1 1 0
9 0 0 1 1 0
10 0 0 1 1 0
11 0 0 1 1 0
12 0 0 1 1 0
points 0 6
0 1 2 3 4 5
where the first three points of the first mesh are reds and the remains are blue and the points of the second mesh are all yellows. The problem what is: is that whether I do set the opacity lesser than 1 in the main material attributes, I do not get the partial translucency of whole model, but just of the second mesh; while the first mesh remains completely opaque, both reds and blue. And it doesn't matter of which numbers of meshes I do add, always the last will be translucent.
In more extent this could be avoided through the insertion of yet the second mesh onto the first as row of points, but should be impossible to achieve targeted traslucency upon point meshes without doing use of new CMODs (one for colors).
At this point the sense of my post.
Reading the CMOD's categories and its definitions on Wiki, I've seen that to the vertex semantic "color0, color1..." is possible to assign the format "ub4", being specified as "four unsigned bytes (the usual format for colors" (from CelestiaWiki - CMODs), at the first sight some kind of way to say RGBA. But trying to add even the alpha to the points rows doesn't work, either in decimal form or in RGB values. In short, is this acknowledged and I'm on the wrong path, having thought with blindness? Thanks in advance anyhow.