• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Watch the video especially towards the end on how to export from Blender to get an idea on the export settings.
So far that's the method that I succeeded with (SU>Blender via OBJ>Asset Editor). The only things I did in Blender was UV mapping (which it seems we may have a native SU solution for) and exporting via FBX 7.4 Binary. It seems to be something about the way the model is prepared before export. If we can find this translation in Sketchup, I think we can go straight from SU to asstet editor after a quick FBX binary conversion.
 
Last edited:
Watch the video especially towards the end on how to export from Blender to get an idea on the export settings.

Managed to follow that video guide with SU export to collada> Import to Blender> Blender texture mapping> Blender export to .fbx> asset editor. I'm running an older version of Blender though (2.63 vs 2.73) without as many export options, but i guess the default ones should be similar to those on the video. The model appears in asset editor and I just need to re-orient it.
 
yeah sketchup creates an extra group called "Mesh" around your mesh which shouldn't be there i don't think there's a way around it though

autodesk fbx converter 2013.3
Ah - something happening behind the scenes. Hmm... Anyone know of a tool that let you visualize the hierarchy of FBX files? That would greatly help in trying to find a pure SketchUp workflow.

I tried SU > DAE > FBX (Using AutoDesk converter) but that also failed. I guess the DAE also end up with some extra hierarchy even though everything is exploded in SketchUp... Need to find a way to inspect that.

I also tried SimLabs FBX exporter for SketchUp, but that also failed to load - though I was unable to find any export settings as well.

I wonder ... if it would be possible to patch the ASCII FBX files to flatten the hierarchy... I could make a SketchUp extension that exported and patched it. Might try to tinker with that.


This is my SU -> Blender -> CS workflow. More or less.
Excellent! Thank you so much for the detailed steps. I'll try to replicate them. Then see if I can find a way to replicate in SketchUp.
 
autodesks fbx converter has an fbx explorer build in so you can view(edit) the hierarchy. also you can convert to all fbx versions.

http://docs.unity3d.com/Manual/HOWTO-exportFBX.html <- thats the official unity manual. though i wouldn't trust it. wasn't able to imports quads (it's actually really sad we may only use tris but nvm). also it says unity omits cameras and lights which CSL obviously doesn't.

I opened a SU fbx in a text editor and had a look at it. afaik SU creates an instance of the mesh and places it in the scene instead of the actual mesh. might be fixable. compare SU fbx to a working ascii one and you'll see.
 
Last edited:
I made some manual mods to the SketchUp exported FBX file - tried to remove the extra item in the hierarchy:

2me1nc7.png


takbyb.png


Now - when I hit Continue I didn't see the model in the Asset Editor. But I think that is due to my axes being messed up etc.
But it appear that the first obstacle is identified - and it should be addressable. I can write a script that exports from SU using it's FBX exporter, then open the FBX file and patch it to remove the unwanted node. :D
 
Code:
   Model: 140441444179968, "Model::Model", "Null" {
        Version: 232
        Properties70:  {
            P: "ScalingMax", "Vector3D", "Vector", "",0,0,0
        }
        Shading: Y
        Culling: "CullingOff"
    }
    Model: 140441471298048, "Model::Mesh1", "Mesh" {
        Version: 232
        Properties70:  {
            P: "ScalingMax", "Vector3D", "Vector", "",0,0,0
            P: "DefaultAttributeIndex", "int", "Integer", "",0
        }
        Shading: T
        Culling: "CullingOff"
    }

maybe add the mesh properties to the model?
 
Right'o! I made some more progress:

These export settings:
2zhkx1d.png


Notice that I have the export set to Centimeter - not meters. I realized that if I exported in meters the model would become 100 times smaller. I guess this deviate from the Wiki guide based on how the exporters process units and how the different applications deal with system vs model units.

