Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Cheetah3D JAS scale is still Broken

Discussion in 'Asset Importing & Exporting' started by awiebe, Feb 7, 2022.

  1. awiebe

    awiebe

    Joined:
    Oct 16, 2018
    Posts:
    14
    The mesh scale difference between
    Cheetah JAS -> FBX is 0.01, and
    FBX -> Cheetah JAS is 100

    When exporting using the "File > Export" the scale of the resulting FBX is correct

    When directly importing a .jas into unity the object is 100x as large as it should be.

    When using "File>Save As..." FBX from cheetah, the scale value is also incorrect, apparently ignored, and the exported object is 100x as large as it should be.

    I'm wondering if these are somehow related.

    I don't know if this behaviour is intended but it is breaking Unity's importing of .jas.

    Could someone at Unity3D please either fix the importing logic to use the Export, or contact Cheetah3D's developer Martain Wengenmayer(martin@cheetah3d.de), and get it resolved.

    Known affected versions
    - Cheetah3D 6.3.2
    - Cheetah3D 6.3.4

    - Unity 2017 onwards

    https://forum.unity.com/threads/bug-or-no-bug-utterly-confusing.11524/#post-81793
    https://forum.unity.com/threads/fbx-import-make-default-scaling-to-0-01-an-option.64047/

    Bug Report: 26829

    Workaround (Install in your "/Editor" folder
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEditor;
    3. using System;
    4.  
    5. //Sets our settings for all new Models and Textures upon first import
    6. public class CustomImportSettings : AssetPostprocessor
    7. {
    8.     public const float importScale = 1.0f;
    9.  
    10.     void OnPreprocessModel()
    11.     {
    12.         ModelImporter importer = assetImporter as ModelImporter;
    13.  
    14.         importer.globalScale = importScale;
    15.         if (assetPath.EndsWith(".jas"))
    16.         {
    17.             importer.globalScale = 0.01f;
    18.         }
    19.  
    20.     }
    21. }
    22.  
     

    Attached Files:

    Last edited: Feb 7, 2022
  2. awiebe

    awiebe

    Joined:
    Oct 16, 2018
    Posts:
    14
    Another solution seems to be changing cheetah's export scale to scale to 1x instead of exporting to 100x, but wouldn't that break exporting FBX for other DCC? It seems like a regression in Unity, where someone was pocking around scale factor, and broke the cheetah specific scale, or maybe Cheetah's behaviour changed.