Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / SetVertexColor in mesh - how to avoid color bleed?

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 28th Aug 2017 19:40
So, in the screenshot I have a subdivided plane with vertex painted (in lightwave) colors in it.
The nice square colors are painted in lightwave and thes one circled are made using the Vertex color commands via memblockfromMesh commands.

I can reproduce the "bleed" in lightwave by selecting the "paint by indices" mode, but I really need to have distinct painted polys like I can export from lightwave when I select the "paint by polygon" mode.

I spent hours today getting this far - I tried to do it with UVs but had the same bleed problem when I moved the vertices around.

Is it even possible to manipulate the mesh and paint the surfaces without this bleed?

Attachments

Login to view attachments
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 29th Aug 2017 00:26 Edited at: 29th Aug 2017 00:30
I think you need double vertices for the hard edges...
Never got hard edge colours working ...but I believe it is because the vertices share the Color of their neighbours and then they get interpolated in between two different colours...
Did you try an atlas texture with transparent space between the Color sections and then manipulate the UV ...
I imagine this gives you the effect you need.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 29th Aug 2017 18:16
Well, I tried the UV method, but had different problems. The "pulled" vertices don't have their positions updated. Anyway, I'm trying a 3rd way to do this now... see how it goes.

At least I can vertex paint in my model now - just not in the way I want in AGK. Lightwave doesn't add vertices to do the poly paint (at least I didn't notice)
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 30th Aug 2017 22:11
It looks like Lightwave is making an optimization and sharing vertices where the color is shared. Hard boundaries require each polygon to have it's own vertices. When you color it in Lightwave it will see that the polygon on each side of the color boundary has a different color so it must create two vertices, one for each polygon, each with a different color. When it sees two polygons that have the same color it only needs to create one vertex and can share it with both polygons. Then when you import it into AppGameKit you can only modify the shared vertex which then affects both polygons. You'd need to find some way to export from Lightwave with no shared vertices, so every polygon has its own vertices.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 31st Aug 2017 01:09
Thanks Paul. I think I've abandoned that line of inquiry.

I guess there's no chance of the vertex painting option in AppGameKit to have that option?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Aug 2017 01:10
I think you can do this with ultimate unwrap by loading the model then Ctrl+A to select all then 3d Tools/Unweld vertices
I did a whole lot of experimenting back when (i think) janbo wanted to use the Kenny models
As i recall meshlab did a better job of loading the model and i think it will unweld the vertices too
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 31st Aug 2017 01:45
Quote: "I guess there's no chance of the vertex painting option in AppGameKit to have that option?"

You can paint the vertices but if they are shared they will affect multiple polygons. We have no plans to add vertex splitting, it sounds like there might be external apps that can do this though.

Login to post a reply

Server time is: 2024-11-24 09:21:49
Your offset time is: 2024-11-24 09:21:49