Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Issue with PaintingMode.ADD_COLOR #3

Open
EduardChernikh opened this issue Jun 19, 2021 · 1 comment
Open

[Question] Issue with PaintingMode.ADD_COLOR #3

EduardChernikh opened this issue Jun 19, 2021 · 1 comment

Comments

@EduardChernikh
Copy link

Hi. I have an issue with PaintingMode.ADD_COLOR:

If i build over previously untouched area - i have weird texture (random purple artifacts), and if i paing over previously destroyed area of terrain i have black texture here as if i use issue with PaintingMode.REPLACE_COLOR and Color set to Color.black; Is this a bug or im doing something wrong?

@Ideefixze
Copy link
Owner

I checked it in the preview scene included in this repo and if I get it correctly I think I might know what is happening here.
This is an issue, but it is related to two things: the way how ADD_COLOR mode works and how Unity handles textures.

ADD_COLOR just takes color that is on the texture and adds RGB values.

Unity on the other hand handles textures in more complicated way and it is even hard for me to elaborate on this topic further.
The best way to see it is to, after you run you game with DTerrain layers in it, go to Scene view. Under tab "Scene" you have dropdown list with many different render modes and if you select "Mipmap" mode you can see how colors are streched out even though there should be transparent color.

ADD_COLOR mode on untouched area looks like it would now take the closest color and expand it.

Currently, I am unable to dig deep into this issue. Try to play with orginal texture import options especially: "alpha is transparency"
This made my preview scene on ADD_COLOR to fill untouched terrain with a one color (which was a beige color, weird).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants