Page 2 of 10

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 7:15 am
by Mitovo
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...
I don't know. I'm at a complete loss here. I have brought the values down to the point where the stupid thing is practically one color, and I'm still getting extremes of dark and light in the blended material, or it's just washed out and dull if I lower the values too much.

I really really really really hope that a plan to implement a more normal, sane and intuitive material system is in the plans for the next major version of T3D, because this current incarnation is just a train wreck. Look at any other engine out there, and they have a superior approach to this. It's pretty obvious why no other engine on the market, AAA, indie or otherwise uses such an obtuse or needlessly complicated approach as T3D's. It's utterly horrendous, and needn't be. It's so bad that no one is even able to confidently describe how the heck the system even works. How was this ever given the go-ahead in the first place? Seriously.

Sorry for the rant, but I've had an easier time figuring out complicated math problems than I have trying to understand what the heck is going on with T3D's material system.. and I flunked math.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 7:21 am
by Azaezel
It''s certainly been discussed, certainly not personally opposed to the notion, of doing say, a pure multiplier though it will force pre-exisitng projects to update all their stuff. But yeah detail maps take 50% brightness per channel as 'don't change the color relative to the base texture' <50% brightness as a darken, and >50% as lightening it. So for the system in place at this point in time, till enough folks weigh in, the suggestion would be greyscale hovering around 128ish.



EDIT: for the actual math behind it, see:

https://github.com/GarageGames/Torque3D ... L.cpp#L571

which translates to (simplified)

detailColor= ( detailMap ) * 2.0 ) - 1.0;

