Forum

#1 2018-11-17 16:19:57

TdeVries
New member

vertex colors

For some reason this feels like a stupid question, but does anyone know how to get vertex colors to render? I am trying to render a zbrush model that has polypaint as vertexcolors, but I just can't get it to show up. Is there a straightforward way to get vertexcolors to override for example the diffuse color (the way a texture would)?

Offline

 

#2 2018-11-17 20:47:30

doubleailes
Guerilla dev, the guy to hug

Re: vertex colors

Hi TdeVries,

Of course. You need to create a sub shader ( http://guerillarender.com/doc/2.0/User% … tures.html ) , connect a PrimAttr node into the output of this subshader, and be sure to set PrimAttr's Attribute Name to the right channel.
https://i.imgur.com/AS6Nr3Z.png

Most of the time the trickiest part, is to find the exact channel export by the other software.
You can check the channels in your shape using the shape diagnostic,
https://i.imgur.com/M2SLjOu.png
and check the console the log.
https://i.imgur.com/ikn6o5q.png

Cheers.


Philippe Llerena

Offline

 

#3 2018-11-19 23:52:17

TdeVries
New member

Re: vertex colors

Thanks for the reply, I will try this tomorrow!

Offline

 

#4 2018-12-15 01:12:37

TdeVries
New member

Re: vertex colors

Well, took me a while to get around to this, but I've just been giving it a try. No luck though. I have a simple vertex colored shape (the vertex colors actually show up in the viewport). I've then tried to connect a primAttr node to the DiffuseColor of the surface shader and renamed its attribute to colorSet0 (which is what the color set is called in Maya), but it doesn't do anything. I've looked around for a console log, but I cannot find any such window or view. Is it a seperate application?

https://i.imgur.com/rkTiK1o.jpg

Offline

 

#5 2018-12-15 11:56:36

Ben
Guerilla dev, the guy to hug

Re: vertex colors

Hu,

You can try one of the color1 to color8 builtin channels, instead.

Ben


Benjamin 'Ben' Legros
Guerilla developer
http://www.guerillarender.com

Offline

 

#6 2018-12-15 13:34:03

paul.parneix
Member

Re: vertex colors

Hi,

@TdeVries :
Don't know about Zbrush polypaint, but Houdini Color channel can be used using "Cs" input (default vertex color) :

https://i.imgur.com/Y5lwRT7.jpg

To open the console log window : Menu View => Show / Hide Console

Output for my test sphere :

Code:

12/15/2018 13:28:39  [10] SHAP DIA: loaded shape 'sphere.abc' '/sphere_object1/noise_ql1.RenderGeometry'
12/15/2018 13:28:39  [10] SHAP DIA: P float3[34562] min=(-0.499000,-0.498985,-0.499096) max=(0.499000,0.498985,0.499096)
12/15/2018 13:28:39  [10] SHAP DIA: N float3[34562] min=(-1.000000,-0.999914,-1.000000) max=(1.000000,0.999914,1.000000)
12/15/2018 13:28:39  [10] SHAP DIA: Cd (color) float3[34562] min=(-0.837421,-0.955111,-0.857724) max=(2.854501,2.858464,3.168077)

So for my sphere, a PrimAttr Node with "Cd" channel also works :

https://i.imgur.com/iG8MBHR.jpg


FX TD / Artist - 3D and Surface Scan Speciaist.

Offline

 

#7 2018-12-15 13:47:09

TdeVries
New member

Re: vertex colors

Hey guys, both using color1 and Cs from the Input node work! Thanks!

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB