Jump to content

Blending mode for terrain materials....


Mitovo

Recommended Posts

Pretty sure that's the first time I have seen anybody argue to keep something more difficult than necessary :p


While there are a multitude of nuances that make textures great, removing tessellation artefacts, getting the lighting right etc does not mean that the terrain painting system should be difficult for an average dev to make good terrains for.


Despite duions valiant attempts to tell the world that his terrain textures are the best terrain textures in the world, it is obvious that those textures do not actually work with torque.


The blending artefacts displayed in jeffs images exist everywhere regardless, to such an extent that even the so called best textures ever look shite, I even downloaded the latest ubergame to see how duion does it to make them look good, I figured there were just some settings I was missing. but they look shite in ubergame too.

Link to comment
Share on other sites

  • Replies 93
  • Created
  • Last Reply

Top Posters In This Topic

Where was i arguing to keep things more difficult? I was pointing out creating textures is a difficult process, there is no getting around this. Just because something is conceived as been easier doesn't mean it is better.

Link to comment
Share on other sites

And if you use the intensity setting in the terrain materials editor for the layers the system becomes even more tolerant.

For example if a texture is too dark just lower the instensity until it fits, there is nothing you need to do outside the engine for that, I use it often for finetuning, when I don't want to edit the image slightly just to get some more or less intensity in the engine.


Then if you complain about 15 minutes of work for a texture you may be in the wrong business. A single texture can take up to multiple hours of work, if you actually do the work yourself and not just use bought ones or exported from some tool.

Even if you are very generous and calculate in 2 hours per material, you can still produce 4 per 8 hour workday. So lets say your job is to do textures for a game for a total of 10 unique levels then it just takes you two weeks to get all the terrain texture work done for the whole game. So even an indie dev can afford to make excellent textures.


Just for the setup and testing of a texture you need at least 15-30 minutes, there is no way you can cut that time down without loss of quality of your product, there is no software yet that can replace a human looking at actual results and testing the game for real.

Link to comment
Share on other sites

if by intensity you mean the strength settings, they are pretty useless now compared to previous versions regardless of the workflow methods.


Problems are as such :-

If you want to use greyscale detail and macro textures as is the traditional method, you need to make quite a pale greyscale image, then to get the level of detail you require starts to force the whites through and 'wash out' the colour of the main texture, if your greyscale is too dark then it all goes to pot really quickly.


Using coloured detail textures, which used to work, no longer works at all, there are no settings I can find anymore that create decent looking terrain painting with this method. Now it may be that this method of working is no longer supported, but it was always a fallback when detail textures were of insufficient quality to make decent looking terrain.


http://i.imgur.com/kTBfeSG.jpg


http://i.imgur.com/qD0afeX.jpg


The second of those two images has the ability to be improved via tweaking imo, the first not so much

Link to comment
Share on other sites


http://i.imgur.com/kTBfeSG.jpg


http://i.imgur.com/qD0afeX.jpg


The second of those two images has the ability to be improved via tweaking imo, the first not so much

Yes, the first one is made by me and the second one is the same, but after you broke it, congratulations, this now proves that you have no idea how it was done before after you broke it.


For all others please ignore this as there is no different terrain method used in both slots nor any different blending methods, nor any different terrain materials, the only thing that happened is that Bloodknight ripped the terrain out of my game and broke the scene by importing it in default Torque without keeping the settings or the features added in my engine fork.

This proves nothing other than Bloodknight having no idea what he is doing.

Link to comment
Share on other sites

[13:26:54] [bloodknight] 3.8 default detail strength 1 http://i.imgur.com/qSyXlRX.jpg

[13:27:21] [bloodknight] 3.8 detail strength 2 http://i.imgur.com/hiZhXtL.jpg

[13:28:09] [bloodknight] 3.9/3.10 default detail strength 1 http://i.imgur.com/JyjR7GF.jpg

[13:28:47] [bloodknight] 3.9/3.10 detail strength 0.5 http://i.imgur.com/CL19wO9.jpg


you can increase the intensity of the detail in 3.8 by increasing the strength value, this does so nice and even, in 3.9 and above the only way is to decrease the detail intensity which kills the detail


While this is probably getting into the realms of subjectivity with regards to visuals, to me at least the former system allows for much more flexibility, while the current systems forces you to make perfect textures else it will look terrible.


It appears to me at least that this change was made without proper testing, I did note that there was a change at one point to lighten the supplied detail textures, this imo does precisely the opposite of whats needed, it reduces the detail levels and at the same time does not fix the ugly intense spots.


