Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 1st Sep 2010 at 7:34 AM
Default TS2 TXMT & TS3 MATD Equivalent Fields?
Hello everyone. It's been a while since I've done stuff in the TS3 modding community, mostly because I've been busy over the summer with my job.

Anyway, I've recently gotten into attempting to convert some TS2 objects to TS3 objects, but one of the biggest time consuming inconveniences I've come across so far is transferring field values from TS2 TXMT blocks to TS3 MATD blocks.

What I want to know is all the fields in these two file types that are rough equivalents/counterparts to one another.
I know that not every field will have a counterpart, since TS2 and TS3 use different lighting systems and other systems.
However, I'd like to match up as many equivalents as possible to make sure I don't end up missing an important value that controls how part of an object will appear and interact with light in the game.

Once I have all the equivalents matched, I can write an algorithm for converting an exported xml file of a TS2 TXMT block to a .MTLSRC file in Wes Howe's specification for a text file containing the data of a MATD block.

This is what I have so far in terms of my own attempt to match up the most important material definition fields:
  • TS2 TXMT Field = TS3 MATD Field
  • reflectivity = Reflective (0x73c9923e) 1 1
  • refractionWeights = RefractionDistortionScale (0xc3c472a1) 1 3
  • stdMatAlphaMultiplier = Transparency (0x05d22fd3) 1 1
  • stdMatAlphaRefValue = Transparent (0x988403f9) 2 1
  • stdMatDiffCoef = Diffuse (0x637daa05) 1 3
  • stdMatEmissiveCoef = Emission (0x3bd441a0) 1 3
  • stdMatNormalMapTextureAddressingU = NormalUVScale (0xba2d1ab9) 1 3
  • stdMatNormalMapTextureAddressingV = NormalUVScale (0xba2d1ab9) 1 3
  • stdMatNormalMapTextureAddressingW = NormalUVScale (0xba2d1ab9) 1 3
  • stdMatSpecCoef = Specular (0x2ce11842) 1 3
  • stdMatSpecMaskTextureAddressingU = SpecularUVScale (0xf12e27c3) 1 3
  • stdMatSpecMaskTextureAddressingV = SpecularUVScale (0xf12e27c3) 1 3
  • stdMatSpecMaskTextureAddressingW = SpecularUVScale (0xf12e27c3) 1 3
  • stdMatSpecPower = Shininess (0xf755f7ff) 1 1

Probably, most of the items on this list are completely wrong, or mismatched. However, I'm not very familiar with either format.

That is why I'm asking the rest of the community for assistance. Could those with more experience meshing and working with material definitions in TS2 or TS3 help correct my mistakes and complete this list? I thank you very much for your assistance.

ChaosMageX
Advertisement
One horse disagreer of the Apocalypse
#2 Old 1st Sep 2010 at 7:45 AM
Interesting thread, thank you

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Lab Assistant
Original Poster
#3 Old 1st Sep 2010 at 7:59 AM
Quote: Originally posted by Inge Jones
Interesting thread, thank you


You're welcome. I'm really hoping some of the experienced object creators contribute to it.

This, in my opinion, is another key topic in the obstacles that need to be overcome in developing smoother up-conversion of scenegraphs from TS2 to TS3. I'm surprised a topic on it hasn't been created already.

I'd try harder to find more fields that possibly match, but it's late where I am and I'm too tired to concentrate right now.

Also, I'm not sure if the above fields are correct, since there is no indication on the wiki of the data type and data count for each field in a TS3 MATD.
Can a TS3 MATD field's value type and value count vary, or is it constant for some fields and not others?
Are there fields that are always single floats, or a vector of 3 floats?

At least the TS2 TXMT Parameters page on the wiki has definitions for some of its fields, including their number and type of data. All the TS3 MATD page does is list names and hash codes of its fields, without giving any indication of the format of the value they typically have.
Lab Assistant
#4 Old 1st Sep 2010 at 9:02 AM
Maybe this helps on the sims 3 side of things. I did a scan of the fullbuilds to get more info on the MATDs to find the possible shader name and field name hash combinations, and cross-referenced the un-documented ones with the names from Shaders_Win32.precomp.
Attached files:
File Type: 7z  materials.7z (4.4 KB, 9 downloads) - View custom content
Back to top