(another line dealing with detail vs detail blend that we'll skip)

and
https://github.com/GarageGames/Torque3D ... L.cpp#L585

outColor += detailColor * detailBlend;

where detailblend is another bit that addresses smoothing out detail vs detail influence.

Don't personally have Photoshop to compare the results there or I'd have been able to tell you which of the options to use for replication definitively. Apologies there.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 9:14 am
by JeffR
I really really really really hope that a plan to implement a more normal, sane and intuitive material system is in the plans for the next major version of T3D, because this current incarnation is just a train wreck. Look at any other engine out there, and they have a superior approach to this. It's pretty obvious why no other engine on the market, AAA, indie or otherwise uses such an obtuse or needlessly complicated approach as T3D's. It's utterly horrendous, and needn't be. It's so bad that no one is even able to confidently describe how the heck the system even works. How was this ever given the go-ahead in the first place? Seriously.

Sorry for the rant, but I've had an easier time figuring out complicated math problems than I have trying to understand what the heck is going on with T3D's material system.. and I flunked math.
Yes. I'm shooting to move away from the current TerrainMaterials and just utilize regular Materials. The current system is a holdover from ye olde days, where you were extremely texture sample limited and so you couldn't do a bunch of distinct materials that also had 2-3 additional supporting textures. Lukas has already been eyeballing making the rendering more efficient and streamlined by rendering as much as physically possible in a single frame, and from there I'm looking to shift to regular materials(at least pull the diffuse,normal and spec/composite for regular, consistent rendering behavior, anyways). Because I agree with you, the current detail texture is too squirrely and unreliable.

For the moment however, it may help if we can compare notes. If possible, uploading the textures somewhere so we can also fiddle with them could help understand where it's going pearshaped.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 11:30 am
by Duion
@
User avatar
Mitovo

Just because you do not understand instantly how the system works, you demand to change it so it fits your needs and then you demand that every person in history of Torque3D before you is forced to change all his textures and all his workflow according to the way you like.

The system is also not "utterly horrendous" since I could instantly understand how it works and make nice terrain textures. Torques terrain system is actually superior in blending out repeating textures using the macro texture layer that probably no other engine has.

Yes, the blend mode may not exactly be multiply, I just said it, since it is used in the regular material system, in reality it is probably more like Azaezel said, it is a method that brightens when it is more than 50% gray and darkens when it is less than 50% grey.

Making your textures right before you import them in Torque is also not that important, since you can change the intensity of the texture in Torque itself.
For example the issue you showed on the screenshot could probably have been resolved by reducing the intensity which would have cost you a few seconds time.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 2:51 pm
by Mitovo
@Mitovo
Just because you do not understand instantly how the system works, you demand to change it so it fits your needs and then you demand that every person in history of Torque3D before you is forced to change all his textures and all his workflow according to the way you like.
.
"do not instantly understand"?

Get off your high-horse, Duion. You don't know me.

You also don't know, nor speak for "everyone else using T3D".

I could easily flip your argument around to say "You just don't want the system to change because you're used to it and don't want to have to change how you do things", and it would certainly be a more reasonable assertion, because it's based on your own actual comments.

I'm arguing for replacing - or at least adding an option other than one that is woefully outdated - with something that's more up-to-date, more intuitive, more in line with how every other engine out there handles diffuse, detail, normal maps, that allows more people to use a texture workflow they're familiar with (because it's similar to most every other engine available on the market), etc... and that might even help make T3D a more attractive option to people whom (and we don't know how many there are or aren't, because not everyone will post about frustrations, they'll just go away) might be otherwise put off by the material system, among other things.

I've been trying to wrangle this texture system to consistently produce the kind of results I want since before it was open source. It's been extremely hit or miss at best. I've asked a number of times, each time hoping maybe someone can give a practical, direct explanation of the processes they're using to get their results...No one has. It's just been "oh you just have to make sure the values hover around 128" - which I already know. That's heightmaps 101, and how it works with anything where color value determines how something is rendered (such as heightmaps, or the "emboss" tool in Photoshop, different blending modes, etc). I understand how material systems work for real-time 3D games/apps.

The issue is with how *T3D* uniquely handles that blending, which is completely at odds with probably literally every other engine out there. There's this standard approach to how things like this are handled... and then there's the "T3D way", and the two do not overlap, at all.

I'm able to get exactly the results I want in any other engine with minimal effort - it's practically plug-and-play in most cases. Select the appropriate texture for each slot, and it just *works* (because, despite what you might want to assume about me, I actually *do* understand how this stuff is supposed to work). T3D is the only one where they come out looking completely wrong, even after me sitting here fiddling ridiculously with decimal points, where .3 is way too weak, .4 is too strong, and .35 doesn't look good either. NO one else does it like this, and the reasons are self-evident.

How about this, Duion.. How about, instead of you getting up on your high horse and arrogantly talking down to me as though I'm beneath you because "You were able to figure it out instantly" (which I'm calling BS on)... Go check out Esenthel engine and see how straight forward and intuitive their Material system is.. watch how the results come out *great* no matter how you move the *sliders* - not typing decimal numbers in... *sliders* - with a live preview! Notice how you can get exactly the results you want, or even a variety of different options, with next to no effort.. just drag and drop textures to the appropriate slots, and move a few sliders.

Go check out Leadwerks. Go check out Neoaxis. Go check out literally any other game engine out there and play with their material system.

Notice how, though their interfaces are different, and have different amounts of control, they nonetheless can predictably yield very consistent results and with very little, if any, meddling.

If you come back still insisting that T3D's system isn't inferior and couldn't be vastly improved for everyone - yes, including people already using it - then you are either lying, a masochist, are dealing with a strange case of Stockholm syndrome, or don't like things intuitive or straight forward.

People might have to change the way they set up their textures? Probably. But based on my experience, it would actually be far easier, and require far less work, because they can create the diffuse texture as they want the final product to look, and then just make sure it tiles seamlessly. They wouldn't have to play "floating point texture math" with diffuse and detail images to get the results they want. I can't fathom how that would be a bad thing.

Change isn't always bad, and this would certainly be for the better. Many game engines don't even use detail textures anymore, because the diffuse texture is tiled, with all the resolution and detail baked right into a single image. From there it's just adding additional shaders/layers.

And at the end of the day, it doesn't have to be a dichotomy. It doesn't have to be "one or the other". They could choose to keep the current system in place as well, and let the creator decide which system they want to work with - the current system, or the new one, much like they do with letting you choose which physics system, which graphics API, etc. Options are a good thing, yes?

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 3:17 pm
by Duion
@
User avatar
Mitovo

