playMaker

Author Topic: Mesh - Get/Set vertex color  (Read 6490 times)

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: Mesh - Get/Set vertex color[SOLVED]
« Reply #15 on: May 02, 2013, 04:15:00 PM »
Thought it might be a lot of work. Might be able to spit the vert colors out of maya as a text doc ... then load that into arraymaker!??! fingers crossed
« Last Edit: May 06, 2013, 11:40:01 PM by jeanfabre »

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: Mesh - Get/Set vertex color
« Reply #16 on: May 03, 2013, 08:10:11 PM »
Hey Jean! So close now ..

Exported some vertex colors from Maya and now have a text file which I have plugged into the "split text to array List" action - now I have to get the line in the text to be a color value.

Would it be easy to have a parse type in the "split text to array List" as color?
assuming the color values were something like "0.5342 0.26373 0.823220"
each line was three float values split with a space.

I will also ty to build a maunal process that will take each float and set the RGB color ... in my head that could also work.

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: Mesh - Get/Set vertex color
« Reply #17 on: May 03, 2013, 09:37:34 PM »
Solved! YUS! So I take the first three floats and spit out a color, then remove those three from the array and repeat until it's done and I have an array of colors! ready to set on the mesh! I love Playmaker! (and arraymaker)

Thanks for all your help Jean!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14595
  • Official Playmaker Support
    • View Profile
Re: Mesh - Get/Set vertex color
« Reply #18 on: May 06, 2013, 11:40:28 PM »
Hi,

 Very good!

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 686
    • View Profile
    • Assets
Re: Mesh - Get/Set vertex color
« Reply #19 on: May 11, 2013, 05:01:14 PM »
Just a small update, the vertex colors Maya exports are different to the ones Unity has Doh - this is due to each vertex having a possible 1,2 or 4 colors.
So I'm writting a Unity script that exports the vertex colors into a txt file, its not 100% working yet but I'm working on it :)