Jump to content

Model Scaling


  • You cannot reply to this topic

5 replies to this topic

#1 Martin Thompson

Martin Thompson

    Member

  • Members
  • 125 posts

Posted 08 June 2010 - 07:00 PM

Hi guys, its me again :)

Quick question this time. I know its done in RPG-X so i know its possible in
the single player as well:

How do i scale a model? The thing i want to do is add a key/value
pair to the misc_model entity that when set scaled the model up
or down by the value given. Shouldn't be that hard right? I know
model scaling is possible since you guys did it for the player model,
X and Y and Z can even be scaled independantly so, yeah.

Much obliged.

#2 Apprentice

Apprentice

    Mighty pirate!

  • Members
  • 558 posts

Posted 08 June 2010 - 09:01 PM

key: modelscale
value: 0.6

Any number larger then 1 will increase the size of the model, any number below 1 will shrink the model. Works only with misc_model entitiies, not with misc_model_breakable or at least I haven't been able to make it work . . .

#3 GSIO01

GSIO01

    UberGames Developer

  • UberGames Developer
  • 1,021 posts

Posted 08 June 2010 - 10:24 PM

misc_models are scaled down by q3map2 or any other compiler one might use.
misc_model_breakable can't be scaled as they are somewhat dynamic and handled as entities in the gamecode, there should be a way to scale them on the client side even though there is no real client in SP ... I can't tell you how the playermodels are scaled as I'm to lazy to open the RPG-X code right now ... I'll have a look the next time I work on it.

#4 Martin Thompson

Martin Thompson

    Member

  • Members
  • 125 posts

Posted 09 June 2010 - 09:57 AM

Alright, I'll have a look at the misc_models then. It would also be great if misc_model_breakables would be able to scale since those are ones controlled by Single Player scripts ETC. But for now just the static models will do.

Code:
key: modelscale
value: 0.6
Any number larger then 1 will increase the size of the model, any number below 1 will shrink the model. Works only with misc_model entitiies, not with misc_model_breakable or at least I haven't been able to make it work . . .


Does that also work in Single Player? I'll need to ask Griffin since he's the mapper but i let him know. If that isnt implemented in Single Player yet ill have to code it myself.

#5 GSIO01

GSIO01

    UberGames Developer

  • UberGames Developer
  • 1,021 posts

Posted 09 June 2010 - 01:56 PM

It does work as misc_models are scaled by the compiler and not the game.

q3map2 also supports modelscale_vec which allows the mapper to scale a model diffrently for each axis (e.g. value = 1 .6 2).

Just had a quick look at the RPG-X code. The scaling is done by simply scaling the refEntity_t's axis (or so it seems).

#6 Martin Thompson

Martin Thompson

    Member

  • Members
  • 125 posts

Posted 09 June 2010 - 05:42 PM

Ok, so it would be easy to also scale misc_model_Breakables then if i where to change the code?



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users