The Hero Posted February 16, 2015 Share Posted February 16, 2015 (edited) This mod is deprecated, go to SkyGfx: PS2 graphics for PC PS2 Grass NOTE: This was originally the second post of this thread, my original post is below. This is now for the release of ps2grass. This mod is my attempt to restore the PS2 grass rendering in the PC version. It should by now be feature complete. If you find differences, report them in this thread. You can find the files here: http://aap.papnet.eu/gta/ps2grass.zip and the source here: http://tohjo.eu/aap/ps2grass Just put the .asi and .ini where your asi-loader can find it. The .ini settings are explained in the file. ------------------------------------ Old post: So, here is what I found out: The grass textures are single textures on the PC (grass/plant1.txd: txgrass_N_M) but are clumped together on the PS2 (particle1.txd: txgrassbig0/1). The textures are exactly the same on both platforms so any changes to the TXDs should not be needed in a proper mod. So far I have played around with the draw (and fade) distance values. They're very easy to manipulate so in a future mod you should be able to customize them. If you want to play around with plants.dat and see the effect immediately in game, use this version of postfx which reloads plants.dat when you hit F9 F12: http://aap.papnet.eu/gta/sa_fx/postfx-reloadgrass.asi Edited February 25, 2015 by The Hero Snoops27, Gramps, Ash_735 and 8 others 10 1 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 (edited) Draw and fade distance value? Sounds like a music in the ears! Do you have found a way to increase the grass? And do I need any specific TXD or .DAT in order to make the postfx_grass work? I tried it earlier this day and I didn't see any changes. Maybe I must miss something? Edited February 16, 2015 by SilverRST Snoops27 1 Link to comment Share on other sites More sharing options...
The Hero Posted February 16, 2015 Author Share Posted February 16, 2015 This doesn't change the grass at all, it just reloads the file. I'm currently playing with grass density. Of course you can change it in the plants.dat as well (last value) but I think you shouldn't have to modify this file. re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 Alright, so the only file it reloads is the plant1.txd? I haven't modified plants.txd and probably won't. Snoops27 1 Link to comment Share on other sites More sharing options...
The Hero Posted February 16, 2015 Author Share Posted February 16, 2015 No, plants.dat. re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 (edited) Crap, I meant plants.dat. Can you change the hotkey to F12? For some reason when I press F9, CJ will change into the nearest NPC and I don't know which script causes this. Edited February 16, 2015 by SilverRST Link to comment Share on other sites More sharing options...
The Hero Posted February 16, 2015 Author Share Posted February 16, 2015 Ok, changed it. Redownload. Concavax, Snoops27 and SilverRST 3 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 (edited) Thanks. So what do you think about the platforms? The TXD textures are exactly the same on both platforms, so the textures don't change it all but the plants.dat is responsible for the difference, is that correct? A little question, once this is done, would you like to create a seperate .asi for GTA SA with no postfx? I have 4 game's installations, each with different intentions such as wintermods, normal SA and PS2 Sa. Edited February 16, 2015 by SilverRST Link to comment Share on other sites More sharing options...
The Hero Posted February 16, 2015 Author Share Posted February 16, 2015 (edited) The plants.dat on PC and PS2 are almost the same except for GRASS_MEDIUM_LUSH which uses ModelID 2 on PS2 but 0 on PC. Now kam's scripts can't import many of the grass dffs for some reason so I will take a look at them another way. Maybe they're corrupt for some reason (or kam's script) and the game doesn't even use them all (the code is quite confusing to read so I'm not sure). Kam's script is buggy. And yes, I will make a separate asi once I get something presentable. This was just a test asi for myself but I thought it might be useful for others who want to play with the the plants.dat. Edited February 16, 2015 by The Hero Snoops27 1 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 (edited) I just tried importing the plants dffs with Zmodeler2 and some look like they are corrupted and some work but they are not the ones that should be. And I also got a log of the missing textures after importing the dffs which is pretty weird because they are not in the plant1.txd. Or is zmodeler2 going nuts? And believe or not, they contains words like fuzzygrass. If you want screenshots of not and corrupted plants and the log of missing textures, I can make them. Edited February 16, 2015 by SilverRST Link to comment Share on other sites More sharing options...
The Hero Posted February 16, 2015 Author Share Posted February 16, 2015 I already looked at them with my dffviewer. Looks like they're mostly the same model anyway. I want to find out what the ModelID does exactly. re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 (edited) Okay. Hopefully it can be fixed. Edited February 16, 2015 by SilverRST Link to comment Share on other sites More sharing options...
MrMateczko Posted February 16, 2015 Share Posted February 16, 2015 my dffviewer.Where can I find it? Is it better than this one? So what the PC version actually uses, particle.txd grass or plant1.txd grass? Also, TJGM in it's Project 2DFX tried to increase the grass distance. Link to comment Share on other sites More sharing options...
The Hero Posted February 16, 2015 Author Share Posted February 16, 2015 The dff viewer is not finished yet, it's just a byproduct of my attempt to write a rather complete RW library (https://github.com/aap/librw) The PC version uses plant1.txd. Snoops27 and MrMateczko 2 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
Snoops27 Posted February 16, 2015 Share Posted February 16, 2015 Grass distance can also be increased with Mix Sets Mod, but it doesn't load very smoothly Link to comment Share on other sites More sharing options...
SilverRST Posted February 16, 2015 Share Posted February 16, 2015 (edited) Grass distance can also be increased with Mix Sets Mod, but it doesn't load very smoothly It does a have a limit if I'm correct, but the grass pops in out nowhere like you said it's doesn't load very smoothly. It must be something else. Edited February 16, 2015 by SilverRST Snoops27 1 Link to comment Share on other sites More sharing options...
The Hero Posted February 17, 2015 Author Share Posted February 17, 2015 That's the fade distance I was talking about, it's not that hard to change. re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
nyolc8 Posted February 17, 2015 Share Posted February 17, 2015 Is there any fading at all? I never noticed any fading with grass (and rocks and cactuses). Link to comment Share on other sites More sharing options...
The Hero Posted February 17, 2015 Author Share Posted February 17, 2015 (edited) I haven't looked at the procedural objects (rocks, cactuses) at all yet, but the grass patches definitely fade in, they don't just pop up. Edited February 17, 2015 by The Hero re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
TJGM Posted February 17, 2015 Share Posted February 17, 2015 Grass distance can also be increased with Mix Sets Mod, but it doesn't load very smoothly Project 2dfx's bonus scripts also had a script which increased the grass draw distance, although like @SilverRST said, it wasn't very noticeable because of a limit. Grass distance can also be increased with Mix Sets Mod, but it doesn't load very smoothly It does a have a limit if I'm correct, but the grass pops in out nowhere like you said it's doesn't load very smoothly. It must be something else. That's the fade distance I was talking about, it's not that hard to change. Once you increase the draw distance on anything, they start to pop in rather than fade, I never knew it was simply because of a fade distance though. Could be useful if you could someone change the fade stuff for other things or even let @ThirteenAG know about it for the IDE DD Tweaker. Snoops27 1 Link to comment Share on other sites More sharing options...
The Hero Posted February 17, 2015 Author Share Posted February 17, 2015 Well, at 0x5dad98 is a pointer to the float that is the fading distance and at 0x5dae05 a pointer to its reciprocal. The grass patches are blended between the far value (set by float SetCloseFarAlphaDist(float near, float far) at 0x5dabe0) and far+blenddist. The default values (on highest visualfx) are 60 for far and 20 for blenddist. Jago, mirh, Reyks and 3 others 6 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
_CP_ Posted February 17, 2015 Share Posted February 17, 2015 Nice to see that, I'm waiting to crack these limits. Snoops27 1 Link to comment Share on other sites More sharing options...
nyolc8 Posted February 17, 2015 Share Posted February 17, 2015 What happens if we writing different values into those pointers? (for example with cleo) Link to comment Share on other sites More sharing options...
The Hero Posted February 17, 2015 Author Share Posted February 17, 2015 (edited) You can try for yourself now (the name "ps2grass" is a little optimistic right now but I hope this won't be the last version ): http://aap.papnet.eu/gta/ps2grass.zip You should set backfaceCull to 0, this will already make quite a difference. Otherwise just play with the values. As the ini states, use F11 to reload the ini and F12 to reload both ini and plants.dat. EDIT: I just noticed that the PC version doesn't use grass[23]_*.dff while the PS2 does. Edited February 17, 2015 by The Hero mirh, Reyks, Jago and 2 others 5 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
Igor Bogdanoff Posted February 17, 2015 Share Posted February 17, 2015 (edited) I see the biggest problem in grass color (maybe make it a bit brighter?) PC with The Hero's plugin (dark grey)PC with PS2 grass to PC modPS2 (light grey) Edited February 17, 2015 by Tomasak Link to comment Share on other sites More sharing options...
Reyks Posted February 17, 2015 Share Posted February 17, 2015 Well I have no idea from wich mod I got this plant1.txd from, but well in my game it's light gray: Link to comment Share on other sites More sharing options...
Inadequate Posted February 17, 2015 Share Posted February 17, 2015 (edited) PS2 (light grey) Wow, the PS2 have a little more vegetation in that part. Also looks better than PC vegetation. Edited February 17, 2015 by inadequate Link to comment Share on other sites More sharing options...
erorcun Posted February 17, 2015 Share Posted February 17, 2015 It depends on timecyc I think. Igor Bogdanoff 1 Link to comment Share on other sites More sharing options...
The Hero Posted February 17, 2015 Author Share Posted February 17, 2015 (edited) I took a closer look at plants.dat and this is what I found out (nothing spectacular):SlotID is either 0 or 1 and selects (according to the comment in the file) the "big" texture ID, i.e. txgrassbig0 or 1, which in the PC version corresponds to the first number in the txgrass textures. The value can actually go up to 3, but IDs 2 and 3 are not used in the file and do the same thing as 0 and 1. The comment also says it defines the "main geometry set" although I found no difference in geometry when using 0 or 1. But since there are 4 sets of grass geometries, I assume (again, according to the comment) that this value did indeed select the geometry set in a beta version and probably still does on the PS2.The ModelID simply selects the sub geometry inside a geometry set, i.e. the second number in the dff filename (but zero based, not one based as the filename).UVoff selects the sub texture inside a txgrassbig texture (on the PS2) and on the PC corresponds to the second number in the texture name. Note: the comment says the value can go up to 15 but this crashes my game, you can only use the 8 grass textures that are in the TXD, maybe this was different on the PS2...and maybe not: numbers greater than 3 are not used by the game.So in summary the game draws a patch of grass for a specific line in plants.dat with model grassSlotID_ModelID+1.dff and texture txgrassSlotID_UVoff (except that grass[23]... are not used, at least on the PC) Next I will probably take a look at the colors. Edited February 17, 2015 by The Hero Jago, Agem, Concavax and 2 others 5 re3, reVC Tools: RenderWare file converter, DFF importer and exporter for 3ds max III, VC, SA: SkyGfx: PS2 and Xbox graphics for PC, PS2 and Xbox vehicles for PC, Debug menu III, VC: rwd3d9, sharptrails, PS2 and Xbox map for PC III: Skin and Bones, Into TheTimecycle!!!, LC98 VC: Beta Infernus, Phoenix and Cop car SA: PS2 to PC map General: Simple DLL loader My Workshop. Also visit me on github. Link to comment Share on other sites More sharing options...
Igor Bogdanoff Posted February 17, 2015 Share Posted February 17, 2015 It depends on timecyc I think. Yes, I was using some weird one (I thought it was right from ps2), but it still seems to be a bit darker for me Link to comment Share on other sites More sharing options...
Recommended Posts