PDA

View Full Version : Layering TXMTs?


xanathon
22nd Feb 2006, 09:56 PM
Is it possible to "layer" TXMTs?

Example: I have one group in my GMDC called body.

In the SHPE I set this to two different TXMTs

body -> txmt-name-01
body -> txmt-name-02

Will this work?

The idea is to layer two TXMTs, the "outer" having an alphachannel that shows only parts of the "inner".

Sorry for not just trying this, but I have no access to a computer with an installed Sims 2 until tomorrow evening (MEZ). So maybe one of the wizards here is able to tell me if this is totally nonsense, so I can cancel the thought that is plagueing my brain... :D

If it is possible however, this could lead to some cool effects.

niol
23rd Feb 2006, 01:20 AM
Hope this approach can be easily done....:D when possible.
I can make som recolours then...

But, how about making a set of modular objects that can combine together graphically like lego to form different combo objects or what, so one can have >2 recolouring options for a particular resultant combo piece?

xanathon
23rd Feb 2006, 05:36 PM
Okay, I tried this.

I fear that I have to say that it does not work. The preview in SimPE does show only one texture and if I try to load the object ingame the game crashes... :disgust:

Numenor
26th Feb 2006, 11:08 AM
As far as I know, Maxis experimented with layered clothing, but it was too resource-intensive for normal PCs, so they didn't implement this feature.
I guess that the reason why the layering was so "heavy" is because each "layer" needs a mesh of its own (i.e. you can't apply - as you have discovered by yourself - multiple TXMTs to a single mesh).
The only solution shoud be duplicating the mesh, and apply 1 TXMT to each, in the Shape.
This might be not so resource-killing for little objects, or even a single sim, but it will be too much for a normal PC if *every* sim had a layered mesh.

Inge Jones
26th Feb 2006, 12:04 PM
You can sort of do it in an object. Make each layer a separate subset with its own material, then you can change up to two of those layers in design mode, and make the others appear or disappear in play.

Numenor
26th Feb 2006, 05:52 PM
But each "subset" needs its own complete mesh, identical to each other layer, right?
For example, imagine a table with a recolourable cloth that goes down to the ground (so, no feet visible: in the GMDC there is only one mesh); if I want to "layer" an additional lace cloth onto the first one, I need to duplicate the mesh into the GMDC, give it a different name, and then assigning to this new "subset" it's own (recolourable) TXMT and semi-trasparent texture.

Am I right? Have I missed something?

Inge Jones
26th Feb 2006, 09:34 PM
Yes and each successive mesh needs to be a little biiger than the one beneath (unless they will not show at the same time) otherwise you'll get shimmering through.

darylmarkloc
27th Feb 2006, 12:48 AM
I've sort of raised this before elsewhere, because I have an idea in mind and don't want a multitude of recolour files to handle it..I really don't want to say what it is here but, it would require a simple texture change for each instance of the object the user places. Now..if it is simple (like a plane or flat surface), could there be some way to hack the texture animation feature into a clickable menu on the object so that it displays that particular cell as the texture until such time as the player clicks and chooses next cell in line? It would have to be able to handle multiple instances of an object each with it's own selected coloring..I know this works automatically, I've tried it.."all" it needs is user interaction in the cell selection process in place of the timer mechanism...

Added: I have tried it with an object with several subcomponents and it works..every x-ticks it will change texture..maybe this is where you could be looking for the answer?

Inge Jones
27th Feb 2006, 07:50 AM
And you could take a look at the calendar I made for MTS2, the one that uses the competition pictures of the month. That is actually one mesh with several materials being applied to it, but it changes automatically during game play the same function calls are what you'd use to make some parts of the mesh invisible too - just by defining an invisible material.

You can have an object that changes colour by defining a range of coloured materials, which is more size-economical than having a texture file for each colour. I believe you can make one texture file with a pattern on it and combine the effect of the plain coloured material and the patterned texture.

So using the example of the long tablecloth and the shorter lace overcloth, you can give the top mesh a texture which includes an alpha channel to make the lace, and colour it by giving it several materials *including* a transparent one for when you want no lace on the table at all.

Same for the main cloth except you can do without the alpha channel as it will be solid, and the transparent material when applied will leave you with only the lace over the wooden table.

Then using the example from my calendar, or from my automatic curtains and blinds at simlogical - or even my apartment-grouped security controllers - you can use menus in the game to select how the table looks at any time, or like with the calendar let it change automatically, so you take off the lace cloth at mealtimes, and have only the lace for formal parties etc.

darylmarkloc
27th Feb 2006, 08:00 AM
Yessssss...if a user defined selection of animation cells can be implimented rather than the timer...I could achieve with one 1024 x 1024 image what would currently require nearly 40 different recolour packages *gag*

Inge Jones
27th Feb 2006, 11:22 AM
Though I should warn you that after you do make something that changes material automatically, it is devillishly difficult to *also* allow it to be user-recolourable.

darylmarkloc
27th Feb 2006, 08:53 PM
Hmmm...I could see it would require whatever process is implimented on the main package to select a cell as a texture would have to apply to any recolour package as well...since I have only just started prodding at things inside I don't know enough to know what. 'Pull animations' seems to drag in a lot of that stuff. Could a 'cell selection' package be flagged as such so that when 'recolour' is selected the relevent modifications are copied? I'm groping here...

darylmarkloc
3rd Mar 2006, 11:10 PM
I've found what I was looking for - this is an early shot of the recolour test, I'm in the process of modifying the whole thing but I found an abandoned test package for testing placement and changing objects in-game and I've been modifying it (slowly and in stages) to do what i want. This was the result of my first round of testing though - multiple objects, selected by pie menu, one GUID, and a series of recolours for each. And it didn;t crash my game (always a plus) I'm replacing the models shown in the pic with simpler ones to insert the BHAV's (only because these objects are rather complex in their interactions and for testing I want to keep it simple), and the second series of tests seem to show that I can have a different SIM interaction with each model. I can have two or more instances of the same object and use the pie menu to change the texture image as well..it's early days yet and my Sim is getting peed off at having to come look all the time...but I am kinda excited about this...

Numenor
3rd Mar 2006, 11:48 PM
So, you seem to have discovered the "Change Material" and the "Change Model" functions :)
Good work, exploring the game files, especially the left-over "test" ones, really can teach a lot.

