- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Cracking Open Shaders_Win32.precomp? (for better shaders!)
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Cracking Open Shaders_Win32.precomp? (for better shaders!)
Posts: 3,443
Thanks: 938 in 5 Posts
Me and a couple of other simmers were talking about the Shaders_Win32.precomp file (located in the Installation folder, under Game/Bin/), which apparently contains the shaders for TS3.
From this post onwards: http://modthesims.info/showthread.p...118#post5496118
Apparently there is a continuity of the precomp file between TS3, TSM and TS4: https://forums.thesims.com/en_US/discus ... ecomp-info
Any idea of how this file might be opened?
If a way is figured out of opening the file, the door might be opened up to better shaders for TS3, much like what has happened to TS2 with its assortment of shader enhancements.
Posts: 5,656
Thanks: 1035 in 5 Posts
Restoring inter-floor shading
Improving FOV for shadow rendering
Fixing graphical anomalies (e.g. Sim hair becoming partially invisible over glass)
Stretch goals:
Modifying existing shader parameters (e.g. changing ambient color of unlit rooms from blue to grey, increasing hair shine and self shading on Sim character models)
Implementing new shader functionality (e.g. porting subsurface scattering from The Sims Medieval, integrating post-processing effects into game engine)
The first and fourth, as well as porting shaders from The Sims Medieval, should realistically be quite easy. Changing a few values and rewriting a few lines of could would likely do the trick. The second and third should be more complicated, but likely achievable to a certain degree. Implementing extra FX may prove a lot harder, since entirely new code would have to be written for it. Of course this should consist mostly of translating Reshade source code to a language TS3 will understand.
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
Posts: 3,860
Thanks: 8537 in 67 Posts
Now, there are 2 shaders obviously. One that you can easily call onto the mesh: http://simswiki.info/wiki.php?title=Sims_3:Shaders
Then obviously that file. but the list of shaders can only indeed be fully edited by opening that file. however, it's just super compressed... which means... reading and binary code is probably the only thing you could do to really edit it. Still have to check that out myself though!
So yeah that would really only be your shot into "cracking it" which really is just looking through the peeks and just edit stuff around. However, what CAN happen is that once you edit it, the game just crashes, or just simply dies on you. So make sure to make a backup if you're trying this!
I'll take a look at this later and see what we can do with it
Posts: 3,443
Thanks: 938 in 5 Posts
@Lyralei, would you happen to also know if the shader file is also where the game's lighting system is stored?
Posts: 3,860
Thanks: 8537 in 67 Posts
1. object lights. Which basically is the LITE resource in a package, which every single object has due to needing some data to know how it's being cast... although this is more about the "shadows" it casts. However lamps also use it in a different way, basically inverted. Now this tutorial is more of a "fix" tutorial but it basically tells you (except for the blue lights) what I mean: http://poccisims3.blogspot.com/2013...-lightings.html
2. World lights. And this is basically how we know about lighting mods
3. The engine's lighting. Now if you've worked with a 3D modeling program and rendered things then you might understand what I mean with that. But see it as a "kitchen lamp" cast onto a table. Now there might have been some tweakings done in the shaders file regarding the contrast but it will never necessarily fully edit all the lights completely.
With contrast in this case I mean making things darker/lighter which is probably the answer you were looking for Although I'm not entire certain if this is actually the case
Posts: 3,443
Thanks: 938 in 5 Posts
Also of note is the SimSkin shader category, would be interesting if cracked open, there might be comparisons made between TS3's shaders and TSM's. Would love to see it it's possible to transplant some things, the same way some TS2 modder did between Castaway and TS2 for water shaders.
Edit: SimHair might also be an interesting one too look at- if specular settings could be improved, we might be able to get hair sheen for all hairs without any roundabout methods.
Posts: 3,443
Thanks: 938 in 5 Posts
http://modthesims.info/t/460275
BINGO! Someone on the Officials sent me a bunch of links to MATY, which I hadn't even considered consulting, and referred me to an After Effects plugin that can apparently read and edit precomp files. Haven't had the time to look into it much further but MATY seems to be doing a bit of problem diagnosis here, at least as far as the shadow situation goes. Would be nice to unfuckulate that, which would be possible with the shader file. Then again, there's probably a good reason it broke in the first place and EA might've broken it to make something else work. Might be worth raising the issue at MATY and seeing if they know more about it. There might yet be someone alive over there with a bit of engine knowledge to dispense. |
http://modthesims.info/showthread.p...143#post5496143
@AGuyCalledPi , do you have the original message they sent you? It might have a bit more information in it. Regardless, I've managed to grab the file here .
Old TSM discussion:
http://modthesims.info/t/579943
Sims 4 Forum discussion:
https://forums.thesims.com/en_US/di...32-precomp-info
It might be worth contacting @Inge Jones and asking about the sort of general programs used. Maybe @CmarNYC might know something as well?
Other discussion here:
https://www.steakunderwater.com/wes...topic.php?t=521
Link to the original NoMosaic mod: http://www.modthesims.info/download.php?t=343951)
Found the creator on their still-active Twitter account (https://twitter.com/gibbed), might try to contact them and ask about what program was used to create the original no-mosaic mod.
Anyways, according to the sources above, the precomp file might possibly be openable via:
- After Effects
- Maya
- Some Autodesk Creative Suite program
Posts: 3,443
Thanks: 938 in 5 Posts
http://download.autodesk.com/us/may...umber=d28e16321
http://download.autodesk.com/us/sup..._user_guide.pdf
Maybe the .precomp fil format may be related to the 2010 Maya Toxik suite of software, or software from around that time?
Edit: Mspoodle tested it out and the 2010 Maya Toxik suite does not open the original .precomp file. I still think there must be some modelling software material editor that's related to it.
Posts: 3,860
Thanks: 8537 in 67 Posts
So all that needs doing is just a script that de-compresses everything which with that ts4 should be easy peasy Will let you know how that goes!
Posts: 3,443
Thanks: 938 in 5 Posts
yeah basically looking at the sims 4 compiled file it did give me more answers as to why all the shaders are at the 'bottom' for ts3's code, when looking at the binary code there. It also explains pretty well why there were random "PASS" and "TECH" in the code as well, good thing ts4 and ts3 are incredibly similair! So all that needs doing is just a script that de-compresses everything which with that ts4 should be easy peasy Will let you know how that goes! |
Some good information there! Were you able to talk to anyone in that TS4 main forum thread? I think they might have some information about how TS4's precomp file might work, along with the SimGuru in that thread.
Posts: 3,860
Thanks: 8537 in 67 Posts
- Define the headers (this is an SPKG file and that is an SHDB, etc)
- Load in this and that rendering method
- Bunch of flags that are useless (except for the game obviously :P)
- Samples and passes methods (Which really narrows it down to, crunchy look and non-crunchy look. If you know all about blender rendering or just 3D modeling programs and rendering you know so well what I mean... the pain!)
- Mentions of what shaders exist. which really is just an Enum in a way. (Enum is like a coding shopping list, at least that's how I like to look at it)
Resources maybe that are interesting
So you can't actually edit the way the game reflects the lightings and stuff since that's in the actual engine. Every time you place a lamp, that's basically that lighting. There is this INI file I looked at though less than a week before that might be cool editing, although it only changes the AO of the roof as well as the walls. It's in the FullBuild0 package. Just search for the 'ini' tag and tada
Second thing, but that's more because I'm personally looking into that is just figuring out the code on how when fullmoon is triggered, why the world changes lightings, which I just think is a change of the world's lightings settings (The one i talked before, basically the file that makes a lighting mod ) But I'll just dig into the in-game's code and see what triggers that
Posts: 3,443
Thanks: 938 in 5 Posts
In the official forum thread (https://forums.thesims.com/en_US/di...2-precomp-info), SimGuruModSquad said that TS4's precomp file contained the game's shaders in a binary format. A shame if TS3's file was that useless though.
Posts: 5,656
Thanks: 1035 in 5 Posts
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
Posts: 3,860
Thanks: 8537 in 67 Posts
Hm, that's kind of a let-down. Still, would be interesting to be able to redefine the loading of these render methods. And figuring out what SPKGs and SHDBs are. And getting a look at those flags. The actual shader code, I assume would be located in the game EXE? Then how come the precomp file is 90 megabytes? That's a hell of a lot of plain text. |
It is! But with good reasons. So when you're compiling your code for the game, you obviously want the game to be able to call its textures, shaders, rendering settings, etc. Now I'm not sure if that's common practise perse but in the TS3W.exe as well as the TSLHost.dll, it holds pretty much all the 'directions' of where the game should get its details. They're actually listed like a map structure, which was obviously needed before the game was actually being compiled for release.
So the best way to change the game's lighting settings would be changing the world's toon. (See: http://modthesims.info/showthread.php?t=459198)
For shader tweaking, the best practise for that would be editing the object directly. EVERYTHING in the game is an object that can be found, although the most interesting one to edit for you would be the skybox as well as the world's terrain textures Checking out that AO ini file would also be worth it. Maybe you can even check the TSM's AO ini, toon ramp, skybox and what not?
Posts: 3,860
Thanks: 8537 in 67 Posts
Posts: 5,656
Thanks: 1035 in 5 Posts
If the actual shader code can't be accessed, it would at least be worthwhile to look into using the existing features of the lighting engine to enhance the game. Matter of the fact is, terrains are just plain old diffuse textures mapped onto the terrain geometry. It looks lifeless. Having bumpy asphalt or shiny sidewalks could be a major improvement, if at all possible. And yes, the skyboxes could do with some work. The way TS3 does it, you get a completely blank color gradient with a layer of 3d clouds scrolling over the top of the world. TS4 doesn't have the 3d cloud layer, it only has a backdrop texture. Adding a skybox object to each world, in addition to the distant terrain, could enhance the look of the world edges significantly.
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
Posts: 3,443
Thanks: 938 in 5 Posts
But yeah, beyond that, everything seems more or less tapped out in terms of game modding- anything else has to come out of that second layer of modding, CC creation.
Posts: 5,656
Thanks: 1035 in 5 Posts
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
Posts: 350
That line there doesn't need to have any weird angles, it should be a smooth circle that gradually blends into the darker blue sky, just like in real life: https://images.fineartamerica.com/i...a-elisseeva.jpg
edit: I forgot to tell you! When switching between different weather types using timeshifter in-game, you must return to desktop and then go back to full screen if you want to observe the true differences. The first 3 bars in the colour ramps bleed into each other which makes observing the differences impossible. This doesn't matter if you're not trying to change the top 3 bars e.g you're just changing cloud colours. Also, checking these differences in CAW are useless. I only recommend checking sky and cloud colours in CAW and even then, clouds will look significantly different in-game than in CAW.
Also, if you do not have this ugly blue sheen, the game is not correctly reading your color ramps http://www.modthesims.info/showthre...stpost&t=608782
I lost weeks worth of research and had over a thousand of flawed screenshots because I didn't realise this earlier.
@Lyralei modifying those values you can easily make your game look like TS2 :D
Posts: 5,656
Thanks: 1035 in 5 Posts
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
Posts: 3,860
Thanks: 8537 in 67 Posts
Anyways I'll have a better look at the sky bit, if it's a mesh it's not that hard to edit it! If it isn't... then it might be worth seeing if editing the ramps and stuff could be worth it?
Posts: 350
@Lyralei Very Interesting. Could clouds be meshes too? They seem naturally blend, but the color ramps that control the color of the top & lower part of the sky do not.
Posts: 3,860
Thanks: 8537 in 67 Posts
Super late reply, and I remember looking at it at some point but they're basically 'animated' clouds. There have actually been some replacements made for it as well if you want to take a look at that, and believe me, the original file is not pretty So this one should fix that: http://nilxis.tumblr.com/post/14627...ready-made-some
Posts: 350
Posts: 1,889
Thanks: 686 in 10 Posts
I'm more interested in sims 3's room lighting system, and from what I get, shader precomp file is, well, mostly useless. However I do wonder, because Sims 3 and Sims 4 basically share the same graphics engine (all the shaders from ts3 and tsm are available in ts4 as well) and because you can edit indoor sims 4 lighting ambience color, wall AO as well as lightmap subdivision trough SimData XML files... I was wondering if there is a sims 3 equivalent to that somewhere but I just couldn't find it in game files anywhere. This is really strange because outdoor lighting ini files allow for direct editing and change preview from within the game itself and one would expect to have options to change indoor lighting.
A thing I've found are AO and lighting ini files (amongst others like camera) in full build and delta build packages that should change wall lightmap quality or no lights room lighting color... but the changes don't show up in game and it's either that the file is not containing properties for those specific things or that it's just not used anymore.
Here is how sims 4 lightmap subdivision looks in 4 times higher settings (default is 4, this is 16):
Sims 3 floor lightmap surely uses the same system, but it would be a real bummer if editing of this resource is engine restricted.
Who Posted
|