And how does every other engine do it? Do you have proofs for that? Do you know the algorithms? Can you show evidence that it looks better?

I mean you could do some research how others do it, find out the algorithm and make a pull request to change the blend algorithm and if you do not know coding, I'm sure someone will help you integrating it.

Besides that I offer you to prove your claims by providing a texture, set it up in another engine and Torque3D and make a comparison screenshot and then you give it to me and I see if I can replicated how you think it is supposed to look in the engine of your choice in Torque3D.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 3:24 pm
by Mitovo
I really really really really hope that a plan to implement a more normal, sane and intuitive material system is in the plans for the next major version of T3D, because this current incarnation is just a train wreck. Look at any other engine out there, and they have a superior approach to this. It's pretty obvious why no other engine on the market, AAA, indie or otherwise uses such an obtuse or needlessly complicated approach as T3D's. It's utterly horrendous, and needn't be. It's so bad that no one is even able to confidently describe how the heck the system even works. How was this ever given the go-ahead in the first place? Seriously.

Sorry for the rant, but I've had an easier time figuring out complicated math problems than I have trying to understand what the heck is going on with T3D's material system.. and I flunked math.
Yes. I'm shooting to move away from the current TerrainMaterials and just utilize regular Materials. The current system is a holdover from ye olde days, where you were extremely texture sample limited and so you couldn't do a bunch of distinct materials that also had 2-3 additional supporting textures. Lukas has already been eyeballing making the rendering more efficient and streamlined by rendering as much as physically possible in a single frame, and from there I'm looking to shift to regular materials(at least pull the diffuse,normal and spec/composite for regular, consistent rendering behavior, anyways). Because I agree with you, the current detail texture is too squirrely and unreliable.

For the moment however, it may help if we can compare notes. If possible, uploading the textures somewhere so we can also fiddle with them could help understand where it's going pearshaped.
Hiya, Jeff...

That's heartening to know, and I believe you (or someone else?) might have indicated this elsewhere at some point as well - that the system is seeing an overhaul. In fact, I think I might have linked to a video demonstrating how it could be done (based on another engine).

So, I wasn't being hyperbolic in calling the system outdated and not with the times, then.. but was quite literally describing it based on its origins? Well that's a happy coincidence! I was thinking purely in terms of the process itself. I wasn't even aware that it was still a hold-over from the old TGE/TGEA way of doing things. I thought they'd decided to use a new system with T3D, and somehow thought "yeah, this would work great", in contradiction to every other modern game engine out there :p.

I hadn't seen any specific mention of overhauling or changing up how terrain textures are handled for the next major version, so I wasn't sure if that had been nixed or what not.

That's great to know. As I said in my response to Duion, even if the current system is kept in place as an option to be selected when a project is created (if that's do-able), so those who prefer it the way it is now can continue working as they had. I just feel like there's an opportunity (and potentially/possibly more users) being left on the table in strictly sticking to the way it is now.

As for which textures to use, etc.. Honestly, I've overwritten, adjusted and saved over the images I'm trying to use (just to get the process down with at least one material) so many times, I'm not even sure how far off the path I am at this point lol.