for me at least i am going to hunt down the change from 3.8 and revert it, hoping to hell that this isnt part of the dx11 changes

Link to comment
Share on other sites


http://i.imgur.com/kTBfeSG.jpg


http://i.imgur.com/qD0afeX.jpg


The second of those two images has the ability to be improved via tweaking imo, the first not so much

Yes, the first one is made by me and the second one is the same, but after you broke it, congratulations, this now proves that you have no idea how it was done before after you broke it.


For all others please ignore this as there is no different terrain method used in both slots nor any different blending methods, nor any different terrain materials, the only thing that happened is that Bloodknight ripped the terrain out of my game and broke the scene by importing it in default Torque without keeping the settings or the features added in my engine fork.

This proves nothing other than Bloodknight having no idea what he is doing.

 

congratulations on making yourself look completely silly.


Both of those screenshots use EXACTLY the same textures with EXACTLY the same settings

Link to comment
Share on other sites

for me at least i am going to hunt down the change from 3.8 and revert it, hoping to hell that this isnt part of the dx11 changes

The change does not exist as there has never been a change to the terrain system.

 

Both of those screenshots use EXACTLY the same textures with EXACTLY the same settings

No, they do not, should be totally obvious if you look at the screenshots that they are not the same textures or settings.


Would you please stop destroying my art and the versions you violated for misrepresentation of the engines features?

Link to comment
Share on other sites

Just putting it out there, texture creation shouldn't be easy, this is a complicated process that requires skill and time. Just because one can slap in any ol' texture and make it look good shouldn't even factor into the equation imho. Personally i think the lukas method would be fantastic if the terrain was using virtual textures,that is a setup with pretty much unlimited layers.

 

You're definitely right, it's not particularly easy to produce good textures(though as tools continue to improve, it gets easier and easier). I would say there's a difference between 'difficult' - as in just simply skill intensive - and 'opaque' - as in difficult to comprehend and develop the skill for. Understanding what's needed to produce good detail textures is closer to the latter than the former. If it was just skill intensive, that'd be fine, but how the detail textures crush the color range so aggressively makes picking out good values unnecessarily complicated, which I think is where the problem stems from. As @Bloodknight notes, it could well be a change from a while ago that slipped past because it looked OK with the older, stock textures and correcting that could well solve all this anyways :P

 

for me at least i am going to hunt down the change from 3.8 and revert it, hoping to hell that this isnt part of the dx11 changes

The change does not exist as there has never been a change to the terrain system.

 

Well, that's not actually correct. There's been a number of changes to the terrain code: https://github.com/GarageGames/Torque3D/commits/development/Engine/source/terrain


It does, however, look like some changes happened that looked OK with the default textures, but using newer or more complex textures it does not behave as well. Somewhere since 3.8 it looks like that snuck in, as @Bloodknight mentioned. This is also why we need a new batch of textures, to better test a wider range of stuff so changes that may be regressive don't slip past. If I can, I'll also poke through the changes since 3.8 so we can try and narrow down which part is causing the weirdly excessive color crushing we're seeing. It's fine for a detail texture to brighten/darken the BaseTexture colors - that's it's job mechanically - but it shouldn't smash to black at the drop of a hat like my test was running into. That definitely seems incorrect.


Also, @Timmy pointed out to me - and he's certainly not at all wrong - that it's entirely possible to just have a setting that dictates the blend/detail behavior. So you could utilize the grayscale detail texture approach, or flip over a setting and it'll utilize the different method Lukas has been looking at, etc. This way, older, pre-existing art like @Duion's stuff isn't ruined or negatively impacted, but if you need a scene where you need the full colors for up-close details on the terrain textures, that's also an option.


So that well could be a good comporimise and just leave it to the user to dictate which mode suits their needs for the given project.

Link to comment
Share on other sites

Also, @Timmy pointed out to me - and he's certainly not at all wrong - that it's entirely possible to just have a setting that dictates the blend/detail behavior. So you could utilize the grayscale detail texture approach, or flip over a setting and it'll utilize the different method Lukas has been looking at, etc. This way, older, pre-existing art like @Duion's stuff isn't ruined or negatively impacted, but if you need a scene where you need the full colors for up-close details on the terrain textures, that's also an option.


So that well could be a good comporimise and just leave it to the user to dictate which mode suits their needs for the given project.

 

