Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: How to rotate a model in a prop?  (Read 3029 times)

0 Members and 1 Guest are viewing this topic.

Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 227
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
How to rotate a model in a prop?
« on: November 03, 2011, 05:40:18 AM »
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?

Offline Lowkee33

Re: How to rotate a model in a prop?
« Reply #1 on: November 03, 2011, 09:54:53 AM »
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! :)
« Last Edit: November 05, 2011, 08:07:29 AM by Lowkee33 »

Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 227
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
Re: How to rotate a model in a prop?
« Reply #2 on: November 03, 2011, 10:15:17 AM »
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.

Offline Orange_o_

  • VIP Team
  • Forums Senator
  • *
  • Posts: 710
  • Total likes: 10
  • Reputation: 9
  • 私たちは皆、日本人です - We are all Japanese
    • My creations for Sc4
  • CL:
    Like a Rock
Re: How to rotate a model in a prop?
« Reply #3 on: November 03, 2011, 10:22:04 AM »
You have to ask permission, if intelligent people, this should not be a problem.

                                                                                


Offline FrankU

  • It's Frank, the U is just for the suspense
  • BeNeLux Team
  • Forums Guru
  • *
  • Posts: 3348
  • Total likes: 227
  • Reputation: 14
  • Dutch Housing Project
  • CL:
    U Grow It
Re: How to rotate a model in a prop?
« Reply #4 on: November 03, 2011, 10:29:43 AM »
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....

Offline Lowkee33

Re: How to rotate a model in a prop?
« Reply #5 on: November 03, 2011, 11:51:29 AM »
Hi Frank,

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.

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.
« Last Edit: November 03, 2011, 11:54:43 AM by Lowkee33 »

Offline Lowkee33

Re: How to rotate a model in a prop?
« Reply #6 on: November 05, 2011, 08:01:35 AM »
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.