Code Monkey home page Code Monkey logo

usd-sketchup's Issues

Y-Up support

SketchUp is natively Z-up, and USD allows one to encode a scene either Y-Up (like, say Maya) or Z-Up (like SketchUp).

The way USD works is that only the orientation of the top level layer counts, so if one has an all Y-Up pipeline but wants to get some USD assets in from SketchUp, it would be useful if there was a toggle to allow the asset that gets generated to be Y-Up.

It's not clear what the right way to do this is, though. We could rotate the scene -90 in X and then tag it Y-Up, we could transform all the points, etc.

materials and display color don't play nice

Given a mesh that is broken up into multiple faces.

If you put solid colors as materials on all the faces, it gets exported correctly as display color.

If you have a textured material on any of the faces, the faces that have solid colors on them have undefined behavior - sometimes they have a colored variant of the texture materials, sometimes, they have no color at all.

I think the correct answer is to just stop using displayColor/Opacity and make materials for colored faces instead, but need to do some more research...

MaterialColorBug.zip

unsupported path names

using this SketchUp model from 3Dwarehouse

clock

seems to display ok in xcode beta6, but crashes in IOS12 beta 12

clock

Does not have any errors when exporting to usdz from SketchUp. However, if I export as usda from SketchUp and use the xcrun usdz_converter to convert to usdz, I get the following complaint about path names.

iMac:COLLADA2GLTF ashleyjoyce$ xcrun usdz_converter clock.usda clock.usdz
usd_converter converting file: clock.usda
converted usdz file: clock.usdz
Coding Error: in _ValidateEditPrim at line 1157 of /Library/Caches/com.apple.xbs/Sources/ModelKit/ModelKit-1.94.23/ModelKit/extern/usd/pxr/usd/usd/stage.cpp -- Cannot create property spec at path </__Master_2/Materials/Material/Texture>; authoring to an instancing master is not allowed.
Runtime Error: in _SetValueImpl at line 1494 of /Library/Caches/com.apple.xbs/Sources/ModelKit/ModelKit-1.94.23/ModelKit/extern/usd/pxr/usd/usd/stage.cpp -- Cannot set attribute value.  Failed to create attribute spec </__Master_2/Materials/Material/Texture.inputs:file> in layer @/opt/COLLADA2GLTF/clock_$$usd_converter$$_.usdc@

optimize single GeomSubset

Because USD's Hydra's StreamGL renderer does not currently support GeomSubset, you can trivially exported textured geometry from this exporter that current usdview w/Hydra doesn't render correctly (i.e. no texture). In many cases, there are single faces (with two sides) that are using GeomSubset, but it's really not a subset, it's the whole thing.

In that case, we should omit doing the material as a subset and just apply the material to the whole mesh.

There should be a way to map "real" materials to the simple materials in SketchUp

Upon export, it would be great if the exporter allowed a mapping of the simple material (i.e. just a texture map) that SketchUp has to some more complex material that was leveraging all the parameters of the UsdPreviewShader.

There are several ways this could be accomplished:

  • export the names of all the materials in the .skp file, and then import a mapping of those to values, perhaps encoded as a .json file.

Have a UI that presented the texture images on one side and a palette of discovered materials on the other side. Using drag and drop you could map one to the other.

Probably makes sense to start off with some .json based scheme and then perhaps do a UI later.

The big issue is what is that representation of rich materials look like? Is there any effort to generate these? Is this something Substance Designer could help with?

Options panel should correctly show what can/can't be picked

For some choices of export, some options don't make sense. For example, if "Export as ARKit Compatible" is checked, then "Export to a Single File" should be checked and it should be greyed out, as it can't be unchecked.

Also, if there are no cameras (i.e. "Scenes" in SketchUp) the Aspect Ratio should be greyed out as should "Export Cameras"

some materials are not found

For some sketchup models, I'm currently not finding the texture material. This seems related to if the model is a component. Here are two files, one of which is a component, and we don't find the texture, but if we make the model not a component, we do find the texture.

FloorTile_NoComponent.zip
FloorTile.zip

Plug-In should remember checkboxes between launches

We should save all the various export flags we can check or set on the exporter between launches of SketchUp.

On the Mac, the standard practice is to use the defaults mechanism, but maybe we can write out a .usd-sketchup file or some such in the user's home directory...

Regardless, we should save the aspect ratio and boolean state of all the flags.

summary display at export should be more useful

For complexity tracking purposes, it should also show:

  • how many materials were exported
  • how many geom subsets were created
  • how long it took

There may be other useful pieces of info as well.

should replace all calls to SU_CALL

with a more helpful macro including specific error msg. If we throw an exception in the importer, we should make sure to tell what went wrong. Ideally, this would be a user facing result with an alert.

there should be a command line app

Given this plug-in, it should be straightforward to build a simple command line app that takes a .skp file and generates a .usd[|a|z] file.

No UI for toggling ARKit 2 compatibility

A .usdz file can have have arbitrary collection of USD files in it, but in order to currently be compatible with Apple's ARKit 2, we make a single binary USD file that specifically has a ".usdc" extension.

Internally, we have a flag that allows toggling this strict compatibility, which then uses a different code path.

Currently there is no user facing UI to allow this to be toggled.

Plugin isn't loaded in SketchUp 2019

Finally tried the plug-in with SketchUp 2019 (using the same plug-in that loads fine in 2018).

I get the error:

Cannot find plugin in /Applications/SketchUp 2019/SketchUp.app/Contents/PlugIns/USDExporter.plugin

Not sure where that error message is coming from. I'm not sure what changed for plugins for SketchUp 2019 from 2018.

USDZ plugin for Apple Silicon

Would be great if plugin would be compiled for Apple Silicon. It doesn't work on Sketchup 2022 which is AS compatible, until you switch it back to x86 Rosetta mode.

Materials should be in their own layer

In order to correctly represent face color from SketchUp in USD, I really need to make a Material to do this. Best practice seems to indicate that I should have a shader graph at the top of the scene that can serve as a fallback to map displayColor to the color3f inputs:diffuseColor and float inputs:opacity to displayOpacity.

For debugging, and just general clarity, I should write these to their own layer.

USDZ line entities not visible in AR Quicklook

After exporting various types of entities from SketchUp found that line entities are not visible in AR Quicklook for usdz, whereas for usd and usda line entities are visible in AR Quicklook.
Screenshot 2020-11-18 at 11 35 55 PM
Screenshot 2020-11-18 at 11 35 38 PM
Screenshot 2020-11-18 at 11 34 53 PM

texture export can sometime report the wrong file extension

When exporting this file, we see that it writes out a PNG into the Textures directory "B23A2.png", but in the USDA file we're writing out a reference to the texture, we're writing out "B23A2.BMP". I assume that's because it was originally a BMP file, but SketchUp has decided to change it to PNG (which is great, since USD doesn't generally support BMP), but wherever we're reading the texture name we need to make sure it's mapping to the file on disk.

FloorTile_NoComponent.zip
Archive.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.