Maybe I just need to try looking at other materials made for other demos (not the ones that come with T3D since they're from TGE/TGEA as well, from what I can see) and try to figure out how those were set up, so I can do that "texture math" and get the correct results.

If I'm *still* having trouble with it... well, yeah.. then I'll post the images I'm trying to work with and go from there.

Thanks!

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 3:31 pm
by Mitovo
@Mitovo
And how does every other engine do it? Do you have proofs for that? Do you know the algorithms? Can you show evidence that it looks better?

I mean you could do some research how others do it, find out the algorithm and make a pull request to change the blend algorithm and if you do not know coding, I'm sure someone will help you integrating it.

Besides that I offer you to prove your claims by providing a texture, set it up in another engine and Torque3D and make a comparison screenshot and then you give it to me and I see if I can replicated how you think it is supposed to look in the engine of your choice in Torque3D.
First: I have no idea how they're doing it "under the hood", nor should I have to. I'm talking about how it works for the end-user, for the artist setting up and creating the materials. They shouldn't need to know what math is going on in the background - and that such a thing should even have to come up, when we're talking about *art* and not *programming*, really underscores the problem.

All an artist should need to know is what they can achieve, and what texture to put where to do so.. and they can all achieve consistent results. You can easily download NeoAxis, Esenthel, Leadwerks, Unity3D, or any of a number of other engines and test them out for yourself. If you want to get into the more Node-based approach, you can check out Unreal Engine 4.

Second: I'm not contending that you can't get good results with T3D.. I've seen some myself, and I'm playing a game made with T3D (Life is Feudal). My argument is that T3D's system is needlessly obtuse, not intuitive and is outdated - quite literally, per JeffR themself - and could seriously do with an overhaul, to a more modern and user-friendly setup.

I needn't argue the point any further of how or why T3D's system is outdated because it's been pointed out definitively that it absolutely is, literally. As was pointed out, it's a carry-over from older technology that is no longer used. It's a remnant of ~10 year old tech. So, I was more on point than even I thought when I called T3D's tech outdated.

And my arguments don't preclude me from trying to come to grips with how it works in T3D. I'm merely pointing out "it doesn't need to be this obtuse and unintuitive, and there are numerous examples available, right now, of how it could be handled far better". Arguing for a newer, better system and trying to learn the existing one are not mutually exclusive.

The point is made, and the argument is done.. things are going to change going forward as they, in my opinion, absolutely should.

So, you can continue to stand there, arms folded, and argue with a dead horse. Have at it. You can continue to argue against more modern, intuitive and flexible material systems utilized by, most if not every other 3D game engine out there, and insist that T3D should stay the way it is "because it would be inconvenient for you to change how you do things", or you can be open to change, open-minded to how things can be vastly improved (and they absolutely can) and see where you can maybe help in that direction.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 3:46 pm
by Duion
Do you have evidence now or not?

So far you just made up claims and showed some random screenshots without providing the steps you took or settings and textures you used

I will certainly not download all engines and test out their material system just to probably find out that your claims were based in no evidence.

So I offer you once again, provide textures and show how you think they are suppsoed to look in another engine of your choice and then how they supposedly look in Torque3D, then give the textures to me and I will see if I can reproduce the result.

Re: Blending mode for terrain materials....

Posted: Sun Jul 09, 2017 4:48 pm
by Mitovo
Do you have evidence now or not?

So far you just made up claims and showed some random screenshots without providing the steps you took or settings and textures you used

I will certainly not download all engines and test out their material system just to probably find out that your claims were based in no evidence.

So I offer you once again, provide textures and show how you think they are suppsoed to look in another engine of your choice and then how they supposedly look in Torque3D, then give the textures to me and I will see if I can reproduce the result.
Ease down, Ripley. You're just grinding metal.

Seriously... Duion... Stop. You're fighting a pointless battle here and, frankly, making an ass of yourself.

The only thing you're proving is that you're an obstinate, close-minded individual, whom apparently either doesn't read what people write, or lacks the comprehension skills to understand it.

I said this already in my last post, but clearly you didn't bother to read it. So I'll sum it all up in a nice, tidy, numbered list.
I'll even type more slowly this time, just so you can keep up:

1) I never said you can't get good results with T3D currently.
2) I acknowledged you can get good results, as I've seen some examples, and am playing a game using T3D (Life is Feudal).
3) My issue is not with the possible results, but in its outdated, obtuse and unintuitive approach to doing so.
4) My point-of-view - not yours - has already been echoed and addressed by someone, whom has confirmed that the system is, in fact, outdated, that it is, in fact, not a good setup, and is, in fact, a left-over from ~10 year old technology.
5) It has been confirmed that a newer, updated and better material system is to be implemented in the future.

That's it. Period. End of discussion.

If you want to respond to challenge me further, I'm just going to tell you to go back and read that list again, repeatedly, until it sinks in. After this post, I will not waste another keystroke trying to get through your thick skull.

The debate is finished. My point has been made, acknowledged and confirmed. There's nothing more to argue, or prove.

It's time to put the stick down, and leave the dead horse alone.