Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Sushi on July 23, 2009, 04:16:30 pm

Title: Rescaling Ships
Post by: Sushi on July 23, 2009, 04:16:30 pm
If I wanted to scale a ship up or down in size by X%, what all would I need to do and how would I do it?

For example, let's say I wanted to make the Perseus half as big as it currently is.
Title: Re: Rescaling Ships
Post by: captain-custard on July 23, 2009, 04:47:05 pm
get a dwarf to fly it
Title: Re: Rescaling Ships
Post by: Angelus on July 23, 2009, 04:50:12 pm
If I wanted to scale a ship up or down in size by X%, what all would I need to do and how would I do it?

For example, let's say I wanted to make the Perseus half as big as it currently is.

Open it up in PCS2 collada build, then save it to .dae, load it up in a 3D app ( you'll need the collada plugin ) and then scale the mesh up/down.
Export as .dae again, load it in PCS2, ( edit/ adjust as needed ), save as .pof.

You can use Blender as 3D app.
Title: Re: Rescaling Ships
Post by: Dragon on July 23, 2009, 04:56:50 pm
You can also try saving it as .cob, changing .pof scaling factor in PCS2 settings and then import it back.
There were a lot problems with this route though (I ran into one myself).
BTW, where can I get the latest stable PCS2 Collada build?
Title: Re: Rescaling Ships
Post by: Angelus on July 23, 2009, 05:02:49 pm
Hm, check chief1983 signature, also Spicious signature.

EDIT: meh, forgot the Wiki...
Title: Re: Rescaling Ships
Post by: FUBAR-BDHR on July 23, 2009, 05:06:56 pm
The save as .cob method works quite nicely with some things.  Highly detailed models with smoothing tend to loose the smoothing though.  It's a quick one to try.  Method I found works best:

Open model with PCS2.03 (I use the one with collada support available in Chief's sig)
Set the cob scaling factor to 1 under preferences.  
Save model as .cob
Set the cob scaling factor to whatever you would multiply the ship by to get the size.
Exit PCS2
Open the .cob with PCS2
Adjust the header info to the right lod and debris info
Check for subobjects that may have strayed and move them back into their proper place.
Do a global import from the original .pof.
Save with new name just to be sure
Open the new one and the original and do a quick compare of the 2.  (One thing to look at are turret firing angles and rotations)
Calculate the MOI (can be done earlier but sometimes the mass changes).
Title: Re: Rescaling Ships
Post by: Sushi on July 23, 2009, 05:16:31 pm
So... not simple. :sigh:
Title: Re: Rescaling Ships
Post by: Getter Robo G on July 23, 2009, 10:14:05 pm
It is pretty simple, I can do it in 5 mins with pcs1/mv and or 3dexploration (my preferred method as I don't liek screwign with my settings for conversion.)

It's just a matter of havign PCS2 and taking a few minutes to find the scaling function, open the pof save as cob and reimport it with the new scale.

Wash, rinse, and repeat till it's the size you want.
Title: Re: Rescaling Ships
Post by: Droid803 on July 23, 2009, 10:38:09 pm
Yeah, then all you'll have to fix the errors that crop up because of that process :P
Title: Re: Rescaling Ships
Post by: Sushi on July 28, 2009, 10:38:48 am
Yep. It's dealing with the errors that crop up which has me worried.

At this point, I'm seriously thinking that it might be easier to implement a ships.tbl flag to rescale ships. Especially since I want to rescale pretty much every ship in the game...
Title: Re: Rescaling Ships
Post by: Rodo on July 28, 2009, 10:55:39 am
yeah the fov helped my perseption a little bit but I still think fighters are too big compared with cap ships.
If you are going for this I might be able to help you in the future.
Title: Re: Rescaling Ships
Post by: Sushi on July 28, 2009, 11:06:05 am
Capships would be (probably) be scaled down too. :D

The idea is to make everything faster in a way that doesn't break AI (and many, many other things) like the current Velocity Mod does.

Think about it: if all ships are half as big, everything will seem to move twice as fast. Speeds and distances don't change, but everything feels faster.

All part of my master plan for Sushi's Secret Mod Project. Why is it secret? So nobody can get on my case if/when it never happens. :D
Title: Re: Rescaling Ships
Post by: FUBAR-BDHR on July 28, 2009, 10:40:26 pm
Well if you are going to go to put effort into doing the scaling in game then why not apply it to other things as well as ships?  Missiles for instance.  Asteroids would be another good one.  If you made it FREDable then you could have one asteroid model be used for many things simply by changing the size. 
Title: Re: Rescaling Ships
Post by: Sushi on July 28, 2009, 10:57:48 pm
Yeah, missiles & asteroids would need to be scalable too. And scalable asteroids would definitely be widely useful...
Title: Re: Rescaling Ships
Post by: FUBAR-BDHR on July 28, 2009, 11:01:12 pm
Not only that but it could probably be quite useful for that talk in the SCP forum about a pof for turrets.