I've been reading along quietly for awhile now soaking up the pros and cons of up updating the terrain system, but what are the real cons? Honest question here. The established system is being weighed against one that doesn't exist. I've seen the steering committee do amazing things with Torque over the years, and I seriously doubt you guys would try a new system and "ah hell let's just keep it" if it wasn't an improvement. I guess the only reason I'm even speaking up now is because "compromise" for the sake of backwards compatibility has played no small role in holding Torque back in the past. So if everyone here believes that being able to choose the older blending behavior and greyscale detail really adds something to T3D 4.0 moving forward, then absolutely keep it in. If its left in for any other reason. . . please just trash it.


I'm not trying to start an argument. Just adding my two cents.

Link to comment
Share on other sites

I think the issue is more one of an emergent behaviour based on more than one change in a variety of slightly different systems, rather than a specific decision made on a particular part.


Or at least that is my understanding after the past few hours or work and discussion by those smart enough to fix such things :)

Link to comment
Share on other sites

So if everyone here believes that being able to choose the older blending behavior and greyscale detail really adds something to T3D 4.0 moving forward, then absolutely keep it in. If its left in for any other reason. . . please just trash it.


I'm not trying to start an argument. Just adding my two cents.

 

The financial argument is being able to have that many more sources to get art from.


Unlike the upcoming kill-off of the concepts behind specular maps, this would be one hit for folks we can mitigate without causing retooling nightmares since we're just talking an internal shadergen switch, not unlike the https://github.com/Azaezel/Torque3D/blob/PBR_w_probes/Engine/source/lighting/advanced/hlsl/deferredShadingFeaturesHLSL.cpp#L81 bit for folks more familiar with old specular greyscales vs a metalness/roughness workflow. (they go in opposite directions for similar, but not truly equal, outcomes.)

Link to comment
Share on other sites

I modified shadergen in the current development version and tweaked the blending and got the following results:


Current unmodified development version (see below for explanation):

http://i67.tinypic.com/5eijyr.png


Torque 3.8(this is before the linear changes that cause the above):

http://i67.tinypic.com/wmmmb6.png


Tweaked blending with development version:

http://i65.tinypic.com/280tfea.png


So the tweaked version is pretty close to the original results in older versions of T3D (versions before the linear change over)


One thing to note is in the source code here https://github.com/GarageGames/Torque3D/blob/development/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp#L563-L573 . What is happening is the detail texture is getting brought from a 0 -> 1 (0-255) range into a -1 -> 1 range. So if the brightness is 0.5 in the original texture(128) than that value is mapped to 0, it won't darken or brighten your base texture. if your value is below 0.5 or above 0.5 is will darken or brighten the base color. The final equation is here https://github.com/GarageGames/Torque3D/blob/development/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp#L585 ... output += detailColor * detailBlend; The reason the first picture in my example is so dark is because the output color is in linear space which actually gives technically correct results, it just so happens the old method using gamma space looks better for most cases. So much so that CryEngine actually manually converts the 'outColor' back to gamma space, perform the final maths operation and than convert back to linear space. So yep that method is exactly what i used to produce the last screenshot, it effectively is restoring the old blend method or at least a result that is pretty darn close to it.

Link to comment
Share on other sites

So looks like we found the "bug", even though probably unrelated to the initial issue.

It looks to me that the 3.9 changes improved the overall look of the terrain, making it more realistic, but also made the whole blending more sensitive so you hit black and white spots more early.

Did you use the same method as Cry Engine?

Link to comment
Share on other sites

So looks like we found the "bug", even though probably unrelated to the initial issue.

It looks to me that the 3.9 changes improved the overall look of the terrain, making it more realistic, but also made the whole blending more sensitive so you hit black and white spots more early.

Did you use the same method as Cry Engine?

 

