PDA

View Full Version : Helper mesh drawing using vertex colors ?


kittikun
03-31-2009, 06:46 AM
Hi all,

Iím created a helper deriving from dummy and assign it a mesh do draw by using getDisplayMesh. To be more precise, I just have a local var of type TriMesh that I build using setMesh. The look is wireframe and this is fine with me

So my problem is that I want to draw with differents colors depending on various parameters. Iíve been setting vertex colors using SetVertColor and set the showVertexColors to true but itís not working.

Is my approach wrong ?

JHN
03-31-2009, 10:19 AM
Are you building a simple plugin?
You should have a look at meshop mapfaces, vertex colors live in the UV map channel, it's in UVchannel 0 to be precise. So getMapFace and setMapFace and get and setMapVert would be the tools needed to set the vertex colors.

-Johan

kittikun
04-01-2009, 05:07 AM
Hum it seems that helper doesn't allow vertex color usage so I switch my object type to simpleObject. It works but only in the perspective viewport and it's not in wireframe.

Other viewports doesn't that colors in account..

kittikun
04-01-2009, 06:33 AM
I'm wondering if drawing directly on the viewport using gw functions could do the job but it's only drawing in the active viewport which again, so that won't do it.

CGTalk Moderation
04-01-2009, 06:33 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.