After exporting I had to manually hack the FBX file. (I'll make an automated script for this.)

I had placed the model at the corner of my model axes:
jgl0g6.png


I had to check Bottom Center Pivot in the asset import - so I guess ideally the models should be centred around the origin?

Anyway - I clicked Continue and boom!

ezmoie.png


The next concern is that I got what seemed to be a crash upon exiting the game. Or at least I was offered to debug it. I need to investigate if my FBX hacking is messing up something or if it's my dev machine catching some general assert in the game. (Would be nice to try with another FBX test model.)

Next:
  • Make an export script for SketchUp
    • Verify the model is all exploded.
    • Verify there is just one material applied.
    • Export FBX
    • Extract the material and name it appropriately for the diffuse map.
    • Patch the FBX to remove unwanted node.
    • Bob's your uncle!
 
  • 1
  • 1
Reactions:
keep in mind your model has its own units. check your model info.
during export just use "model" instead of "meters", "cm" or what ever.
otherwise you're telling SU that you messed up and it should use your e.g. inch (set as modelunit) values but use the export measurement instead of inches.

It does not matter which measurement is set as modelunit. the fbx file doesn't even want to know about it.

so if you use e.g. meters as model unit you can choose between "model" and "meters" during export otherwise the mesh will be rescaled.

and yes create your building around the documents origin. you could even model the basement for non flat terrain by having the origin inside (not below) your building.
 
Last edited:
keep in mind your model has its own units. check your model info.
during export just use "model" instead of "meters", "cm" or what ever.
otherwise you're telling SU that you messed up and it should use your e.g. inch values but use the export scale instead of inches.
The internal unit of SketchUp is always inches - always. The raw data that is. The Model Info units are just for display in the UI.

When you change Model Info units then no 3d data is actually changed.
Say you have a SKP model with Model Info set to Meters and export that to FBX with Centimeter Units.
Then you make a copy of that SKP and set Model Info units to Millimeters and export that to FBX with Centimeter Units.
If you make a diff of the two file you'll se they are exactly the same.

That's because the Model Info units are irrelevant as long as you model in 1:1 world scale and set the Export units - which turns out needs to be Centimeters.

This is good because you can then model using your preferred unit of choice for the UI and export to the unit the game want independently.
 
  • 1
Reactions:
no the raw data are just raw values without any measurement just like in any other modeling program. have a look at you fbx file.
it's only the modeling program that does calculations between the different measurements.

if you have 10 inches this will always be 25,4cm. by setting the model unit you just say "I'm preferring to say 10 inches" or "I'm preferring to say 25,4cm"
by using "model" during export you make sure its scaled right. if you choose anything else but "model" (which chooses the model unit) or your model unit during export your fbx is messed because you are telling SU to scale it.

fbx don't have a measurement so CSL doesn't. its raw numbers.

do a test regarding the post above. at least i can model in cm, m etc. and its scaled right all the time.
 
Last edited:
no the raw data are just raw values without any measurement just like in any other modeling program.
The raw data in SketchUp always represent inches. Trust me - if you missed my introduction, I'm a software engineer at SketchUp. ;) I'm sitting the source code. (All though admittedly I don't know enough about our FBX exporter, but that's because it was outsourced and I never touch that code myself.)

Create a model with Model Units set to mm and create a 1000x1000mm face.

Select that face and open the Ruby Console and enter:
Sketchup.active_model.selection[0].vertices.each { |v| p v.position }

Result:
Point3d(0, 0, 0)
Point3d(0, 39.3701, 0)
Point3d(39.3701, 39.3701, 0)
Point3d(39.3701, 0, 0)

Now create a new model in meters and create a 1x1m face:

Result:
Point3d(0, 0, 0)
Point3d(0, 39.3701, 0)
Point3d(39.3701, 39.3701, 0)
Point3d(39.3701, 0, 0)

Exactly the same - because the raw 3d data in SketchUp is always inches. Every model. Unlike many other programs, SketchUp does't let you change the system units - only the user units.


just do a test regarding the post above.
I did - just to make sure the FBX exporter didn't do anything weird.
 
Just to illustrate - here is a model set up with meters:
4fuaol.png


Length is measured to 8m:
23l4bm.png


Inspect the raw 3d data vs the string formatting:
ampf07.png


Export with Model Units:
s1rh3n.png


Patcht the FBX file to remove node...

Import into game (...and see that it's 100 times too small...)
2hcm8w3.png



Had the exporter used the system units the scale difference here would not have been exactly 100.
 
I use a grid of squares for my SU model. ( 8x8 meters is 1 square in CS)
In Blender I export the fbx file with the scale set to 100.
I see - that sounds like similar to what I observe in SketchUp. If I export with meters the model needs to be scaled up 100 times.

Btw, any chance you can upload a 8x8m cube sample for me? Blender format and your FBX ASCII export? I'd like to compare the output.
 
I tried looking up info on Unity and units for FBX import, this seemed similar:
http://answers.unity3d.com/questions/45892/unity-unit-scale.html#answer-716813

But if CS applied that scaling on import, then everyone would need to scale the models upon export. And then the Meters guide in the Wiki doesn't make sense. Not entirely sure what is going on there.

But that's something to worry about later. I need to get the export script written. :)
 
hm I'm sorry. of course you're right regarding the export units. the handling sounds wired though.

i'll do some quick test with su and c4d



EDIT:
made a file using "meters" as model unit, exported it with different settings and reimported them in c4d:

8m in su.

model: 8 ( 8 * 1)
meters: 8 ( 8 * 1 )
cm : 800 ( 8 * 100 / 1 )
inches: 314.96 ( 8 * 100 / 2,54 )
feet: 26,247 ( 8 * 100 / 30,48 )


the best idea seems using cm if you don't want to scale ingame
 
Last edited:
Digging some more it looks like Unity default FBX import with a scaling factor or 0.01 because some applications apply a scaling factor of 100 on export...
http://forum.unity3d.com/threads/fbx-import-make-default-scaling-to-0-01-an-option.64047/
http://forum.unity3d.com/threads/why-is-fbximporter-scale-factor-0-01.47884/
http://answers.unity3d.com/questions/18000/why-does-unity-set-imported-meshanimation-scale-to.html

In effect this makes the import unit CM if the exporter exports 1:1. I guess the Meter guide for CS comes from a workflow where the exporter scales up by 100. This confusion seems to be common for Unity - there is a bunch of threads on the topic.
 
hm I'm sorry. of course your right regarding the export units. the handling sound wired though.

i'll do some quick test with su and c4d
No worries! I really appreciate your input and assistance. Today I finally managed to get some results as oppose to yesterday.

Though I still struggle with crash at existing the game after loading the FBX asset. If anyone can provide a simple 8mx8m cube FBX ASCII model I'd really appreciate it. I can then compare the model structure and layout.