Only, this is not the right thread to talk about this, lol! ;)

xanathon
28th Apr 2006, 09:31 AM
I've found the TXMT-Property numTexturesToComposite (0-99999) in the Wiki.

Has anyone an idea what's this for?

Numenor
28th Apr 2006, 09:56 PM
Those TXMTs are an endless source of surprises...
I've never heard of such a property; though I can see, now that I checked my working notes, that such parameter DOES exist in the game's TXMTs, but only in the "SimSkin" TXMT type; in the game, the used values for this property range from 2 to 10.

EDIT:
Though I basically don't know what I'm talking about :lol: I guess that the numTexturesToComposite property is used in conjunction with the compositeBaseTextureName; this last property accepts a single string argument, in a very odd format: for example "cuface_s4_uuface_eye_dkbrown_uuface_browcombed_black-diffuse", that obviously is compose by the texture names "cuface_s4" + "uuface_eye_dkbrown" + "uuface_browcombed_black-diffuse".

If I'm right, the numTexturesToComposite states the number of textures that the compositeBaseTextureName should be splitted in.

niol
1st Oct 2006, 06:06 AM
Yes and each successive mesh needs to be a little biiger than the one beneath (unless they will not show at the same time) otherwise you'll get shimmering through.

I know I'm responding to something quite a while ago and I almost knew nothing about it.

I guess defining the layer value can by-pass shimmering somehow, yet it can cause overlapping or shimmering with other background layers... even value for the layers are for non-transparent usages under some conditions while odd ones are for transparency.

May try to use SimSkin and SimStandardMaterial for the txmt-MatD file type.


Added after Numenor's post:
Wow, that sounds great... :bunny: I hope they rescue some of the old features, too.

Numenor
1st Oct 2006, 09:53 AM
I believe this thread will be very popular in the near future, when Pets will be released, since they have officially enabled layers for the animal skins.

I don't know at what extent they have changed the layers system, so I'd suspend the tests until the Pets is out :)

xanathon
21st Dec 2006, 07:43 AM
Anything new about this?

WesHowe
22nd Dec 2006, 12:13 AM
Well, all I can add is that I did a lot of work reverse-engineering the coat colors in CAS.
I posted a not-complete coat add-on package here:
http://www.modthesims2.com/showthread.php?p=1506002#post1506002
I pretty much just copied the TXMT parameters from the game, though, as I have never worked with them as deeply as some others have.
You are, of course, welcome to take anything in there and use it as you want.
<* Wes *>