Hi, I am trying to view my vertex color in viewport plugged in via my base color - They display correctly in active shade, but just come out as pure black in viewport?
Currently using OSL: UVW Channel = 0 into physical material.
show realistic materials with maps is on.
Thanks!
Solved! Go to Solution.
Solved by madsd. Go to Solution.
Just move the data channel to something like channel 3 in the vertex paint tool.
Source channel 3, then it shows both places.
I never ever use uv_0 since it's used for all kinds of things, its much better to move new abitrary data channels to empty sockets.
Cheers Madsd! - That did work, sadly that just led me to a different version of the same issue though, if I want to filter a channel out of that, I am back at it only rendering in active shade, any idea why that would be?
Thanks!
Don't use anything but OSL nodes to process shade space data.
So the Arnold node has to go and be replaced with an OSL color or vector component node, or you can simply modify the Source node and make it send out just the channel you need.
shader GetUVW
[[ string help = "Get an UVW coodinate from a 3ds max map channel",
string label = "UVW Channel",
string category = "UVW" ]]
(
int UVSet = 1
[[ string label="Map Channel",
int min = 0, int max = 99,
string help ="The 3ds max Map channel to look up" ]],
output point UVW = 0.0,
output float FOut = 0, // custom float output
)
{
// Get max style UV
if (!getattribute(format("UV%d", UVSet), UVW))
{
// Get MAXtoA style UV
float w = 0.0;
// Default UV set handled in
// a special way in MAXtoA
if (UVSet == 1)
{
UVW = vector(u,v,0);
getattribute("w", w);
}
else // ...the others are just attributes
{
getattribute(format("uv_%d", UVSet), UVW);
getattribute(format("w_%d", UVSet), w);
}
// Insert 3rd dimension if any
UVW[2] = w;
}
FOut = UVW[0]; // this line change to either 0,1,2 inside brackets for x,y and z.
}
Here I generated a new float output and point the UVW .x channel in last line. you can change that and recompile for example
Ah okay, I understand now, that makes sense.
I have been taking a look through your youtube page too, so much great information for people to learn from, and really shows the potential of things we can look forward to in viewport going forward.
Thanks so much for your help Mads! 😁
Can't find what you're looking for? Ask the community or share your knowledge.