Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,921 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Braindawg

GTA V Dithering and Stripple Research and Fix

Recommended Posts

Braindawg

"Dithering is a technique to increase the amount of color and shading that can be done on a system. The effect is achieved by using lines or dots which are then blurred by the video encoders that the system uses."

 

 

 

 

 

-From Emulation General Wiki

http://emulation-general.wikia.com/wiki/Dithering

 

UPiJa.jpg

 

sqHEB.png

 

In GTA IV, GTA V, (Possibly even Red Dead Redemption and Max Payne 3)

 

Rockstar uses dithering to "cover up" LOD (Low on detail) pop ins.

The normal model is only drawn from up close, if you're far enough, the lower detail models will start replacing the normal model, until it completely dissapears.

 

THE DITHERING EFFECT apparently "helps" cover up the transition of these models being drawn. Dithering is also used in edges of transparent textures.

 

GTA IV:

 

Pretty much any texture with an alpha(transparency channel)

That includes:

 

Hair

Chain link fences

Trees

Bushes

Nets

LOD Models for props

Peds appear to pop in without any dithering

 

GTA V:

Hair and beards

Online chains

Earrings

Some shrubbery

LOD models over all.

Some transparent textures

 

Expert photoshop example (Will post screenshots and videos eventually)

ec0cfc2c8e74fa6b7d7a9b3dfcd27873.png

 

Ingame examples:

 

 

04_diffuse_checkerboard_legend.jpg

 

C4Awzle.png

 

 

 

GTA V just seems to be a graphical mystery because this effect doesn't always appear. The transition either appears to be smooth and unnoticed, or horribly pixelated and distracting.

It reminds me of FXAA to an extent, it seems to work on some parts of the screen, but some edges still seem a bit jagged.

 

IN THEORY:

The dithering effect is just a texture like in GTA IV, that can be found and replaces with a smoother one.

 

Check out this good example by DexX for GTA IV:

 

 

 

image_9698.jpg

 

 

 

DOWNLOAD:

http://www.gtagarage.com/mods/show.php?id=5721

 

I am sad to say I've spent about 5 hours looking through the GTA V files and I am sad to say that the dithering or stipple effect adapted from GTA IV is present in the game, and is not complicated to get rid of, if it works the same way it does in GTA IV, and it most likely does.

 

The file is located in GTA IV/PC/Textures in GTA IV, however I cannot find the file anywhere within the GTA V archives!

 

The dither effect does NOT change after altering the following files:

 

x64a.rpf/textures/:

 

depdensity.ytd -> all textures

graphics.ytd -> shadowdither

skydome.ytd -> dither

 

And is most likely not located within that archive.

I've been searching through everything else with no luck. If anyone else finds a file called:

 

dither, dithering, stripple, dith and so on...

 

please post the path!

Edited by Braindawg

Share this post


Link to post
Share on other sites
_CP_

Path is: GTA5.exe

Share this post


Link to post
Share on other sites
Braindawg

Umm, care to elaborate?

Edited by Braindawg

Share this post


Link to post
Share on other sites
_CP_

Dither texture is embeeded in exexutable file, and we can't change it.

Share this post


Link to post
Share on other sites
Mr.Arrow

Umm, care to elaborate?

It's hardcoded.You can't manipulate it if the thing is stored in exe.Unlike a data file,an executable file cannot be read because it has been compiled.

Edited by Mr.Arrow

Share this post


Link to post
Share on other sites
Braindawg

Dither texture is embeeded in exexutable file, and we can't change it.

I was actually hoping for an explanation on how you found that out, not doubting your knowlage condicering uve made one of my fave mods for GTAV but sh*t... Is there really nothing we can do?

Share this post


Link to post
Share on other sites
_CP_

Ask Alexander Blade or NTAuthority, they are more knowledgeable.

Share this post


Link to post
Share on other sites
Braindawg

