Comments (20)
I can confirm that cameras are working great!
from usd-unity-sdk.
Ah, yes, they should be included in UsdGeom, but aren't currently.
Adding support for some specific schema should be mostly trivial (e.g. see Xform), but you will need to setup swig and a python-enabled USD build as noted in the "generating bindings" section of the readme.
To have your PR accepted, you will need to sign the contributor agreement.
But yes, contributions are very welcome!
from usd-unity-sdk.
Still a work in progress, but I've added bindings for UsdGeomCurves, BasisCurves and Camera in this change: 52fdc5e
from usd-unity-sdk.
Thanks! I had some trouble building from source (I didn't have the monolithic build of USD setup), so this is greatly appreciated. I hope I can work that out soon so I can contribute directly if anything comes up :)
from usd-unity-sdk.
W00t!
from usd-unity-sdk.
Ok, the majority of UsdGeom should now be wrapped (just pushed).
As for the high level serialization Sample classes, I can add one for Camera and BasisCurves (I'm assuming you want basis curves and not nurbs curves), but long term, I'd like to generate these from the schema definitions, which requires some investigation.
Let me know if there are specific sample classes that would be immediately helpful and I'll set them up!
from usd-unity-sdk.
Awesome! I think the camera sample class would be the most convenient one to have right now, but it's not super urgent since I'm fine with using the native API :)
from usd-unity-sdk.
Ok, I pushed a quick sketch of a camera class -- let me know what you think! Obviously I haven't used it in production yet, so keep an eye out for anything that seems off.
from usd-unity-sdk.
The unit test may also be helpful:
https://github.com/googlevr/usd-unity-sdk/blob/master/src/Tests/Cases/UsdGeomTests.cs#L17
from usd-unity-sdk.
Similar support for BasisCurves along with a quick unit test.
ProTip: when debugging curves in usdview, be sure to hit "CTRL+" to turn on tessellation so you can see the curve widths.
from usd-unity-sdk.
Thanks, that's looking great! I think geometry wise that's all I need for now.
Next thing I'm going to tackle is shading, do you have a link to a good resource on usdShade? All the information I could find was fairly vague and I couldn't even find a good sample file with a texture mapped model.
from usd-unity-sdk.
The basic idea is very similar to unity (though goes much deeper), you bind a primitive to a material and a material may have multiple engine targets and each engine can have a shader network specific to that engine. Parameters are surfaced on the material and connected directly to all the networks in which they apply.
I think I'll add an example in the asset package examples.
from usd-unity-sdk.
Here's a shader schema example:
https://github.com/googlevr/usd-unity-sdk/blob/master/src/Tests/Cases/UsdShadeTests.cs
The UsdShade schema requires UsdRelationships and connected UsdAttributes, so those are now supported as part of the high level API, though the exact implementation may change (any feedback on USD.NET.Relationship/Connectable is very welcome!).
Talking with folks at Pixar, it sounds like the docs for UsdShade are actively being written.
from usd-unity-sdk.
That was a quick turnaround!
The example already helps a lot and it's good to know that the docs are being improved. I'll do some testing later today and will let you know if I run into any issues with the API.
from usd-unity-sdk.
Cool!
from usd-unity-sdk.
I would hold off on diving into the shading stuff for a bit, I'm writing up an example in Unity and working out several kinks along the way.
from usd-unity-sdk.
Ok, I added a more complete "ImportMaterials" example here:
Which should look something like this:
https://youtu.be/7kWodREeJx4
It's using almost all the Standard PBS inputs, so it should be representative of real shader/material import problems.
I'm curious, will your shaders will be known in advance (e.g. how the example is setup with Unity.Standard) or do you intend to have a more extensible system, where you wont know the shader parameters a priori?
It seems dynamic shaders in Unity is generally difficult, so the assumption is that most users will have a well known set of shaders.
from usd-unity-sdk.
Ah, I guess one way that this example is cheating is that the textures have .meta files to configure them, which should be coming from the USD file.
This should just a matter of fleshing out the Texture2D class to drive the texture configuration.
from usd-unity-sdk.
The example looks great!
Yeah, I'm not sure if dynamic shader generation is possible at all in a standalone build.
The current plan is to use a single, flexible, Unity shader and adapt the USD material as well as possible (possibly allowing users to adjust the guessed adaption after import, just in case we expect "_Emission", but their texture slot is called "_Emissive" or something). Still, we'll probably limit ourselves to a PBR-ish shader for simplicity since perfect material replication is not necessary for our use case.
from usd-unity-sdk.
FYI, I've recently added CopyFromCamera, CopyToCamera, and a constructor which accepts a Unity Camera to make CameraSample a little more usable.
I've also recently started using Curves and it seems to be mostly functional (primvar interpolation being the primary issue to resolve).
I'm closing this out, but feel free to create new issues for missing features or other missing schema types as you need them.
from usd-unity-sdk.
Related Issues (20)
- SWIG build step failing HOT 2
- USD-Clip support music? HOT 3
- blendshapes animatins support? HOT 3
- Custom schemas supported? HOT 4
- Custom USD file format plugins HOT 4
- Exporting with references not available? HOT 2
- Exporting to USDZ directly from the Assets folder. [USDU-431] HOT 2
- Playback via Timeline [USDU-450] HOT 3
- Need an API documentation to load USD at runtime on Windows HOT 2
- Smooth normals on imported USD files [USDU-461] HOT 8
- Restarting the project sometimes make the package not work anymore [USDU-461] HOT 8
- How to permanently remove USD components on prefabs? [USDU-472] HOT 4
- Missing script and Serialization layout errors in built products [USDU-487] HOT 3
- Apple Silicon support HOT 2
- Exported file is sometimes missing faces
- Subsets Material Management HOT 1
- Missing dylibs in macOS builds - Bug in CMake files ? HOT 1
- It seems that a problem occurs when building after installing the USD package on URP. HOT 3
- Can not even installing the package by git URL
- Load Texture Custom Logic Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usd-unity-sdk.