Home Technical Talk

Script request

PixelGoat
polycounter lvl 12
Offline / Send Message
PixelGoat polycounter lvl 12
How hard would it be to write a max script that allows you to set the vertex color of selected vertecies to either 100% red, 100% green or 100% blue, aswell as 100% black or 100% white?

Would really appreciate if someone could whip something up that allows me to do that :)


*puppy eyes at MoP*

Replies

  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Heh. I already did this for Maya (along with a "random vertex colour per object" thing for baking highpoly to get selection masks out).
    Sounds pretty straightforward. Is it for baking highpoly stuff too? I thought renderhj's TexTools script had some sort of vertexcolour baking already, did you try that?
  • PixelGoat
    Offline / Send Message
    PixelGoat polycounter lvl 12
    Nah its for assigning vertexcolors for our RGB texture blend shader, aswell as fixing Vertex AO on LODs :)

    I just want to be able to assign absolute colors to vertecies in a single click, instead of going into the color pick menu every time and typing in manual color values :)
  • renderhjs
    Offline / Send Message
    renderhjs sublime tool
    function tint_vertexSelection tintColor=(
    	obj = selection[1];
    	selVerts = polyop.getVertSelection obj
    	polyOp.setVertColor obj 0 selVerts tintColor;
    )
    rollout rolloutTintVertex "Tint Vtx" width:92 height:117
    (
    	button btn1 "Red" pos:[3,2] width:86 height:37
    	button btn2 "Green" pos:[3,39] width:86 height:37
    	button btn3 "Blue" pos:[3,76] width:86 height:37
    	
    	on btn1 pressed  do(
    		tint_vertexSelection(Red);
    	)
    	on btn2 pressed  do(
    		tint_vertexSelection(Green);
    	)
    	on btn3 pressed  do(
    		tint_vertexSelection(Blue);
    	)
    )
    CreateDialog rolloutTintVertex 92 117;
    
    works but you wont see without material
  • PixelGoat
    Offline / Send Message
    PixelGoat polycounter lvl 12
    Sweet! just what I needed! thanks a ton! :D *love*
Sign In or Register to comment.