読者です 読者をやめる 読者になる 読者になる

しゅみぷろ

プログラミングとか

Why is it painted in multiple places?

Introduction

esprog.hatenablog.com

This is an answer to questions about InkPainter.

Why is it painted in multiple places?

f:id:es_program:20170421230929g:plain:w600

You may encounter this situation while using InkPainter.

Is this a bug? Please be relieved, it is not a bug but a specification.

Then why is it painted in an unintended place?

Because, InkPainter paints directly on the texture of the model.

This means that it depends on how the texture is pasted on the model.

To paste the texture into the model, set information on which position of the texture each vertex of the model corresponds to.

This information is called UV or texturecoord, and the modeling process of setting UV is called UV mapping.

Therefore, if there is a surface where UV overlaps, it will be painted in several places. In order to solve this, it is necessary to model so that UV does not overlap. For example, the Unity standard Cube object will display the same place on the texture on all faces.

This is because the Unity standard Cube object has such UV.

f:id:es_program:20170421233452p:plain:w200

UV coordinates set for Unity standard Cube


f:id:es_program:20170421235133g:plain:w600

One side displays the whole texture



On the other hand, this problem does not occur with a Cube object created such that the UVs do not overlap as shown in the developed view of the dice.

f:id:es_program:20170421233511p:plain:w200

Cube where UV is not overlapped


f:id:es_program:20170421235247g:plain:w600

The position of the texture displayed by each face is different