Announcement

Collapse
No announcement yet.

Datasmith Sketchup scale bug

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Datasmith Sketchup scale bug

    I have noticed that my sketchup models is too small once imported via the Datasmith plugin
    now I have confirmed there is a scaling issue.

    Using sketchup pro 2018,
    Datasmith 4.20 E0
    Unreal engine 4.20.2

    In sketchup I made a cube 100cm x 100cm x100cm
    I have sketchup's mesure units set in cm.

    then I export it as Datasmith, and import to unreal.
    now in unreal content browser if I hover my mouse over it then the size show "Aprox 39 x 39 x 39"
    http://prntscr.com/kv5uvn
    so i then loaded the model into the world and selected it, then I went and "export selected" exported as OBJ file.
    I imported the OBJ into sketchup, taking care to set OBJ units to cm
    the imported OBJ was then a cube in sketchup, size ~39x39x39 cm

    i increased the accuracy of the mesurements shown and got the exact size of the cube.
    the exact size is:
    39.3701cm x 39.3701cm x 39.3701cm

    so to calculate how much the scale is off, i did:
    100 / 39.3701
    =2.539998628400741

    then i made a new 100x100x100 cube in sketchup, made it a component, opened component selected all and scaled it by 2.539998628400741
    i then exported that again to datasmith.
    then imported file to unreal,
    the original cube again 39x39x39
    the scaled cube now 100x100x100.

    so the exact cause of this bug is unknown, but I have confirmed the exact scale difference, and I am able to re-create the results.
    I will attach my sketchup and datasmith files that I used in this test.


    while we wait for this bug to be fixed, do this temporary workaround to manually fix the scale.
    after your model is made, scale it by x2.539998628400741
    note if you have parts of the model in groups or components you would have to open that group or component and scale the stuff in the group or component itself, as scaling a group or component without opening it will not scale it and it will be exported in the original size.
    be sure to save your SKP file under different name once its scaled as to avoid overriding your work.


    Attached Files

    #2
    The actors in the level will be at the right size. Scaling is not done when baking out the vertices, its applied in the chain of actors / components.
    Pierre-Felix Breton

    Sr Technical Product Designer AEC, Unreal Engine
    Epic Games - LinkedIn

    Comment


      #3
      Originally posted by pf_breton View Post
      The actors in the level will be at the right size. Scaling is not done when baking out the vertices, its applied in the chain of actors / components.
      well a 100cm cube should end up as a 100 unit cube in unreal, but its not, I have other workflows that save SKP to OBJ and then in blender to FBX, and that result in a 100 unit cube in unreal, so it is the process of SKP > Datasmith where something is going wrong.

      Comment


        #4
        I have been looking at this again and then it just hit me,

        the scale that is off by is x2.539998628400741
        1 inch = 2.54cm
        so it could be that datasmith thinks you using inch and want 1 inch to represent 1 unit in game. that would explain the scaling.
        resize your model as 1cm = 1 inch to work around this for now, once the bug is fixed you can go back and scale 1 inch = 1cm if you need to re-use the same skp file again

        Comment


          #5
          CorneliusAveling , Report Unreal Studio bugs here: https://unrealstudiohelp.epicgames.c...I-report-a-bug
          Sr. Product Manager
          Epic Games

          Comment


            #6
            Originally posted by kenpimentel View Post
            thanks.
            I have reported it already
            https://issues.unrealengine.com/issue/UE-64410

            Comment


              #7
              It appears to be a issue with twice the effect - Sketchup objects are coming in at 39% their intended scale but also showing a scale multiplier of 2.54 so materials are tiling extremely small.

              Also, if you scale a group up by x2.54 in Sketchup, upon Datasmith import Unreal reads the scale multipler as 6.4516 (2.54 * 2.54) - this seems like a secondary bug.

              If you scale by x2.54 in Sketchup, then explode and regroup - the objects import into Unreal with only the 2.54 multiplier, if you change the multiplier to 1, everything is normal.

              Looking at the issue tracker it looks like this is scheduled to be fixed in 4.21

              Comment


                #8
                Originally posted by jdaksiewicz View Post
                It appears to be a issue with twice the effect - Sketchup objects are coming in at 39% their intended scale but also showing a scale multiplier of 2.54 so materials are tiling extremely small.

                Also, if you scale a group up by x2.54 in Sketchup, upon Datasmith import Unreal reads the scale multipler as 6.4516 (2.54 * 2.54) - this seems like a secondary bug.

                If you scale by x2.54 in Sketchup, then explode and regroup - the objects import into Unreal with only the 2.54 multiplier, if you change the multiplier to 1, everything is normal.

                Looking at the issue tracker it looks like this is scheduled to be fixed in 4.21

                I also found that scaling groups cause odd reactions.
                the current workaround I use is to model everything in inches as cm, so if a Door is supposed to be 210 cm high then i make it 210 inches, but set model units back to CM before export. when imported to UE4 the bug brings it back to 210 units (cm)
                its not ideal, but it works.

                I see on the tracker they pushed it over to 4.22, so ts not going to be fixed soon. i was actually waiting for the fix before pushing out a lot of work, but I will have to work with the workaround for now

                Comment


                  #9
                  I can confirm that this is also effecting version 4.21
                  it is still scheduled to be fixed in 4.22

                  Comment


                    #10
                    I just tried to with Unreal Engine 4.22.1 and I have also everything smaller by factor 2,54 (cm vs inches issue?)
                    So it looks that it still not fixed or I'm doing something bad.

                    Comment


                      #11
                      This issue was fixed with a recent update of data smith exported plugin for SketchUp. Now I have no issue with that.

                      Comment

                      Working...
                      X