Discussion in 'Guides and Tutorials' started by scanti, Jun 16, 2012.
Is the script available to download somewhere? I'd be interested in porting it to Blender/Python.
Sure, but they are still in development so things are going to change over time;
SRIII formatdescription and maxscripts
There is already quite some blender stuff available I think;
Ps, here's a new screenshot of the progress on shaundi. Corrected normalmaps and a nice high-res head model. Doesn't she look good?
Next step is proper material parsing. I deleted the old stuff and need to re-write it properly. And I need to figure out how the materials are being constructed.
Give this man two bottles of rum, gentlemen!
Fixed a small issue in the importer, so now we have Oleg!
Download new version here:
I still haven't figured out where the proper scales are referenced. They should be in the files somewhere. It seems very unlikely that they are hardcoded.
Also still have to write a proper material parser. These textures were all manually applied. The old material stuff I had was shit.
Here's what I figured out about the material format in SR4 so far by playing with the material cruncher:
char[strings_size] strings1 // zero terminated strings
char[strings_count] strings2 // No size, just keep reading strings until you have strings_count of them
Material for ir_at_bbsimple1. ir_at_bbsimple3 is similar, except it does not have unknown6 to unknown12.
uint64 size // size of the material entry
fxparam is always 16 bytes and can be a single float or vector of 4. The amount and type is defined in each shaders .fxinfo_pc file. They are inside the shaders.vpp_pc file for the SRIV SDK.
I used uint8 as the generic bytes type. The difference between uint8 and uint32 is that uint8 usually has values higher than 1 million, which is very uncommon for actual integers, I suspect they're hashes. Everything I wrote is mostly guessing, don't be confused if it doesn't match up with your files.
Here's a gist with my Python (3) code: https://gist.github.com/Yepoleb/ce56be1f52322ae69887c2ed0736983f
Thanks man! To be honest I've been spending some time investigating the rig_pc files for characters and have now got a proper rig parser. Next Item on the agenda is to figure out the vertex weights to rig the character to the bones. I think I already found out how to do that.
After this I will work on the materials and have a proper look at your findings
Separate names with a comma.