wait so CAN you actually confirm it's embedded into the exe? or is it just speculation? Again you didn't rly explain on HOW YOU FOUND THAT OUT.

C++ expert coding language from NTA or Blade will sound like japanese to me.

Edited by Braindawg

Share this post


Link to post
Share on other sites
_CP_

I didn't find any of dither textures related to LOD models, so it must be in EXE.

Share this post


Link to post
Share on other sites
Braindawg

Well guess again, because im certain Rockstar is lazy enough to keep the dithering effect somewhere. The COMMAND to dither the objects is there. But if we change the texture to a smoother one, it will remove the unwanted pixels and "grain". We must continue this research and find this texture or textures and change them to see the effect. If you want a good example, download DexX's IV example and play around with the file.

 

If the transition can't be smooth enough, we can at least disguise it enough for the game not to look pixely.

Edited by Braindawg

Share this post


Link to post
Share on other sites
BlackScout

I think I might have found the stipple texture used in V. *In the wrong place I guess*

AUJz3ai.png

It probably won't fix anything, looks more like a leftover and it's hidden in the middle of random sh*t.

Share this post


Link to post
Share on other sites
Spider-Vice

That looks like it's for a specific texture, not for everything. it's a dithering pattern for that texture.

Share this post


Link to post
Share on other sites
Braindawg

AAAAAAAA where did you find that?! R* has a habit of leaving files "hidden" or "misplaced". Who knows? Editing this texture and checking if it changes anything is worth a try.

Edited by Braindawg

Share this post


Link to post
Share on other sites
_CP_

txstipple is copied several times in texture archives, it's related to fur grass.

Share this post


Link to post
Share on other sites
Braindawg

Can anyone post a few paths to locate copies of this file?

Share this post


Link to post
Share on other sites
_CP_

x64i.rpf\levels\gta5\_citye\downtown_01\dt1_06.rpf\dt1_06_grnd.ytd
x64a.rpf\textures\plantsmgr.ytd

Edited by _CP_

Share this post


Link to post
Share on other sites
Braindawg

f*ckin hell the function has to be assigned to a texture like in IV, i'd be surprised, and disappointed if R* actually changed that Q_Q i must continue searching....

 

edited a few of those copies, nothing...

Edited by Braindawg

Share this post


Link to post
Share on other sites
_CP_

Works on fur grass:
LEOGOGlh.jpg

Share this post


Link to post
Share on other sites
AHK1221

I just want to say, LOD DOES NOT MEAN LOW ON DETAIL FOR GODS SAKE!!! It means level of detail......

Share this post


Link to post
Share on other sites
AHK1221

 

Umm, care to elaborate?

It's hardcoded.You can't manipulate it if the thing is stored in exe.Unlike a data file,an executable file cannot be read because it has been compiled.

 

Well, cracks do the same thing. You can decompile the file edit the texture and recompile it(in theory). It's clearly possible, a term for it called Reverse-engineering. but you'll get banned. Ask AB or NTA, those WILL know how to do it, if the file is really located in the .exe

Share this post


Link to post
Share on other sites
_CP_

v4YbXadh.png
lPetMLYh.png

Share this post


Link to post
Share on other sites
BlackScout

Whoa :D, awesome, it's something!

Share this post


Link to post
Share on other sites
Claude_Lib

Wow, that's cool. How did you achieve that? Manually replacing every single stipple texture in the arcives, I guess?

Share this post


Link to post
Share on other sites
_CP_

Michael's fur grass has stipple texture and fix works only here, we have to find all locations of stipple in texture archives.

Share this post


Link to post
Share on other sites
BlackScout

Michael's fur grass has stipple texture and fix works only here, we have to find all locations of stipple in texture archives.

If only we had some way to find textures inside YTD's by searching them... :S

Share this post


Link to post
Share on other sites
Braindawg

So theyve made copies of one file to represent certain parts of the map or at least the grass on it? the f*ck... why not have one texture triggered for ALL pop in and alpha effects like in IV -_-

 

