Author Topic: get/set vertex color  (Read 1198 times)


  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 306
get/set vertex color
« on: October 25, 2019, 09:13:13 PM »

I am trying to paint vertex values on to a mesh one at a time.

I wrote a shader that allowed for the adjustment of vertex values.  It works.
I have a raycast/mousepick that detects a mesh, stores its vertices in the array, and reads/writes the colors for each vertex in another array.  It works.
If I click, it should apply a predetermined color to the vertex nearest the click.  This is where the problem is.  Instead of adjusting one vertex, it makes the change to the entire model/all vertices at once.  I just need to know how to change the color value for one vertex, and effect only that vertex.

I'm using Array List Get/Set Vertex Color, and I've tinkered with Operate on Vertices, but I'm unable to get this to work!  Thank you for any help.


  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 306
Re: get/set vertex color
« Reply #1 on: November 06, 2019, 02:38:28 PM »
So many views.  So few answers. 

Someone must have done this.


  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: get/set vertex color
« Reply #2 on: November 13, 2019, 01:31:49 AM »

 you need to do this step by step.

- work on a very simple quad to make sure data is not overwhelming
- get vertex colors, check they are correct
- set vertex colors manually, check they are correct ( get colors again and see if it matches)
- now you can implement raycasting, debug which vertex you want to adjust color with, once that's correct, you can start adjusting colors in the arraylist.

where are you within the above points?