Sunday, September 9, 2018

(GTAIV) HomuraPED Release / Playerped to Ped Texture Duplication Script - In Progress

Homura PED model has been released, you can get it from the GTAIV downloads page. Also, texture dictionaries for all ped models currently released has been optimized.
Also here: http://www.mediafire.com/file/im2kqdle9834kjs/HomuraPED.zip/file

A couple of notes about this release:
The texture sizes are in GTAIV range, so they're 512 or less (with exception being uppr (1k)). The textures are already duplicated so you shouldn't run into invisible models, but let me know if you do. If you want higher res textures because your computer can handle it, you can get them from Homura's player model archive or you can send me an email asking for the source textures (I don't think any of them go beyond 2k though and a lot of textures are only 1k)
Since I made this PED release using my conversion tools for both texture and odr conversion, there might be unforeseen bugs. If you encounter this, please let me know with the name of the ped you were replacing and what kind of bug it was (invisible model/crashing/etc.).

Notes about the current status of the texture duplication script:
While the script is working, it requires both Pillow (a python image manipulating library) to be installed as well as Python3, so I think I have to distribute this as an executable so its not annoying to use.

If you already are familiar with the command line, and have both python3 and pillow installed, you can get the script below, otherwise, I'll be slowly working towards an executable version of this.

Edit: Script was updated Sept 13, 2018 for readability purposes.
http://www.mediafire.com/file/d3memuq0vicuri5/TextureConversion.py/file

The only thing this script does is duplicate and resize textures (sizes can be specified in the scripts dictionary lists (detailed below)). The duplication is to avoid the invisible model issues that pop up when you're missing a 00x texture. The resizing is to address issues where your computer may not be powerful enough to manage larger resolution textures (1k+), causing the game to either infinite load or crash when spawning a replaced ped (includes loading on cutscenes). You can try using this script if you find a custom ped is causing this issue.

At the moment, how it works is you extract all the textures from your ped or player wtd as png files.
If you extract normal and specular maps from the player .odr folders, they are possibly not named properly (I know my models spec and normals are not). If this is the case, rename the 000s to the correct name before running the script, here are the (for the body parts at least) names below.



It's not recommended to leave out normal and specular maps, the lighting on the model will be incorrect.

If you extract from a ped library, they're probably all named correctly and you don't need to adjust the names.

Put all images in a folder, put the script in the same folder and run the script. It does not need any command line arguments. Once the script runs, you should be able to select all images and import them into the .wtd. For most models DXT1 will be fine (DXT5 for anything with transparency), the other formats may increase the size of the .wtd.

Additional notes for editing the dictionaries (If you've never used a python dictionary, only change the numbers, don't touch the things in quotes) - going to turn this into some sort of ini file later for easier access outside of the executable:

There are 4 different dictionaries.
NumberOfCopies - (how many duplicates do you want to make of a texture) For example, a PED like Terry might have 2 upprs for the upper body. A PED like roman might have 5 upprs. To be on the safe side having 5 copies of the upper and lower body should completely avoid the invisible model problem. With the current default resolutions/number of copies in the script, the maximum wtd size after resizing and duplicating all the textures is somewhere around 2k-3k, which should be ok for most medium range computers.

SizeOfImages - how large do you want the Diffuse (Color) textures to be. These are the "main" textures, generally needs to be the largest out of the 3 main types. A small diffuse texture means lots of pixellation. A large diffuse texture will have the most impact on the crispness of a character's textures.

SizeOfNormalImages - How large do you want the normal maps to be. These are "faked" detail textures. When you see light bounce off wrinkles on clothing, these are dictated by the normal maps. They are the purplish blueish pictures. These can be smaller than Diffuse maps and do not contribute as much to pixellation. In GTAIV, loss of quality in these maps are not particularly noticeable.

SizeOfSpecImages - How large you want the specular maps to be. Usually white black although sometimes there's some colorization. These dictate how bright a certain part of the texture should be. These can be even smaller than normal maps. In GTAIV you cannot leave these or normal maps out, you need all three types otherwise the lighting on the model is really screwed up (it'll look really dark and shiny)

Below: I used the resizing script on my Homura (black hair) ped model. In this, she has 512x512 at max (total of 1.4mb wtd size), and looks pretty decent. However, there's pixellation if you zoom in really close.

No comments:

Post a Comment