So... maybe there are appropriate stripple textures in charge of hair and maybe even lod models... might give up my weekend to go through the entire gta v file library LOL

Share this post


Link to post
Share on other sites
_CP_

x64g.rpf\levels\gta5\generic\gtxd.rpf\globalfurgrass.ytd

Of course it doesn't remove all problems with grass, but most of them should disappear.

Another txstipple references:
x64a.rpf\textures\plantsmgr.ytd
x64i.rpf\levels\gta5\_citye\downtown_01\dt1_06.rpf\dt1_06_grnd.ytd

x64k.rpf\levels\gta5\_citye\scentral_01\sc1_27.rpf\sc1_27_grnd.ytd
x64l.rpf\levels\gta5\_cityw\beverly_01\bh1_05.rpf\bh1_05.ytd
x64l.rpf\levels\gta5\_cityw\beverly_01\bh1_06.rpf\bh1_06.ytd
x64l.rpf\levels\gta5\_cityw\beverly_01\bh1_40.rpf\bh1_40_hotel.ytd
x64l.rpf\levels\gta5\_cityw\beverly_01\bh1_42b.rpf\bh1_42b_park.ytd
x64l.rpf\levels\gta5\_cityw\beverly_01\bh1_48.rpf\bh1_48.ytd
x64l.rpf\levels\gta5\_cityw\beverly_01\bh1_rd.rpf\bh1_rd2.ytd
x64l.rpf\levels\gta5\_cityw\airport_01\ap1_04.rpf\ap1_04_ground.ytd

x64m.rpf\levels\gta5\_cityw\santamon_01\sm_07.rpf\sm_07_grnd.ytd
x64m.rpf\levels\gta5\_cityw\santamon_01\sm_13.rpf\sm_13_grnd.ytd
\x64m.rpf\levels\gta5\_cityw\santamon_01\sm_17.rpf\sm_17ground.ytd

Edited by _CP_

Share this post


Link to post
Share on other sites
BlackScout

Bump. Double-Post needed.

PQTAjHV.png



Achieved thanks to Codewalker and robi29's code posted on http://gtaforums.com/topic/882840-codewalker-3d-map-viewer-for-gtav/page-8?do=findComment&comment=1070057834

And also the graphical study made by Adrian Courrèges: http://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-study/

@_CP_ You and robi29 should investigate default.fxc (and the other default shaders too) if you want to remove dithering.
Look for Subsample Alpha.

Try messing with:

dp2 r1.y, v0.xyxx, l(0.5, 0.5, 0.0, 0.0)  // Dot product of the pixel's (x,y) with (0.5, 0.5)frc r1.y, r1.y                            // Keeps only the fractional part: always 0.0 or 0.5lt r1.y, r1.y, l(0.5)                     // Test if the fractional part is smaller than 0.5

I changed all those 0.5s to 1.0 but to be fair I think it can be tweaked a little better.

Also, some of the tree shaders feature this bit of code. It's worth taking a look too.

UPDATE:

I have achieved better results changing some other stuff. As of now that snippet is more like:

dp2 r1.x, v0.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)frc r1.x, r1.xlt r1.x, r1.x, l(1.000000)lt r1.y, r0.w, l(0.250000)

 


4PHW25l.png



UPDATE2: Alternatively, there is another way that seems to yield better results and less issues.

dp2 r1.x, v0.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)frc r1.x, r1.xlt r1.x, r1.x, l(0.500000) // This value from what I've tested didn't do much.lt r1.y, r0.w, l(0.000000) // This value makes the biggest difference.

Compared to the previous one:
klOLaNt.png
I mean, it's looking like a f*cking cone. I don't know.

Edited by BlackScout

Share this post


Link to post
Share on other sites
robi29

The result visible on the last screen on the left is very nice, but does not it break anti-aliasing?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.