Blending mode for terrain materials....

Friendly conversations, and everything that doesn't fit into the other forums.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 10
93 posts Page 1 of 10
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sat Jul 08, 2017 3:44 pm
Hi all,

I'm doing some tests in Photoshop to try and come up with some good looking materials for T3D. I remember someone, at some point, describing the way detail textures are used in T3D as being like one of the blend modes in PS, but I can't remember which one it was, and I can't seem to find the post via searching..

Could someone refresh my memory quick of which it was? Is it Multiply? Or Overlay, maybe?

Thank ya much!
Online Duion
Posts: 812
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Jul 08, 2017 6:33 pm
Textures are blended with multiply, but why don't you just test it ingame?
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sat Jul 08, 2017 7:51 pm
Duion wrote:Textures are blended with multiply, but why don't you just test it ingame?


Well i intend to test it both ways. I find adjusting/tweaking it is easier in PS (adjusting a simple 0-100% slider instead of fiddling with decimal points)... then can test it in T3D to make sure it translates.

Thanks for confirming that :D
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sat Jul 08, 2017 10:28 pm
Well, I can conclusively say that T3D's blending/multiply mode is nothing like Photoshop's. Not even in the same ballpark.

I just did a test in PS to test roughly how it should look in T3D. Got it to where it looks good in Photoshop, brought it into T3D and it looks horrible. Terrible. Not even *remotely* the same. Even with running it through HighPass filter, all values hovering around 128... lighter shades are blown out and darks are pitch black. By the time I lower the value enough to make the values not so extreme

This is what it looks like in Photoshop, with a diffuse texture in the background, and a detail texture above it, set to Multiply at 100% opacity:
Image

This is how the same exact diffuse and detail textures show up in T3D, with Detail texture strength set to 1. Setting it any lower doesn't help at all.
Image

Not even remotely close.

I thought maybe T3D's blending mode is more like Hard Light, but even *that* looks hundreds of times better in Photoshop, almost usable.

What's frustrating, is I've seen others get beautiful results with T3D's system, but I've run into nothing but problems with it for as long as I've been using it. I have to wonder how much hassle they went through to figure out the "magical formula" to make it look right?

Anyway.. Is there any chance that, along with the numerous other changes coming to the next major version of T3D, that this awful material system is being replaced with something more sane and intuitive to work with? More like what every other engine out there has, without all these weird settings?
Online Duion
Posts: 812
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sat Jul 08, 2017 10:39 pm
You have to consider that each layer has a different size, the basetexture is usually like 500 times bigger than the diffuse and the macro texture like 100 times bigger, so did you scale them accordingly in photoshop? Probably not since that is almost not possible.
That's why I said test in Torque3D, since textures are not just blended upon each other, they all have different sizes and therefore the texture will look different everywhere in the game, you also have a texture layer intensity value in the material editor, which can also changes the results.

The magical formula is very simple, as long as your values are around 128, it should blend fine, but you can still adjust the intensity in the material editor later, usually done with macro textures, as they are usually very light.
LukasPJ
Site Admin
Posts: 348
Joined: Tue Feb 03, 2015 7:25 pm
 
by LukasPJ » Sun Jul 09, 2017 12:03 am
I may have changed something in my version, as I'm messing with terrain-splatmap improvements. But in the shaders I have, it's:

$$baseColor + detailColor \cdot detailBlend$$

Which is additive I guess.
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sun Jul 09, 2017 1:56 am
Duion wrote:You have to consider that each layer has a different size, the basetexture is usually like 500 times bigger than the diffuse and the macro texture like 100 times bigger, so did you scale them accordingly in photoshop? Probably not since that is almost not possible.
That's why I said test in Torque3D, since textures are not just blended upon each other, they all have different sizes and therefore the texture will look different everywhere in the game, you also have a texture layer intensity value in the material editor, which can also changes the results.

The magical formula is very simple, as long as your values are around 128, it should blend fine, but you can still adjust the intensity in the material editor later, usually done with macro textures, as they are usually very light.



The base texture is a blurred blend of earthy green/brown/gray, and all medium to medium-dark tones. There's nothing in the diffuse texture, nor the detail texture that should be making *any* part of the material *that* bright, or *that* dark.. not if it is fact a "multiply" blending process.

The difference is night and day. I wouldn't even recognize them as being the same source textures.

My detail map values are all around 128/mid-gray, with only moderate deviations in either direction.

I'm thinking there's more to it than just a straight "multiply" blend going on.
Mitovo
Posts: 85
Joined: Sun Apr 12, 2015 5:46 pm
by Mitovo » Sun Jul 09, 2017 2:03 am
LukasPJ wrote:I may have changed something in my version, as I'm messing with terrain-splatmap improvements. But in the shaders I have, it's:

$$baseColor + detailColor \cdot detailBlend$$

Which is additive I guess.



Well if it's a setup you've changed, then it's possible that yours is different from the default one. Would be hard to say :-/
Timmy
Posts: 308
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Sun Jul 09, 2017 2:06 am
You have to be careful with photoshop, for example the image below was created by having a simple white background and than adding a second layer and making that layer black with 50% opacity. On the left we have incorrect default blending with Photoshop performed in sRGB space, the right hand side is correct blending using linear space. Anyway this is not what is causing your problem, just pointing this out in general.

Image
Azaezel
Posts: 383
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Sun Jul 09, 2017 6:46 am
At time of writing, according to https://helpx.adobe.com/photoshop/using ... modes.html the equivalent is one of

Soft Light
Darkens or lightens the colors, depending on the blend color. The effect is similar to shining a diffused spotlight on the image. If the blend color (light source) is lighter than 50% gray, the image is lightened as if it were dodged. If the blend color is darker than 50% gray, the image is darkened as if it were burned in. Painting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white.
Hard Light
Multiplies or screens the colors, depending on the blend color. The effect is similar to shining a harsh spotlight on the image. If the blend color (light source) is lighter than 50% gray, the image is lightened, as if it were screened. This is useful for adding highlights to an image. If the blend color is darker than 50% gray, the image is darkened, as if it were multiplied. This is useful for adding shadows to an image. Painting with pure black or white results in pure black or white.
Vivid Light
Burns or dodges the colors by increasing or decreasing the contrast, depending on the blend color. If the blend color (light source) is lighter than 50% gray, the image is lightened by decreasing the contrast. If the blend color is darker than 50% gray, the image is darkened by increasing the contrast.
Linear Light
Burns or dodges the colors by decreasing or increasing the brightness, depending on the blend color. If the blend color (light source) is lighter than 50% gray, the image is lightened by increasing the brightness. If the blend color is darker than 50% gray, the image is darkened by decreasing the brightness.


I want to say the last...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 10
93 posts Page 1 of 10

Who is online

Users browsing this forum: No registered users and 2 guests