Quantcast

Jump to content

» «
Photo

Recreating PS2 atmosphere - I've found logic, coders needed

  • This topic is locked This topic is locked
459 replies to this topic
erorcun
  • erorcun

    Snitch

  • Members
  • Joined: 19 Jan 2008

#1

Posted 06 October 2014 - 08:32 PM Edited by erorcun, 06 October 2014 - 08:46 PM.

Hi, until now everybody thought there was some secret values inside PS2 ELF file. I hadn't believed that and tried something with RGB2 value exists in timecyc.

 

I had taken the default ENB palette texture and colored it with just RGB2 in photoshop, than enabled palette texture and result:

 

rubk3a.jpg

 

(Note that ENB disables GTA SA PC default post-processing, so there is only palette texture applied) So, PS2 processes RGB2 differently. Although sky just became overexposed, I'm aware.

 

That was at 6 AM. I had taken 7 PM RGB2 and tried it in 7 PM, result:

 

wskyfd.png

 

Nearly same, except sky.

 

(Some pictures taken from Vadim M. PS2-PC comparison)

 

I post that to here because I couldn't solve the palette texture's logic and couldn't make it codable.

 

So, we must,

 

1- Found the way of color correcting sky

2- Find out how we can code palette texture's algorithm within DK's shader api

3- Automatize it with values exists in timecyc

  • Ash_735, Asgaro, Mega and 7 others like this

HPro
  • HPro

    Time to be a Ghost

  • BUSTED!
  • Joined: 20 Nov 2012

#2

Posted 06 October 2014 - 08:51 PM

ps2 is too blurry and orangish


erorcun
  • erorcun

    Snitch

  • Members
  • Joined: 19 Jan 2008

#3

Posted 06 October 2014 - 09:05 PM Edited by erorcun, 06 October 2014 - 09:06 PM.

I know.


El Dorado
  • El Dorado

    If it keeps on rainin' levee's goin' to break

  • Feroci
  • Joined: 07 Nov 2013
  • Brazil

#4

Posted 06 October 2014 - 09:56 PM Edited by format c:, 06 October 2014 - 09:59 PM.

Seems like you found the secret of the ambient (static and dynamic) colors at least

 

Well, it's something.

 

EDIT - Question, GTA San Andreas for PS3 have the same atmosphere?

  • Snoops27 likes this

Snoops27
  • Snoops27

    Hustler

  • Members
  • Joined: 10 Aug 2013
  • United-Kingdom

#5

Posted 06 October 2014 - 10:08 PM Edited by snoops26, 06 October 2014 - 10:31 PM.

playthrough in HD, played on PS3

 


NTAuthority
  • NTAuthority

    hell, no, tunnel, no

  • Feroci
  • Joined: 09 Sep 2008
  • European-Union
  • Best Script or Plugin 2016 [SkyGfx] [Contribution]
    Best Conversion 2014 [ViIV for GTANY]
    Most Knowledgeable [Tech] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Contribution Award [Mods]

#6

Posted 06 October 2014 - 10:14 PM

Is this a stock timecycle?

erorcun
  • erorcun

    Snitch

  • Members
  • Joined: 19 Jan 2008

#7

Posted 06 October 2014 - 10:18 PM

Is this a stock timecycle?

 

Yes, with illumination added.


NTAuthority
  • NTAuthority

    hell, no, tunnel, no

  • Feroci
  • Joined: 09 Sep 2008
  • European-Union
  • Best Script or Plugin 2016 [SkyGfx] [Contribution]
    Best Conversion 2014 [ViIV for GTANY]
    Most Knowledgeable [Tech] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Contribution Award [Mods]

#8

Posted 06 October 2014 - 11:00 PM Edited by NTAuthority, 06 October 2014 - 11:15 PM.

Mhm, tried a few values with RGB1/2, however it seems as if the PS2 version ignores RGB1 outright?
 

return (outColor * RGB1) + (outColor * RGB2); // default SA alpha blending, RGB1 cancels RGB2's orange tint out
return (outColor * RGB2); // nicely orange, somewhat vibrant, though not vibrant enough (as RGB1 isn't applied)?
return (outColor + RGB1) * RGB2; // static minimums aren't the solution either
// snip various other crazy attempts GTAF ate due to 'you must enter a post'

sangria.png

^ just RGB2, PLEASANTLYWARM weather at 06:25. try it yourself

If anyone needs a version that loads shaders at runtime, just ask - I'm sure I'm missing some argument. :)

  • uNi, Ash_735, TJGM and 2 others like this

El Dorado
  • El Dorado

    If it keeps on rainin' levee's goin' to break

  • Feroci
  • Joined: 07 Nov 2013
  • Brazil

#9

Posted 06 October 2014 - 11:53 PM

