• Welcome to SC4 Devotion Forum Archives.

How to rotate a model in a prop?

Started by FrankU, November 03, 2011, 03:40:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FrankU

Props have a direction that is visible by the arrow. A prop contains a reference to a model. As far as I know you can not change the rotation of a model in the prop exemplar: you must make a new model. Is that true?
With the RKT (or RTK?) values you can offset a model in a prop. I did that several times. Since I know about that possibility I have been asking myself if it is possible to rotate a model too.
This would come in handy when using prop families.

I have two examples:
1. A prop family containing several sheds. Some sheds have their doors to the north, others to the west, south or east. It would be nice to have them all in one family with the doors in the same direction.
2. A prop family of four times the same tree model in four different rotations. If you put this propfamily in a row next to a street and plop it you will randomly see that same model in different rotations. More variation in your streets without having to make a lot of tree models.

It is possible?

Lowkee33

#1
Hmm, without editing the model?  Maybe using a RKT0.  I think this would display the same rotation of the model in every rotation in-game.  The property is filled in just like RKT1 (3 reps).  You might be able to have 4 exemplars with 4 different RKTO.  The 4 RKT0s would be filled in:

T, G, 0x####0000
T, G, 0x####0010
T, G, 0x####0020
T, G, 0x####0030

So, you would put these props would be in the same family.  I've never tried it myself.

The models themselves  can be rotated with Cogeo's Model Tweaker.  This would solve your "doors facing the wrong way" issue.

For the trees, you would want to clone the models 3 times, and then rotate each one seperatly to make the West, North, East facing models (the original is the south).

Cloning models would be pretty quick in Reader.  Select all of the S3Ds (not the FSH), right click, and select clone.  You will see your options (how many clones, and how much to increase the TGI by).  You want 3 clones.  Increase the GROUP by something (I would recommend 0x00000001, if you want to get fancy 0x20000001).

Edit: not correct.  Increase the INSTANCE by something.  This is complicated for two reasons.  1) The batter used the same group for many models.  You need to find an instance that he/she didn't use, and you have to guess that he/she will never use.  2)  It has to be a non-maxis Instance.  Maxis used a lot of instances, but there are large chunks missing, and good ones aren't too hard to find.  In the case that #1 is true, I would try to find obscure Instances that are in a small range.

Happy Hunting! :)

FrankU

Hi Carl,

You mean that the instance defines the rotation? 0x####0000 is maybe north, 0x####0010 is maybe west etc? And the #### are the number of the model?
And indeed, if I out these into one prop family every time a lot with this propfamily is plopped will show one of the four orientations. So a ramdom appearance of the same model in four rotations. I think that would be nice for streetside mods, park lots, etc.

I guessed you were going to tell that I could use the model tweaker. There is one disadvantage, as far as I know: this is modding of a model that is someone else's, so I am not allowed to upload it for others.... So I cannot use it for my farms set or other lots that I want to release.

Orange_o_

You have to ask permission, if intelligent people, this should not be a problem.

   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °   °  


FrankU

Hmmmm, yes, that's right, althoug I considerend rotation of Maxis props.....

Another thing: rotation through some coding in the exemplar only needs a new exemplar. If I have to clone many models the pluginsfolder will get obese... And I like to prevent that.

The RKT0 option is useful for trees in a park, but not for trucks or sheds. Pity....

Lowkee33

#5
Hi Frank,

Quote from: FrankU on November 03, 2011, 08:15:17 AM
You mean that the instance defines the rotation? 0x####0000 is maybe north, 0x####0010 is maybe west etc? And the #### are the number of the model?

I will get specific.  A standard model consists of 20 S3Ds and 20 FSH.  The FSH are the textures of the model, and there may be more than 20 if the model is big enough.  Always 20 S3Ds for a standard model.

The Instance of an S3D is 0x####XYZ0.  Indeed, the #### is specific for a model.  There are issues when these 4 digits are the same of a Maxis Model.  People had rendering bugs until the Model Name fix came out.  Unless someone changes it, the first four digits are 0003 these days.

X is either 0 or 1.  Models that are rendered as a foundation have this digit a 1, and it means that the model wont cast shadows.  Regular models have this be a 0.  (FSH have the same layout, a digit of 8 here means that it is a nightlight texture.  A pre-release SC4 had snow textures too, haven't tried to make this work though...).

Y is the zoom: 0, 1, 2, 3, or 4.  4 is the closest zoom (5 and 6 on the keyboard in-game)

Z is the rotation of the model: 0, 1, 2, or 3.  0 is the rotation that the "prop arrow" will point in LE.  1 is west, then north then east. 

The last digit is always a 0 for S3Ds.  FSH can have other values though, they will count up until reaching F.  (Hence, the largest model possible is 16 * 256 pixels large.  This is the reason why some tall buildings are two models with the top part being a separate prop.) 

Quote
I guessed you were going to tell that I could use the model tweaker. There is one disadvantage, as far as I know: this is modding of a model that is someone else's, so I am not allowed to upload it for others.... So I cannot use it for my farms set or other lots that I want to release.

Yes, but maybe no.  Not too sure about this one.  If you clone the S3Ds (and only the S3Ds) your files still need the original model's FSH.  If you were to upload something like that, the original files would still be a dependency.

Check out the models in CP_Vol01.  They all have the same Group ID, but with different first four digits of the Instance.  If you are careful about what Instance you choose (not being a Maxis Instance) then you can use the same Group ID without fear of overriding someone.  You would want to use the same Group that PIMX gives your props, it is unique to your computer.

Quote from: FrankU on November 03, 2011, 08:29:43 AM
Another thing: rotation through some coding in the exemplar only needs a new exemplar. If I have to clone many models the pluginsfolder will get obese... And I like to prevent that.

The S3Ds are quite small compared to the FSH.  In most cases, your cloned S3Ds would be near a kb.  You can sometimes do things to the S3D to make them smaller, but it is tedious and not very rewarding.  As far as bloating Exemplars, run DatPacker on them with "compress dat" on.  Doing this will nearly half the file size of your exemplars.

Lowkee33

I gave some bad advise here.

If you are going to clone S3Ds, then you need to keep the Group ID the same, and change the first four digits of the Instance to that of a non-Maxis Instance.  Sorry about this, I will edit my post.