Unity import script

Anything you want to share!
ZapWizard
Posts: 9
Joined: Wed Nov 16, 2011 4:44 pm

Re: Unity import script

Post by ZapWizard » Tue Jan 10, 2012 10:04 pm

I have an issue with the import script (Or lightup export)

It seems that if I have items with solid colors (no texture) inside of SketchUp, all the colors end up being marked as the same "White" defuse color inside of Unity.
Also the light map isn't importing when this happens. If I export lighting only I do get a lightmapped clay model.

I had no issues with the script on a previous project which has far more texture and solid colors.
This is a project for a client I would appreciate a quick response.

User avatar
AdamB
Site Admin
Posts: 2294
Joined: Wed Apr 16, 2008 10:11 am
Location: Brighton, UK
Contact:

Re: Unity import script

Post by AdamB » Wed Jan 11, 2012 8:08 pm

If you look at the Autodesk FBX file produced by LightUp, you'll see that the materials do have the diffuse color set to whatever you set them (search for Property: "DiffuseColor")

However, for some reason, the Unity importer just assigns white.

Adam
Developer of LightUp http://www.light-up.co.uk

ZapWizard
Posts: 9
Joined: Wed Nov 16, 2011 4:44 pm

Re: Unity import script

Post by ZapWizard » Thu Jan 12, 2012 12:02 am

I figured out my mistake, I had the script in \editor instead of \assets\editor. The colors import with the lightmaps intact.

shelshok
Posts: 8
Joined: Thu Feb 14, 2013 3:22 pm

Re: Unity import script

Post by shelshok » Wed Feb 20, 2013 3:54 pm

I've got the script working for the initial import, but when i close and reopen my scene it seems to reimport my model, and then it comes in without the LightUp materials (see attached).

Edit: It seems I'm getting a bunch of error like this one:

Code: Select all

Assets/Bak/tree_3d_green_94__leaves_many_green.mat is missing its meta data file. Reimporting asset.
Attachments
Screen Shot 2013-02-20 at 10.52.01 AM.jpg
Screen Shot 2013-02-20 at 10.52.01 AM.jpg (119.26 KiB) Viewed 16621 times

shelshok
Posts: 8
Joined: Thu Feb 14, 2013 3:22 pm

Re: Unity import script

Post by shelshok » Wed Feb 20, 2013 11:59 pm

OK, that doesn't seem to be happening anymore, but I am now having another problem where everything appears transparent and z-sorted incorrectly.

Sometimes.

Here's a screenshot where I exported two sketchup scenes (the house and the colored boxes). The house imports weird, and the boxes import fine. Examining them, I see that the house is using the Lightup lightmapped shader, and the boxes are using the legacy lightmapped shader.

They were exported and imported one after the other.

Why would this be happening?
Attachments
boxes.jpg
boxes.jpg (151.22 KiB) Viewed 16619 times

bill_c3
Posts: 15
Joined: Sat Aug 04, 2012 5:28 pm

Re: Unity import script, custom shader?

Post by bill_c3 » Thu May 07, 2015 1:35 pm

Hi Adam,

Sorry for resurrecting an old thread, but seems the most logical place...

Given the age of this script, is it still appropriate to use in the workflow pipeline for current Sketchup 2015/LightUp 4/Unity 4 (or 5) versions?

It looks like you've included a custom shader in your script (I think)... Unity has improved many of the shaders since you originally worked on this. Is it still appropriate to use your custom shader? Or, is there a better native option in Unity?

Thanks in advance!

Cheers,
Bill

marchab
Posts: 172
Joined: Wed May 14, 2008 4:07 pm
Location: Montreal area, Quebec, Canada
Contact:

Re: Unity import script

Post by marchab » Tue Sep 08, 2015 5:01 pm

I also would like to know if this script is still appropriate to use nowadays.
Mario C, SketchUp & LightUp trainer, Mac & pc

Post Reply