UnityGltf Importer

Hooked up UnityGltf as an option for import (keeping GLTFast around for now...) Tried a bunch of models from the GLTF Sample Models Repo: https://github.com/KhronosGroup/glTF-Sample-Assets )
GitHub
GitHub - KhronosGroup/glTF-Sample-Assets: To store all models and o...
To store all models and other assets related to glTF - KhronosGroup/glTF-Sample-Assets
42 Replies
andybak
andybakOP10mo ago
Interesting results I didn't keep notes but it did some things better and some things worse. I think we're probably going to want both for the foreseeable future. Question is - which would should be the default? Also - UnityGltf looks cleaner to extend and I want to support some less popular extensions where it's viable.
andybak
andybakOP10mo ago
Google Docs
Open Brush GLTF Extension Tracker
Main List Blender Import,Blender Export,Unity GLTFast Import,Unity GLTFast Export,UnityGLTF Import,UnityGLTF Export,Unreal,three.js Import [via plugin],Godot Import,Babylon.js,Mozilla Hubs,No Known Implementation KHR_animation_pointer,KHR_animation_pointer KHR_audio KHR_draco_mesh_compression,KH...
andybak
andybakOP10mo ago
And I want to get a rough implementation for an Additive Blending extension - and at the very least write a Blender plugin to support it. @mikesky ☝️
andybak
andybakOP10mo ago
Anyway all of this is on this branch at the moment: https://github.com/icosa-foundation/open-brush/tree/feature/unity-gltf-export
GitHub
GitHub - icosa-foundation/open-brush at feature/unity-gltf-export
Open Brush is the open source, community led evolution of Tilt Brush! Forked from https://github.com/googlevr/tilt-brush - GitHub - icosa-foundation/open-brush at feature/unity-gltf-export
andybak
andybakOP10mo ago
That's the new exporter and the new importer (both off by default but can be enabled via the config file) Oh - the reason I started doing this was I wanted to see what happened if I put some lights into a GLTF in Blender and imported them. Would they work as scene lights? Didn't get around to that but I will tomorrow.
AncientWorlds
AncientWorlds10mo ago
Really cool! Do you have a sample config file, or is it in the build? Looks like the unknown is in pbr specular glossiness. I've got quite a few models I've made for testing at different points, I'll see how it handles them. Not sure if I can get to it today, in the audio editing stage and want to get that wrapped. Very interested in what results you get, as well as comparing them.
Since the 2.45 fix, I've had a lot more success in sketch imports and generally works well. Does occasionally put things far from where my controllers are when importing, or have major scale changes.
IIRC correctly, embedded models (especially with animations) have some issues. Overall stable enough to work with "in game" Accidentally imported some scene lights from marmoset via usd at one point... the results were "interesting", if often incredibly bright. Be interesting to see if that works with gltf, could be an excellent mechanism to add lighting for simple sketches, or more complex ones on systems that can handle the processing
andybak
andybakOP10mo ago
To enable UnityGltf as the new importer (instead of GLTFast):
"Import": {
"UseUnityGltf": true
}
"Import": {
"UseUnityGltf": true
}
Here's the whole export settings block showing various new settings. "newglb" activates the new exporter (in addition to the existing one)
"Export": {
"ExportBinaryFbx": true,
"ExportFbxVersion": "FBX201400",
"ExportStrokeMetadata": true,
"KeepStrokes": true,
"KeepGroups": false,
"Formats": {
"fbx": false,
"glb": false,
"newglb": true,
"json": false,
"latk": false,
"obj": false,
"stl": false,
"usd": false,
"wrl": false
}
"Export": {
"ExportBinaryFbx": true,
"ExportFbxVersion": "FBX201400",
"ExportStrokeMetadata": true,
"KeepStrokes": true,
"KeepGroups": false,
"Formats": {
"fbx": false,
"glb": false,
"newglb": true,
"json": false,
"latk": false,
"obj": false,
"stl": false,
"usd": false,
"wrl": false
}
Accidentally imported some scene lights from marmoset via usd at one point... the results were "interesting", if often incredibly bright.
Yep. There's a few issues around importing lights. The 3d preview models light the scene if the panel is open (which is not really desirable behaviour) and as you spotted - the intensity might be incorrect. I'm looking at that today.
AncientWorlds
AncientWorlds10mo ago
I have one model I can bring in which turns the entire scene fiery orange around the edges and lights everything up like that.
It's kind of cool, but really rough on the eyes after a while. The panel thing is pretty brutal as well, makes it hard to see the other models. Would be a great way to bring in spot or point lights if you can dial that in though. I think having them as importable models would give a lot of user flexibility and control, even better if you can color change them or hit them with something like the disco script :: Semi-related questions. Are the light brightness ranges for the default scene lights hardcoded? Are they tied to the scene itself, or is there a way to set a distance factor to control illumination better?
andybak
andybakOP10mo ago
light brightness ranges
Do you mean range as in distance? That's not how I initially read this but the line following it made me think you did?
AncientWorlds
AncientWorlds10mo ago
Ya, so you can bring them closer to the scene, get more localized brightness, or illuminate from the center instead of orbiting around the periphery For the most part, the moon light has almost no effect, although maybe just applies to certain materials? Also wondering if the range band on those can be set higher in terms of upperbound, or if its more of a percentage of total brightness scale on the slider.
andybak
andybakOP10mo ago
OK - that's not how directional lights work:
No description
andybak
andybakOP10mo ago
There is no range - you need spotlight or point lights for that. Directional lights model "a very bright light a very long way off" - i.e. the sun
AncientWorlds
AncientWorlds10mo ago
Ok, so they're orbiting basically. Wasn't sure because you have the whole scene gradient setting (the other light control/skybox) The directional lights are set in unity then, so would be global across all sketches if changed?
andybak
andybakOP10mo ago
no - they are configurable. that's what the light panel is for
AncientWorlds
AncientWorlds10mo ago
Ya, I'm looking at the diagram you just put up, that would affect the entire install. I take it the values can be adjusted in the code, which also wouldn't be scene specific, so scene specific lighting would have to be managed by importing lights (as models or whatever) or by creating custom skybox/backgrounds in unity If I'm understanding that correctly
andybak
andybakOP10mo ago
what values? you can change most of that on the lights panel.
AncientWorlds
AncientWorlds10mo ago
The in game lights panel? (with maximum brightness for the sun/moon)? I'm talking about the color/brightness slider on the side.
andybak
andybakOP10mo ago
yes - you can change those from the lights panel
AncientWorlds
AncientWorlds10mo ago
I'm assuming changing the multiplier or intensity in unity would have a dramatic effect, but would affect all sketches opened with that install That panel is where the secondary light has almost no effect, or interacts with different surfaces, don't really understand what it's trying to do. Is it like a low intensity IBL light or something?
andybak
andybakOP10mo ago
I'm assuming changing the multiplier or intensity in unity would have a dramatic effect, but would affect all sketches opened with that install
Are you wanting the lights to be brighter than the Lights pane; currently allows?
AncientWorlds
AncientWorlds10mo ago
ya. Although imports of models might be more effective overall. Just semi-related line of thought.
Big scenes often are poorly illuminated in places, especially outside of the main light cone set by the sunlamp direction
andybak
andybakOP10mo ago
directional lights effect surfaces based purely on the angle they hit the surface. So if you have your two main lights opposite each other then that gives you the maximum illumination for all surfaces. in theory 6 lights would give you complete illumination (and all objects would appear as if they had an unlit material - i.e. full brightness)
especially outside of the main light cone set by the sunlamp direction
there is no light cone only spotlights have cones - the two lights on the lights panel are directional lights.
AncientWorlds
AncientWorlds10mo ago
Three point illumination is usually sufficient. Sometimes add a global white light for intensity/brightness.
The sun/moon lights (lights panel) appear to have very different illumination values. The sun light tends to massively overpower the moon light to the point where it might as well not even exist
andybak
andybakOP10mo ago
here's a good way to visualize directional lights:
No description
andybak
andybakOP10mo ago
the row of arrows is actual infinite in both directions
AncientWorlds
AncientWorlds10mo ago
Right. And if I put them on opposite sides of the scene at max illumination, say a red light and a blue light You'd expect to see that color gradiant happening across the scene. Except in practice, if the red light is the sun lamp, you get a red scene. If it's blue, you'd get a blue scene So the intensity or brightness values must be different
andybak
andybakOP10mo ago
I'd expect to see one side of each object fully red, the other side fully blue with faces that are 90 degrees away from both would be a mix let me try
AncientWorlds
AncientWorlds10mo ago
That's not what happens, or at least I've never noticed it, and I'm sure I would have I've also noticed some of my custom materials will pick up the secondary light, on a material by material basis so I assumed it was affecting not the scene, but rather one of the material characteristics
andybak
andybakOP10mo ago
No description
andybak
andybakOP10mo ago
sorry - UI got in the way but that's pretty close to what i expected so - i used matte hull. shiny or especially metal materials respond to light differently fully metal only really have specular - the rest of the surface will be erm... kinda reflecting the scene (but not really) this is pretty standard PBR stuff. Most apps work the same way with minor differences
AncientWorlds
AncientWorlds10mo ago
Hmm. I'll look at that more, mine doesn't seem to behave that way, or I somehow overlooked it despite extensively playing with scene lihghting. I've got a pretty good mix of materials to work with. I assume the shape you drew was white?
andybak
andybakOP10mo ago
yep. white matte hull
AncientWorlds
AncientWorlds10mo ago
Hmm. Ok. Will look at that further and look and see what the materials are doing.
Would seem if I made the sun zero illumination and the moon 100% illumination, the moon color would set teh scene Sort of drifting off topic here. 1. Lights imported models would definitely be useful 2. Will try the importer next time I get in the headset. Probably editing today, unless it goes fast
andybak
andybakOP10mo ago
Would seem if I made the sun zero illumination and the moon 100% illumination, the moon color would set teh scene
Yes - as long as the fill light was also black
andybak
andybakOP10mo ago
like this:
No description
AncientWorlds
AncientWorlds10mo ago
If it's gray, should be a mid-blue, right? I'm going to play with that some. I don't use matte hulls a lot, so that may be a factor, especially if other brushes are affected differently for some reason
andybak
andybakOP10mo ago
metalness and shininess (or roughness) make a difference:
No description
andybak
andybakOP10mo ago
don't think any of our brushes are metallic - maybe disco? anyway left to right is shiny to rough. Top to bottom is metallic to non-metallic matte hull would be bottom right. shiny hull is probably bottom left.
AncientWorlds
AncientWorlds10mo ago
Ya, I usually stay away from the matte hulls because they're sort of boring.
I like things that are reflective, which is one of the reasons I want to bring in point lights for localized illumination Also controlling light sources inside the scene makes it easier to create falloff effects, light/shadow contrasts and what appear to be illumination sources I almost always go for the shiny hulls, more visually interesting to me Diamond is nice except the tendency to get ultra high glare at some angles and the dotted lines effect on the edges
andybak
andybakOP10mo ago
as soon as i finish the importer i'll see if i can add light widgets should be fairly simple. they will be point and spot lights
AncientWorlds
AncientWorlds10mo ago
That would be awesome Can really add a lot of drama to the scene, or be helpful when lighting some film paths which wander out of the main directional light cones radians,whatever they're called Alright, thanks for the insights.
andybak
andybakOP10mo ago
wander out of the main directional light cones
You can't wander out of a directional lights effect. it effects everything equally. The only factor is the angle between the light and the point on the object's surface. that's why you don't position directional lights - their position has no effect. only the direction they are pointing.
Want results from more Discord servers?
Add your server