I only borrowed the idea of doing the blending in gamma space even though they are using a full linear pipeline like we now are. So the blending equation is completly unchanged from T3D 3.8. I'm guessing the CryEngine guys either ran into the same problem we did or maybe they didn't want to break older projects or they just liked the results this way better? Anyway hopefully the blending should be back to how everyone was used to in T3D 3.8 and earlier (i honestly can't remember if we switched to linear pipeline in 3.9 or 3.10). There still are few differences compared to the old way but i think the results are pretty close.

Link to comment
Share on other sites

oh yeah i should point out, if you want to see the difference between using the correct color space and the incorrect one, look at the color of the sand texture in picture 3 from my above post and compare it to picture 2, picture 2 is T3D 3.8 which is incorrect, you will notice it is brighter and has a more yellow tinge compared to picture 3. If you open that texture in photoshop picture 3 will match up perfectly and picture 2 will not

Link to comment
Share on other sites

Sorry my last post on the subject, my apologies if i come across angry or grumpy to anyone, i just didn't want to see a battle tested method get scrubbed. I'm not against a new way of doing the texturing and especially if it could be done in a way that preserves the current method and gives the user a choice. There have been some really nice advancements with this stuff in other engines like used in Battlefield and FarCry that use virtual textures (improved method based on the original Id mega textures), having unlimited layers and decals i'm sure is an artists wet dream :lol:

Link to comment
Share on other sites

Well that picture 2 is wrong we pretty much agree upon I think, but picture 1 and 3 have the same color but the intensity is different.

Now the question is which method is actually better, picture 1 or picture 3.

I already adapted all my levels and textures to work well with the new method, so before I change everything back I need to decide if there is actually any real benefit.

It is a bit deceptive marketing if you use textures adapted to an old method and use them unchanged with new methods they are not adapted for, obviously they will look wrong, since they are not made for that, so just because one test looks better than the other proves not much at this point.

All you need to do to fix the over dark areas is to brighten up the texture by 10-20 points.

Link to comment
Share on other sites

Well that picture 2 is wrong we pretty much agree upon I think, but picture 1 and 3 have the same color but the intensity is different.

Now the question is which method is actually better, picture 1 or picture 3.

I already adapted all my levels and textures to work well with the new method, so before I change everything back I need to decide if there is actually any real benefit.

It is a bit deceptive marketing if you use textures adapted to an old method and use them unchanged with new methods they are not adapted for, obviously they will look wrong, since they are not made for that, so just because one test looks better than the other proves not much at this point.

All you need to do to fix the over dark areas is to brighten up the texture by 10-20 points.

 

There is only 4 lines of code to switch between the methods, so should be easy enough for ya to keep the current method in place for your game build. Fire me a PM if you are doing a merge with the GG development branch and i will point you to area that was changed so you can ignore it. Well that is provided these changes even go into the GG repo, i only passed along a potential 'fix', nothing more ;)

Link to comment
Share on other sites

All you need to do to fix the over dark areas is to brighten up the texture by 10-20 points.

Could you make an example of that with the @JeffR textures? Just using the albedo as detail?

And is it always the same level it needs to brighten with? It's possible to add a "brighten" setting to the texture layer.

Link to comment
Share on other sites

All you need to do to fix the over dark areas is to brighten up the texture by 10-20 points.

Could you make an example of that with the @JeffR textures? Just using the albedo as detail?

And is it always the same level it needs to brighten with? It's possible to add a "brighten" setting to the texture layer.

 

If ya have photoshop look at the histogram and check the mean avg. 0 - 127 will darken , 128 will keep the same 129-255 will be brighter. If you bring those values into floating point range which the shaders use just do mean_avg * 1/255. Than take that number and multiply by 2 and minus 1, now you have an easy reference, if the number is positive it goes bright if the number is negative it goes dark

Link to comment
Share on other sites

One other method you could do, this one is for peeps that prefer grey scale only, change this https://github.com/GarageGames/Torque3D/blob/development/Engine/source/terrain/hlsl/terrFeatureHLSL.cpp#L571-L572 (this would need to be changed for MFT_TerrainSideProject feature and also for the macro version too and glsl) .

//Enforce GreyScale only
meta->addStatement(new GenOp("      @ = ( @.Sample( @, @.xy ).rrrr * 2.0 ) - 1.0;\r\n",detailColor, detailTex, detailMap, inDet));

 

Impossible than to have a detail with color this way. Not suggesting this be changed in the main repo but if that is your personal preference, that is how you do it.

Link to comment
Share on other sites

OK I made some tests using that fix:


normal: http://duion.com/files/temp/bugs/DRday_021-0002.png fixed: http://duion.com/files/temp/bugs/fixedDRday_022-0000.png


close normal: http://duion.com/files/temp/bugs/DRday_021-0000.png close fixed: http://duion.com/files/temp/bugs/fixedDRday_020-0000.png


very close normal: http://duion.com/files/temp/bugs/DRday_021-0001.png very close fixed: http://duion.com/files/temp/bugs/fixedDRday_020-0001.png


Conclusion: The current method results in high contasts and more color and the fixed version does avoid high contrasts and dark spots and has less color.


I did not adjust the textures in any way, but I noticed that I can increase the texture strength easily up to 2 times the intensity depending on texture without getting too high contrasts and black or white spots, which results in better detail. This means that I could now go and raise the strength of each terrain texture layer up to 2 times the intensity depending on texture around 1.5 average seems to work and get more closeup detail without getting black or white spots. So there may be an advantage there also the textures can look more original.


PS: Also when I would switch algorithms now, there would be no need for me to adjust anything, it still looks fine, just occasionally some textures could use a higher strength value which can be done in Torque directly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...