I got some interesting results with that .asi, but cutscenes looks weird


erorcun
  • erorcun

    Snitch

  • Members
  • Joined: 19 Jan 2008

#10

Posted 07 October 2014 - 12:27 AM Edited by erorcun, 07 October 2014 - 12:29 AM.

Thanks for file. It's better than before, at least we saw greenish sky =D

 

RGB2 needs to be processed in more complex way for me.

 

I will try adding bloom with RGB2 color over that.


ThirteenAG
  • ThirteenAG

    Gangsta

  • Feroci
  • Joined: 29 Dec 2008
  • None
  • Contribution Award [Mods]

#11

Posted 07 October 2014 - 08:48 AM

If anyone needs a version that loads shaders at runtime, just ask - I'm sure I'm missing some argument. :)

What about a source code? And is this possible for gta3 and vc? I was looking for a way to make image more vibrant without enb.

Snoops27
  • Snoops27

    Hustler

  • Members
  • Joined: 10 Aug 2013
  • United-Kingdom

#12

Posted 07 October 2014 - 12:34 PM

I smell a #SilentPatchSomethingFromThis :O


Inadequate
  • Inadequate

    Midnight Emulator

  • Members
  • Joined: 11 Apr 2012
  • None

#13

Posted 07 October 2014 - 06:42 PM

Wow, looks nice.


Savidge
  • Savidge

    狂人をレモン

  • Members
  • Joined: 29 Dec 2013
  • England

#14

Posted 07 October 2014 - 06:52 PM

I got a nice PS2 atmospheric warmth during the evening and it looked badass:

Spoiler

  • Kalvin, TJGM, VERSA and 3 others like this

Snoops27
  • Snoops27

    Hustler

  • Members
  • Joined: 10 Aug 2013
  • United-Kingdom

#15

Posted 07 October 2014 - 07:00 PM

What did it look like during cutscenes? Strange for me


Inadequate
  • Inadequate

    Midnight Emulator

  • Members
  • Joined: 11 Apr 2012
  • None

#16

Posted 07 October 2014 - 08:28 PM

I got a nice PS2 atmospheric warmth during the evening and it looked badass:

Spoiler

 

That atmosphere is with the lovely.asi


Savidge
  • Savidge

    狂人をレモン

  • Members
  • Joined: 29 Dec 2013
  • England

#17

Posted 07 October 2014 - 09:11 PM

That atmosphere is with the lovely.asi?

Yeah. I just placed it in and went to LV. :)

  • Inadequate likes this

NTAuthority
  • NTAuthority

    hell, no, tunnel, no

  • Feroci
  • Joined: 09 Sep 2008
  • European-Union
  • Best Script or Plugin 2016 [SkyGfx] [Contribution]
    Best Conversion 2014 [ViIV for GTANY]
    Most Knowledgeable [Tech] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Contribution Award [Mods]

#18

Posted 07 October 2014 - 09:14 PM Edited by NTAuthority, 07 October 2014 - 09:14 PM.

If anyone needs a version that loads shaders at runtime, just ask - I'm sure I'm missing some argument. :)

What about a source code? And is this possible for gta3 and vc? I was looking for a way to make image more vibrant without enb.

Source code will be available at a later time if I don't forget; GTA3/VC would need either a wrapper to convert D3D8 to D3D9 to run 'high-level' shaders or assembly-language shaders, though cutting out RGB1 could also have been done by merely modifying the alpha blending layer in CPostEffects' function - I just used shaders to be able to mess with the parameters more easily than RW render states.
 
Also if you're intending to add an additional timecycle field you'll still have to do the usual weird hacks for interpolating color sets and an insane dataset similar to the one SA's RGB2 color has.
  • Ash_735, TJGM and mirh like this

HPro
  • HPro

    Time to be a Ghost

  • BUSTED!
  • Joined: 20 Nov 2012

#19

Posted 07 October 2014 - 09:50 PM

we need you to share source code to great developers


TJGM
  • TJGM

    Boss

  • Members
  • Joined: 14 Jun 2011
  • Ireland
  • Helpfulness Award
    Contribution Award [Mods]

#20

Posted 07 October 2014 - 10:03 PM

we need you to share source code to great developers


And we really need you to shut up for the sake of this forum.
  • Ash_735, Gramps, Blackbird88 and 8 others like this

HPro
  • HPro

    Time to be a Ghost

  • BUSTED!
  • Joined: 20 Nov 2012

#21

Posted 07 October 2014 - 10:10 PM

 

we need you to share source code to great developers


And we really need you to shut up for the sake of this forum.

 

:lol: get off my d*ck


Savidge
  • Savidge

    狂人をレモン

  • Members
  • Joined: 29 Dec 2013
  • England

#22

Posted 07 October 2014 - 10:17 PM

