PDA

View Full Version : Is it possible to change the default preset materials for an object? *SOLVED, thanks all!*


Esmeralda
15th May 2011, 11:54 AM
(ETA 16 May 1:20pm: Just to clarify, where I've referred to 'materials' in this post and the title of the thread, I meant as in CaST Patterns and not as in the Material Definition.)

Can we change the default preset materials of the object we cloned our object from? I haven't been able to find reference to this in any of the object tutorials I've looked at, and have not been able to figure it out from looking through the various categories in the OBJD - have I missed something, or it it not possible to change it?

I want to upload the below microphone, but would rather it not come wrapped up in the heavy wooden default material of the mirror I cloned it from, as in the first of the two below screenies! I'd like to be able to change the default to the plain white in the 'Misc' section in CaST, as in the second below screenie:

http://thumbs2.modthesims2.com/img/3/1/6/9/9/6/3/MTS2_EsmeraldaF_1199639_micx2.jpg

In my previous object uploads where the default material differed from the ideal materials, I've given recommendations for the downloader to change the material, but I'd rather be able to just supply the object in the correct material if it is possible to do so, rather than have to make the downloader change it themselves, especially with this one as the dark wooden texture for a microphone is just TOO silly!

Inge Jones
15th May 2011, 12:14 PM
Which modding tool are you wanting to use?

Esmeralda
15th May 2011, 12:23 PM
Thanks Inge, I use your s3pe and s3oc.

orangemittens
15th May 2011, 12:29 PM
It's possible. You need to change the settings in the OBJD. Cmo wrote initially how to do this in part 2 of his painting tutorial. s3pe has been updated now so it's not as much work but the areas shown in that tutorial are still the parts you need to change iinm. If you want to see an example of it, the seating set I made for Indigo has the defaults changed. This is the tutorial link:

http://www.modthesims.info/showthread.php?t=377883

Esmeralda
15th May 2011, 12:42 PM
Hi OM, I did read that tutorial last night but wasn't sure it applied to what I was trying to do and it was late and my brain was too tired to continue, but now that you say it does apply to what I need to do, I'll give it another try! I had a Google for your seating set - if it's the one called Monday Seating Set, I've downloaded it and will take a look at the OBJD settings. Thank you for your help!

orangemittens
15th May 2011, 01:26 PM
Np...and that's the seating set I was referring to. S3pe has been updated since I've played around much with changing default settings but it looks like where you need to look now is OBJD/Materials/MaterialBlock/MaterialBlocks/ComplateOverrides and OBJD/Materials/TGIBlocks. If you click on OBJD and choose the Value button you get a popup with the whole layout of your OBJD complete with all the material rotation settings and etc. so using Delphy's tool how we used to have to to see the old values for HSV materials (like wood, metal, fur) shouldn't be necessary anymore. Also, keep in mind that most materials like geometric, stripes, and etc. use RGB and not HSV.

In your case, since you want a sort of metal look, you might find it easiest to select a light silver metal item to copy for your material settings since the original item is wood.

Esmeralda
15th May 2011, 05:50 PM
Ah well, probably going to have to give up on this idea - have gone around in circles for hours and nothing I've tried has made a difference except for one attempt where I ended up with a solid default colour that was a sort of brass colour but was unrecolourable.

The painting tutorial is mostly about changing the 'TypeCode' but there is no 'TypeCode' category in my package, don't know if that's something that's now out of date or if it's just that there is no TypeCode category in the particular item I'm cloning.

I think I'm going to have to re-clone my item from some other item that has a plain or light metal finish! Thanks again!

BloomsBase
15th May 2011, 05:58 PM
You could open your package with TSRW and change the shader and/or the MTNF settings :)

orangemittens
15th May 2011, 07:34 PM
The type codes are the lines in the Complate Overrides section I mentioned above. The label type code has been abbreviated to TC. :)

Esmeralda
16th May 2011, 11:37 AM
Thanks Bloom and OM - I tried opening/editing the package with TSRW but it gives an error message about index being out of range, and when I clicked to continue anyway, my mesh was missing in the 3D preview display, only its groundshadow was there! I see that it's really easy to change material presets in TSRW so it's a shame it didn't work for me. (But then, I've tried TSRW on many occasions in its various versions since it came out and have never been able to produce anything successfully with it that didn't have major problems of one sort or another - hence I stick with s3pe for objects and CTU for CAS items, as both of them give me reliable results every time!)

OM, I can't find anything called 'TC' within the Complate Overrides section either, never mind 'TypeCode', so am still lost as to what to do. I just went around changing every mention of 'wood' to 'solidColor' but it had no effect. To make matters worse, I found that the other floor-standing mirrors, which is what I need to clone my item from, also have wood as their default finish (I thought the Modern Mirror was metal but apparently not!) so I'm no better off using them either. I think I'm going to just have to ask downloaders to change the material manually in CaST.

Thanks both of you again for your advice!

Inge Jones
16th May 2011, 12:25 PM
I am losing track of this. Are you trying to edit the preset overrides or the materials? Confusingly, the preset overrides are in the OBJD in a section called Materials, while the materials are in the MODL and MLOD resources, in sections called MATD. Materials are to do with whether it's glass, or solid etc etc, while the stuff in the OBJD is to do with the actual patterns or textures applied, as well as the masks and multiplier (areas of highlight and shadow) and specular (areas of shine)

