Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have a pseudo-code version of the function I'm trying to write but I can't quite figure out how to get both the UV and vertex colour from the same vertex. Can anyone help me out with this?
fn UVtoVertColour obj mapChannel = (
for i = 1 to (polyop.getNumMapVerts obj 0) do
(
vCol = polyop.getMapVert obj 0 i
uv = polyop.getUV obj mapChannel i --NOT A REAL FUNCTION
vColAlpha = uv.y
if vColAlpha < 0 then vColAlpha = 0
if vColAlpha > 1 then vColAlpha = 1
polyop.setVertColor obj -2 #{i} (color vColAlpha 0 0) --https://forums.autodesk.com/t5/3ds-max-programming-forum/get-amp-set-vertex-alpha/td-p/4020406
)
)
Solved! Go to Solution.