Blending mode for terrain materials....

Friendly conversations, and everything that doesn't fit into the other forums.
94 posts Page 4 of 10
Duion
Posts: 1636
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Tue Jul 11, 2017 5:52 pm
I already explained how that works, I said I usually remove the main color out of the detail texture, so for example I have green grass with yellow flowers, so I remove the green out of the texture leaving me with a mostly grey grass texture but with yellow flowers, if you now blend those two, you get yellow flowers on green grass.
No idea if that is intended this way, but it works fine, you can also just party desaturate the detail texture so all colors will stay in, you just have to take greater care what the final result will look like, since they will add up and you cannot use too much color overall.
JeffR
DEVGRU
Posts: 957
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Tue Jul 11, 2017 7:54 pm
While you are correct that you can do additional processing on the various textures in order to not make them conflict in use, that's a lot of unwanted extra overhead to the art pipeline where there probably shouldn't be. The idea is to make stuff faster and more efficient to use.

Another point of discussion that's come up is shifting over to Virtual Textures for the terrain. I'll do a bit more of a writeup on the details for that a bit later, and if we do it, it'd be after the more immediate blend fixes lukas is already working on(because it'd be a full rework, not just an update), but there are some definite pros and only a few cons to using VTs for terrain.
Steve_Yorkshire
Posts: 345
Joined: Tue Feb 03, 2015 10:30 pm
 
by Steve_Yorkshire » Tue Jul 11, 2017 8:36 pm
@ JeffR
Detail Normal Texture, Alpha Channel: Your height information.
Won't this create horrible artifacts if you can't use DDS DXT5_NM? Or huge file sizes? What else except DDS has an alpha channel? PNG has transparency but not actual alpha.

<EDIT>
I like the idea of full colour diffuseDetailMap with alpha transparancy to control how much diffuseMap comes through.
Azaezel
DEVGRU
Posts: 496
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Tue Jul 11, 2017 9:18 pm
@JeffR
Detail Normal Texture, Alpha Channel: Your height information.
Won't this create horrible artifacts if you can't use DDS DXT5_NM? Or huge file sizes? What else except DDS has an alpha channel? PNG has transparency but not actual alpha.

<EDIT>
I like the idea of full colour diffuseDetailMap with alpha transparancy to control how much diffuseMap comes through.
Couple points simply to clarify: Transparency is Alpha. And the only thing that uses _nm s are normal maps. (Dxt5 does store usable alpha info, though being a compressed format, can lead to artifacting, yes.)
Monkeychops
Posts: 27
Joined: Wed Feb 18, 2015 11:53 am
by Monkeychops » Tue Jul 11, 2017 11:51 pm
I personally don't think you should have to edit the images in photoshop in order to get good results, desaturating some parts and not others etc. Aside from the extra work and slower iteration when trying out different combinations of textures, it also involves a ton of guessing and experimentation.

Why can't we just say that if there's a detail texture, we use that colour and ignore the base altogether? Or mix the base in but never go higher than the sum of the both.
LukasPJ
Site Admin
Posts: 447
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Wed Jul 12, 2017 12:03 am
I personally don't think you should have to edit the images in photoshop in order to get good results, desaturating some parts and not others etc. Aside from the extra work and slower iteration when trying out different combinations of textures, it also involves a ton of guessing and experimentation.

Why can't we just say that if there's a detail texture, we use that colour and ignore the base altogether? Or mix the base in but never go higher than the sum of the both.
I implemented the approach that Jeff suggested. It uses the detail texture color by default (still fading out to the base in distance), but you can choose to blend in the base by adding transparency to your detail texture, basically the more transparent it is, the more of the base color shines through. It uses a lerp between the two based on the alpha channel.

You can try it out for yourself here: https://1drv.ms/u/s!AtrTgygwv8wijutDYzqJ90UqSlqgEQ
There are a few bugs, lerpBlend isn't working and you have to re-generate the base texture (by painting a bit) to make the baseTexture work and it needs a normal map with an alpha-channel in order to blend, but it should give an idea of how it would be with this alternate way of blending.

Edit:
Oh, also the saturation, brightness and contrast are a bit off and way too bright. Press "ctrl+o" to fiddle with that.
Duion
Posts: 1636
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Jul 12, 2017 12:07 am
Come on, editing the textures to make them fit just takes a few steps, desaturate, or partly desaturate, move up the brightness until it is around 128 grey, done, then you can test in the engine and make eventual fixes to the texture itself.
The more options you give people inside the engine, the more complicated and overloaded it all gets and the lazier the people get and the worse art they will produce, if you do not understand how to do 1-2 operations in an image editing program, then you maybe should not do art at all.
LukasPJ
Site Admin
Posts: 447
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Wed Jul 12, 2017 12:15 am
Come on, editing the textures to make them fit just takes a few steps, desaturate, or partly desaturate, move up the brightness until it is around 128 grey, done, then you can test in the engine and make eventual fixes to the texture itself.
The more options you give people inside the engine, the more complicated and overloaded it all gets and the lazier the people get and the worse art they will produce, if you do not understand how to do 1-2 operations in an image editing program, then you maybe should not do art at all.
Duion, you seem to argue that we shouldn't change it, because people should just learn how it works. However, if we're willing to change it, and if we believe it will be easier to use, then what are the arguments against changing it?
Is it actually better with gray-scale maps? We can still allow variety and letting the base-texture bleed through to avoid repetitiveness. In fact we would have fine-grained control over it through the alpha-channel. So what do we lose?

As I see it, the only major thing, would be losing backwards compatibility with existing textures.
Duion
Posts: 1636
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Jul 12, 2017 1:40 am
We could not even identify, if there is any issue, since the original poster could not describe his problem nor bring any evidence and now he seems to be gone anyway.
So what exactly do you want to change now? You need to know what to change in order to change something.

An option to reduce the base texture influence may be a usefull addon, but there are limitations for it, since it brings new problems, for example that the texture will look different in the distance compared to close up and that is already an issue by default, so adding more to it will make it probably worse, then you will need to find something to fix the newly created problem etc etc.
Other engines do it the same, as someone already posted proofs for that, so if not even the biggest engines know how to make it better, how are we supposed to know?
JeffR
DEVGRU
Posts: 957
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Wed Jul 12, 2017 3:20 am
Other engines do it the same, as someone already posted proofs for that, so if not even the biggest engines know how to make it better, how are we supposed to know?
By taking the idea, implementing it, and seeing if we like it better or not. If we don't we just go back to the prior method.
94 posts Page 4 of 10

Who is online

Users browsing this forum: No registered users and 6 guests