:lol: get off my d*ck

cartoon-man-looking-at-computer-monitor-

  • TJGM, uokka, Gummy  and 5 others like this

Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#23

Posted 07 October 2014 - 10:20 PM

 

 

we need you to share source code to great developers


And we really need you to shut up for the sake of this forum.

 

:lol: get off my d*ck

 

 

 

Do you even have one,kid? And why is it so hard not to reply,because from what I see,your replies are rather pointless and lead to off topic,just like this.


HPro
  • HPro

    Time to be a Ghost

  • BUSTED!
  • Joined: 20 Nov 2012

#24

Posted 07 October 2014 - 11:13 PM

 

 

 

we need you to share source code to great developers


And we really need you to shut up for the sake of this forum.

 

:lol: get off my d*ck

 

 

 

Do you even have one,kid? And why is it so hard not to reply,because from what I see,your replies are rather pointless and lead to off topic,just like this.

 

i'm a kid? :lol:


The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Best Total Overhaul 2017 Contribution [GTA: Underground]
    Most Helpful Modding 2016 [Honorable Mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#25

Posted 08 October 2014 - 07:20 AM Edited by THE HERO, 08 October 2014 - 07:22 AM.

I actually found out how the effect is done a few months ago and contacted Dexx who implemented it, although it's not bug free. I'm not sure that what I found out is 100% correct since the rendering in pcsx2 is a bit messed up, but it's already damn close.

The formula is this: out.rgb = color*(rgb1 + rgb2*a2)*2

 

This is the latest version he sent me. I'm not sure if he's ok with me posting the source, so this is the binary only for now.

 

http://aap.papnet.eu/gta/d3d9_post.zip

 

Just place the files into your SA directory and hope that it will work with your version of the exe.

He also set the fog far value to constant 450.0 like on the PS2. You can make screenshots for comparison with the unprocessed screen.

The bug I was talking about is that the HUD sometimes disappears (seems to be weather or zone dependent). This is because he didn't know where exactly in the code to do the effect. If it were somehow possible to do it the same place the PC version does it's thing it should look perfect. Maybe someone else can figure that out once the source is released.

 

So, have fun with it.

  • Inadequate, VERSA, mirh and 2 others like this

VERSA
  • VERSA

    Flying Ped in Space

  • Members
  • Joined: 01 Aug 2012
  • None

#26

Posted 08 October 2014 - 07:37 AM

THE HERO, WOW, this one is actually looks awesome! So close to PS2 atmosphere :inlove:

Danikov
  • Danikov

    The Fake Russian

  • Members
  • Joined: 27 Aug 2009
  • Israel

#27

Posted 08 October 2014 - 07:54 AM

Anyone can post screenshots of this? I am at work and will be home only a lot later and very tempted to see how is it.

The Hero
  • The Hero

    Into TheGame!!!

  • Feroci
  • Joined: 25 Jan 2005
  • Germany
  • Best Total Overhaul 2017 Contribution [GTA: Underground]
    Most Helpful Modding 2016 [Honorable Mention]
    Best Script or Plugin 2016 [SkyGfx]
    Contribution Award [Mods]

#28

Posted 08 October 2014 - 08:39 AM Edited by THE HERO, 08 October 2014 - 08:39 AM.

Here is a comparison of the beginning of the game at ~6:53. They are in order: unprocessed, PC effect, PS2 effect with Dexx' and my mod, a screenshot from pcsx2:

start_orig.png

start_pc.png

start_mod.png

start_postproc_pcsx2.png

  • Snoops27, Lowi, Savidge and 1 other like this

VERSA
  • VERSA

    Flying Ped in Space

  • Members
  • Joined: 01 Aug 2012
  • None

#29

Posted 08 October 2014 - 09:03 AM

THE HERO, what pcsx2 do you using? That visual bug is fixed for long time ago in a newer builds. GSdx - Enable HW Hacks - Half-pixel Offset  - Alpha Stencil

Silent
  • Silent

    Chief Vision™ Alterer

  • GTA Mods Staff
  • Joined: 01 Feb 2010
  • Poland
  • Most Helpful in Modding 2017
    Most Helpful [Modding] 2016
    Contribution Award [Mods]
    Best Script/Plugin 2014 [SilentPatch]
    Most Respected 2014
    Most Helpful [Mods] 2014
    Most Helpful [GTA] 2013
    Most Helpful [Mods] 2013
    Most Talented [Modding] 2013
    Best Map 2013 [ViceCityStories PC Edition]
    Best Vehicle 2013 [III Aircraft]
    Most Helpful [Mods] 2012
    Modder of the Year 2012

#30

Posted 08 October 2014 - 09:18 AM

But hardware mode skips postprocessing, and software doesn't support hacks, I think.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users