Cloudburst
16th May 2011, 12:30 PM
The TCs appear in the Complate Overides, like "TC05_XY" or "TC01_String". I think the only other real difference in the tutorial orangemittens liked to is that "ControlCodes" are now "VariableNames", but the tutorial should still work for changing materials.

Esmeralda
16th May 2011, 12:40 PM
I am losing track of this. Are you trying to edit the preset overrides or the materials? Confusingly, the preset overrides are in the OBJD in a section called Materials, while the materials are in the MODL and MLOD resources, in sections called MATD. Materials are to do with whether it's glass, or solid etc etc, while the stuff in the OBJD is to do with the actual patterns or textures applied, as well as the masks and multiplier (areas of highlight and shadow) and specular (areas of shine)
It's to do with the patterns or textures applied - for instance, in CTU the equivalent of this is found in the 'Patterns' tab where you choose from among the patterns/textures from CaST. With my object, the game is automatically applying a default wood pattern to my object from the Wood section in CaST (because that's what the object I cloned from had) and I don't want it to do that, I want it to apply a solid white colour instead.

The TCs appear in the Complate Overides, like "TC05_XY" or "TC01_String". I think the only other real difference in the tutorial orangemittens liked to is that "ControlCodes" are now "VariableNames", but the tutorial should still work for changing materials.
Thanks, I'll have a look for those when I get the chance later!

Cloudburst
16th May 2011, 01:00 PM
Just had a thought, if the original object you cloned from has less than three channels enabled, then the materials for the un-enabled ones usually default to SolidColour. So you could just go to Materials/Materials/MaterialBlock, then the "..." next to MaterialBlocks and delete the wood one, copy the SolidColour one and rename it pattern A (or whichever pattern you want).

Esmeralda
16th May 2011, 01:19 PM
Just had a thought, if the original object you cloned from has less than three channels enabled, then the materials for the un-enabled ones usually default to SolidColour. So you could just go to Materials/Materials/MaterialBlock, then the "..." next to MaterialBlocks and delete the wood one, copy the SolidColour one and rename it pattern A (or whichever pattern you want).
Ah, that could be interesting, I didn't know you could do that! It has two channels enabled (Pattern A and B) that default to wood, and a third (Pattern C) that is not enabled but defaults to 'cast iron' for some reason. I'll see if there's a 4th channel set to 'solid' - thanks!

orangemittens
16th May 2011, 01:49 PM
Esmerelda, to find the TC's open your clone package and click on the OBJD line. Hit the Grid button, click on the Materials line and then on the button with the little dots all the way on the right side. Select one of the Material lines on the left side and then click the + button next to the words Material Block on the right side. Then click on the Complate Overrides line and then on the button with the three dots on the right side. This will open up a new box and the TC's you're looking for are listed there.

The mirror I'm looking at doesn't have the solid color mentioned above. But if you switched to cast iron you could lighten the default color of it to white as long as the texture of it looked smooth enough for your liking. It would be better than grained wood for your object :)

Cloudburst
16th May 2011, 02:37 PM
Ah, that could be interesting, I didn't know you could do that! It has two channels enabled (Pattern A and B) that default to wood, and a third (Pattern C) that is not enabled but defaults to 'cast iron' for some reason. I'll see if there's a 4th channel set to 'solid' - thanks!
Ah, every obejct I've cloned used solid colour, but as orangemittens said, cast iron could work as an alternative. :)

Esmeralda
16th May 2011, 06:50 PM
Did it!!!! Hooray!!! For anyone who wants to try it, what finally worked was:

1) I did the first part of cmomoney's tutorial, going into CaST and selecting the item that I cloned my microphone from, The Reflectinator mirror (aka internal name Moderate Mirror). I changed each of the two channels of the mirror from Wood to the solid white color in the Misc category. As instructed in the tutorial, I saved the mirror recolours in the CaST presets window and then 'shared' it as a Sims3pack, then extracted the Sims3pack to package format with Delphy's Multi-Extractor. I opened the new 'shared' mirror recolour package with s3pe, clicked the Value button and my new pattern info was: <pattern name="solidColor_1" reskey="key:0333406C:00000000:71D5EFB6C391BC17". I coped the Instance number string from the key under the 'pattern name' entry. Maybe because I just wanted a solid colour, there wasn't any further info listed re HSV shift, specmap,etc.as shown in the tutorial - all there was in my case, was the 'pattern name'.

I closed that new 'shared' mirror recolour file and opened my package file that contained my 'wooden' microphone. I did the one section of the 'Linking to the pattern' part of his tutorial where you use the TGI Block List Editor: I copy-pasted the Instance number of the 'pattern name' from the newly-created 'shared' recolour file that I'd just closed, over the Instance number of the second XML entry in that list.

I tested it in-game and found my item was now a solid colour rather than wood pattern, but it was still brown rather than white.

2) I opened the microphone package again and went into the Grid again, and this time I chose Materials ... / (0) Material / Material Block / Material Blocks ... / (0) Material Block / Complate Overrides ... / TC02_ARGB . In TC02_ARGB (variableName Color), I changed ARGB to 0xFFFFFFFF . Because I have two colour channels, I then repeated the same procedure with (1) Material. So, Pattern A and Pattern B were now set to white.

I tested it in-game again and now both channels were solid white, and recolourable. Big sigh of relief!

Thank you everyone for your advice, I never would have figured out the TC stuff without your tips!

(ETA: Edited for a bit more clarity)