How do I get correct scaling for sketchup in UE4?

Hi UE4 community and EPIC team,

As an architect I use sketchup for my everyday work designing homes etc.

I design all my buildings in millimeters as that’s the units for construction, I have two question that I hope people can help me with.

First, I know that 1uu = 1cm in UE4 so it should be straight forward conversion from sketchups models being in millimeters to UE4 correct 1uu scaling but I’m having a hard time match these up as I’d need to scale done the X, Y, Z all together to have the correct size in UE4.

Could someone please give me a direct answer into scaling this properly as I think I’m missing something here.

Secondly, which follows from the first question, once my static mesh is at UE4’s correct unit size that should mean that UE4’s default materials should apply and look in proportion to the relative size of the mesh?

Thank you to whoever can help out.

Hi Anthony -

Edit: This is a somewhat lengthy answer so please read through the comments as well.

Your first question is technically a Sketch Up issue on export and not an import issue in the engine, but there is in fact a solution. When you export your models as an FBX from SketchUp, click Options and then under Scale >> Units select centimeters. The model should import at the correct size now.

As for your second question, this is an issue of UV layouts and unwrapping which is something that an architectural modeling program like SketchUp or even AutoCAD do not support. The models generated in those programs are primarily for in program rendering where the vertex positions can be used directly to layout a material within the engine’s own algorithm. Put simple those programs can apply materials to objects based on an assignment method that is unique to those programs themselves and do not need to be duplicated or have a shared language of communicating model material placement at the vertex to pixel level. Programs like Max, Maya and Blender use the common method of UV Unwrapping to communicate where a model has a material applied by the UV system which equates a vertex position directly to a pixel position. This is how our engine applies materials (shaders) across a 3D model by looking at that map and then assigning the pixels to a vertex position.

As you can see in this image of the above imported box, the black square is the pixel space for materials, referred to as the 0,1 (read as zero to one) space. The red lines you see is the SketchUp “unwrap” that Sketchup uses to assign materials, but as you can see this layout goes well outside of the bounds of the 0,1 space. This is ultimately why the world material in UE4 looks so compressed as opposed to other models. The pixel in the 0,1 space are repeated both vertically and horizontally until all vertexes have been assigned information. It just so happens that the default world material in UE4 is also tileable, but use any material that is not tileable and you will see the repeated pattern over and over in both directions.

I know this is a frustrating answer, but the UV layout is a fundamental part of 3d modeling and something that out engine uses to optimize graphics and create some of the more spectacular effects. Without using a modeling program that allows UV layouts to be assigned to models this will allows be a problem for you importing from Sketchup directly.

There may be a Sketch Up solution to this problem, but you will need to check their forums and website to see what that solution might be.

Thank You

Ketchum

Hi Eric,

Thank you for those detail answers, I know that the UV was going to be a problem but I had found a work-around for that by applying default materials to my model while in sketchup then after importing it into UE4 those individual materials on those surfaces can now be seen and changed into UE4’s shaders.

This is where my second issue now arises, after following your great advice for exporting my sketchup models in centimeters and then importing it in I have an issue with UE4’s material shaders not scaling correctly to my FBX import (please see attached image) both have the same material applied, one is on a static mesh and the other is UE4’s geometry mesh.

If there was a correct way my sketchup model scale could be so that when I import it in, UE4’s shader scale would work correctly.

Anthony -

You can set a Material scale in Sketchup that can be altered in such a way that when imported into the engine the resultant created Material is scaled to match Geometry Brush UVs of 1 to 1. Here is the Material settings in Sketchup and the resultant mesh next to a geometry brush in the engine. Again for reference this is my 2000mm x 2000mm cube exported in centimeters next to a 200cmx200cm Geometry mesh in UE4.

I am pretty sure that depending on the material, the scale I show of exactly one half the model’s actual size will work, BUT and I cannot stress this enough, you probably will have to play with this setting and the Geometry UV scaling on a more complex material. For Simple tiling textures like Brick and Stucco walls etc. this should get your problem solved though.

Thank You

Ketchum

That’s an excellent work around for the materials Eric, that does help with getting the correct size materials aligning with UE4’s Geometry.

So in that case there is no way I can import my static mesh as a blank cubic with no materials on it and have it scaled to match UE4’s geometry?

(please see attached)

The static mesh is 1000mm x 1000mm exported to centimeters (right) and the geometry mesh is 100cm x 100cm (left)

Anthony -

Actually You don’t need to set the material to import at all. You just have to assign the material in SketchUp with the correct 1/2 offset that I mention above. And, it does not need to be a material from Unreal, it can be any default material from SKetchUp as long as it gives you the option to adjust the Vertical and Horizontal Tiling of the texture. Export as described above and when you import it do not import materials. The default world material will be applied and the object will be scaled correctly. This is the only way to get proper scaled materials from SketchUp for the reasons that I mention above about UV Unwrapping.

Here is the SketchUp 2000x2000 model box:

Here is the Import Asset without Importing Material and with the Default World Material next to it Geomtery Counterpart.

Thank You

Ketchum

Hi Eric,

This is a great work around to get our sketchup models to match correctly with UE4’s standards.

The steps so far are:

  1. Make the sketchup model a component
  2. Add any texture to a specific face and make it 1000mm x 1000mm
  3. Export the model as an .fbx but not the matierals added to that model
  4. Import it into UE4 and now it’s possible to add UE4’s materials to the static mesh with correct scaling.

I’ve been trying different steps to label the textures from within sketchup so that they are easier to distinguish which face each assigned texture is on in UE4 (please see attachment) instead of UE4 auto labelling each texture ‘Element 0’ ‘Element 1’ etc.

If there is a way, this would be great for a model with more textures on their surfaces.

your help is outstanding, thank you

Just one more question left to investigate.

Hi Anthony -

Unfortunately I do not have good news for you here with this question. There is no way to rename the Element 0, Element 1. However, if you open your static mesh in the Static Mesh Editor window (Double Click your mesh in the Content Browser) You can Highlight the polygons which use that particular element and then assign your material in this window. After assigning, when you drag that mesh into the world from the content browser, it will already have the materials applied.

One clarification about what you posted above as well. To correctly align the materials from Sketchup to UE4, you will want to set the values not necessarily to 1000mmx1000mm but 1/2 the size of your model by 1/2 the size of your model. So for instance if you drew a 4000mm x 4000mm then the material in Sketchup would be set to 2000mm x 2000mm

I wanted to make sure that was clear

Good Luck, let us see some of your work when its all done, we would love to see how it comes out

Ketchum

Thanks a lot for those explanations

hello, maybe u should try exporting your sketchup project as datasmith file and import it to unreal engine. There are videos about it

Hello. I just read thought all this thread very interesting. Espcially the SKU > UE size
subject.
I am a 55+ beginner in UE5.03 Trying to get away from paying licenses SKU 19 towards Open Source.
I have had big problems, mentioned in other posts here, with Datasmith NOT working so I and trying to export “city indoor play ground” actors as FBX.
But many of my planes and faces still not show up.
As I am in an early stage of my concept project (to learn UE) I have.
TWO questions:
Would you recommend to export SKU19 actors without any SKU materials and then only add materials in UE?
Can it be possible that SKU faces that don’t have a double volume might affect the showing in UE as a FBX import
Meaning would I remove all the colours and materials for this stair case for example?


Or do I need to go back and make sure that all my faces have a thickness?
Thank you so much