Author Topic: Masks created with Polygon Fill tool corrupt/deformed after new mesh import  (Read 124 times)

Hi!

I am trying to understand what the Polygon Fill tool does EXACTLY behind the scenes. The documentation is not very precise about that.

Problem:
When creating masks with the Polygon Fill tool (no matter which mode) and then re-importing an edited version of the mesh, there is a good chance that these masks are completely corrupted/deformed and need to be done again from scratch.
Of course it has to do with the edits on the mesh.

Question:
I would like to understand how exactly the Polygon Fill tool works.
When using the different modes, how are the selections stored in the Painter scene file? I guess it is not re-projected, but somehow solved by storing vertex IDs?

A detailed description would help me a lot to understand what to avoid when editing meshes and what not.

Best,
tom

Are you adding geometry, removing geometry, or altering the UVs? You'll run into issues if so...

Otherwise make a color id map and use that to mask for your fill layers. When you make changes just update the mask. Either way it isn't a correct workflow to work in Painter, then edit a mesh, then go back to Painter. You should only be baking and texturing at the final stage.

Thanks for your reply, CAgameDEV.

Quote
Are you adding geometry, removing geometry, or altering the UVs? You'll run into issues if so...

Yes, and I want to know exactly why. Because in some situations Polygon Fill is superior to ID masking.
If I would know exactly what happens behind the scenes, I could maybe counteract when editing the mesh.
For example if the masking is based on the vertex ids, then mesh edit operations, which do not change the vertex order, would be valid.

Quote
Otherwise make a color id map and use that to mask for your fill layers.

Yes, that is also our workflow currently. But it is not perfect in all situations.

The problem is that your positions are all based on world space and when you update your mesh you will break your strokes, and masks if the bounding box changes. If you're only working with fill materials then ID masking is the best way to go because you only want to direct the fill of each material as per your ID mask. This allows you to bring back meshes... However this is not an ideal workflow as you should be doing baking and texturing at the end.

See: https://docs.substance3d.com/spdoc/uv-reprojection-28737554.html

I still use polygon fill if I'm not using an ID mask, but I'm not going back and forth into Painter and out of Painter to make mesh changes as this breaks the workflow and creates unnecessary headaches.

Quote
The problem is that your positions are all based on world space ...

Are you sure that the Polygon Fill tool is also projected? I am not so sure about that. It makes total sense with brush strokes and stencils etc, but I would have guessed that the Polygon Fill is storing the vertex IDs or something topology related.
That is why I was hoping for an official statement ;) But I will start doing some tests ... maybe I can reverse engineer.

Quote
However this is not an ideal workflow as you should be doing baking and texturing at the end.

Yes, absolutely. But it is not applicable to all projects. This might work for some well planned game projects, but not in our case. The majority of our assets evolve. We have to go back and forth between the texturing tool (Painter) and 3d packages on a regular basis.

As I said we already use ID masks with good success - but I just would have loved to understand how Polygon Fill really works.

Let's see if I find the time to do some reverse engineering ... I will update this thread then.