Leo Wang

Part showing correct scale in the menu but becomes 100 times larger in the editor

Recommended Posts

I created a part that is supposed to be about 35cm wide, and the parts menu in the VAB shows the scale correctly. However, when I put the part into the editor, it becomes 35m wide (The values of the dimensions are the same but the units changed from cm to m). The problem is probably with the animation because the scale was correct before I added a module in the .cfg file that uses the animation, but I don't know what is wrong with it since the animation worked without problem in blender and unity. The animation involves both rotation and scaling of several objects (a deployable solar array and antennas that extend).

k5Igl2u.png

 

Share this post


Link to post
Share on other sites
5 hours ago, Leo Wang said:

The animation involves both rotation and scaling of several objects (a deployable solar array and antennas that extend).

Open the animation in the unity animation editor, and check all of the 'scale' values.  Also, make sure that the starting scale value matches the 'scale' that is applied to the transform in your model.

Better yet -- make sure your base model is at 'scale = 1,1,1' all the way throughout its hierarchy, and make sure your animation scales match that at the start and end...

(TLDR:  You are more than likely correct in that the issue has to deal with animations and scales)

Share this post


Link to post
Share on other sites
7 hours ago, Shadowmage said:

Open the animation in the unity animation editor, and check all of the 'scale' values.  Also, make sure that the starting scale value matches the 'scale' that is applied to the transform in your model.

Better yet -- make sure your base model is at 'scale = 1,1,1' all the way throughout its hierarchy, and make sure your animation scales match that at the start and end...

(TLDR:  You are more than likely correct in that the issue has to deal with animations and scales)

But how do I ensure that the scale is both 1,1,1 at the start and the end for an antenna object that extends?

Share this post


Link to post
Share on other sites

Could you post a screenshot of the part dimensions and scaling from both Blender and Unity?

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, sumghai said:

Could you post a screenshot of the part dimensions and scaling from both Blender and Unity?

Here are the screenshots. Sorry for the messed up order because it's very difficult to rearrange them with imgur's low resolution preview.

https://imgur.com/a/xhoJRvn

Share this post


Link to post
Share on other sites
On ‎10‎/‎3‎/‎2018 at 11:27 PM, Leo Wang said:

Here are the screenshots. Sorry for the messed up order because it's very difficult to rearrange them with imgur's low resolution preview.

https://imgur.com/a/xhoJRvn

Could you post your cfg ? 

Share this post


Link to post
Share on other sites
On 10/9/2018 at 4:07 AM, Mecripp said:

Could you post your cfg ? 

Here's the cfg file. I copied it from that of the stock Gigantor solar array and made some changes.

PART
{
    name = WPT_Panel
    module = Part
    author = Leo Wang
    MODEL
    {
        model = Tanabata/Parts/Electrical/WPT_Panel/WPT_Panel
        scale = 0.01,0.01,0.01
        texture = WPT_Panel_texture, Tanabata/Parts/Electrical/WPT_Panel/WPT_Panel_texture
    }
    rescaleFactor = 1
    node_attach = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0
    TechRequired = largeElectrics
    entryCost = 14500
    cost = 3000
    category = Electrical
    subcategory = 0
    title = WPT Panel
    manufacturer = SEDS Japan 
    description = Deployable panels for the Tanabata satellites. Include WPT antennas on one side and solar cells on the other.
    attachRules = 0,1,0,0,1
    mass = 0.3
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 1
    crashTolerance = 8
    maxTemp = 1200 // = 3200
    bulkheadProfiles = srf
    thermalMassModifier = 2.0
    emissiveConstant = 0.95
    heatConductivity = 0.04 // 1/3 the default
    tags = #autoLOC_500381 //#autoLOC_500381 = charge deploy e/c elect energ extend fold generat (light panel photo power retract sun track unfold volt watt

    MODULE
    {
        name = ModuleDeployableSolarPanel
        isTracking = False
        secondaryTransformName = suncatcher
        pivotName = suncatcher
        resourceName = ElectricCharge
        chargeRate = 24.4
        animationName = Deploy panels
        extendActionName = Deploy <<1>>
        retractActionName = Retract <<1>>
        extendpanelsActionName = Toggle <<1>>
    }
    
}
 

Share this post


Link to post
Share on other sites

You are making the part bigger by your cfg if you want to make it smaller try something like this ?

PART
{
    name = WPT_Panel
    module = Part
    author = Leo Wang
    MODEL
    {
        model = Tanabata/Parts/Electrical/WPT_Panel/WPT_Panel
        scale = 1.0,1.0,1.0            // changed  <-------
        texture = WPT_Panel_texture, Tanabata/Parts/Electrical/WPT_Panel/WPT_Panel_texture
    }
    scale = 1.0          // added <------ may need scale = 1, 1, 1
    rescaleFactor = 0.5   // changed  <--------------
    node_attach = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0
    TechRequired = largeElectrics
    entryCost = 14500
    cost = 3000
    category = Electrical
    subcategory = 0
    title = WPT Panel
    manufacturer = SEDS Japan 
    description = Deployable panels for the Tanabata satellites. Include WPT antennas on one side and solar cells on the other.
    attachRules = 0,1,0,0,1
    mass = 0.3
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 1
    crashTolerance = 8
    maxTemp = 1200 // = 3200
    bulkheadProfiles = srf
    thermalMassModifier = 2.0
    emissiveConstant = 0.95
    heatConductivity = 0.04 // 1/3 the default
    tags = #autoLOC_500381 //#autoLOC_500381 = charge deploy e/c elect energ extend fold generat (light panel photo power retract sun track unfold volt watt 
    MODULE
    {
        name = ModuleDeployableSolarPanel
        isTracking = False
        secondaryTransformName = suncatcher
        pivotName = suncatcher
        resourceName = ElectricCharge
        chargeRate = 24.4
        animationName = Deploy panels
        extendActionName = Deploy <<1>>
        retractActionName = Retract <<1>>
        extendpanelsActionName = Toggle <<1>>
    }
    
}

In your cfg you are telling it the model scale is 0.01 then you are rescale = 1  that is making the part bigger

EDIT- I take that back you might check to see what your part is scaled at in ksp with out you rescaling it first

Edited by Mecripp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now