Comments (11)
Okay, this should fix it:
d9451cd
from gltf-blender-exporter.
Generally, it is working (this is another, similar scene):
But when I export your scene, the information gets lost. Let me check.
from gltf-blender-exporter.
Okay, got it. I am setting the faces smooth, not the edges.
from gltf-blender-exporter.
Thanks for the fix!
I've tested it on me scenes and it works but I faced with another issue. In case of I'm disabling auto smooth
then time of export significantly increases. For instance: I have the scene with 71k faces (26 objects) export auto smooth
takes about 5 seconds and with auto smooth
takes about 15 minutes.
Could you please take a look at it? Maybe we need to create another issue?
from gltf-blender-exporter.
The problem is - if auto smooth is enabled - the exporter has to scan each edge of the polygon.
I will create a ticket for this, as an enhancement.
Also, please note, that smoothing the faces has the same effect and the export should be much faster:
from gltf-blender-exporter.
Issue added here:
#26
from gltf-blender-exporter.
Also, if you can share the scene, please go ahead.
If you can not share the scene, maybe you can profile yourself, where the real bottle-neck is?
With profile_start()
and profile_end()
you can instrument the Python code. The result is printed out in the Blender console.
from gltf-blender-exporter.
I've add some profilers in exported code and figured out that the bottle-neck is:
if blender_mesh.use_auto_smooth:
for edge_key in blender_polygon.edge_keys:
blender_edge = blender_mesh.edges[blender_mesh.edge_keys.index(edge_key)]
if blender_edge.use_edge_sharp:
use_sharp = True
break
In case of disabled auto smooth
time to convert polygon to primitive indices is 6.985664367675781e-05
seconds and with enabled auto smooth
is 0.012976884841918945
seconds. So if we have scene with 2048 polygons that we get next timings:
2048 * 6.985664367675781e-05 = 0,1430664062
2048 * 0.012976884841918945 = 26,5766601562
Also, please note, that smoothing the faces has the same effect and the export should be much faster
I actually use next pipeline: 3d Max -> export FBX -> Blender -> Import FBX -> Export glTF; I'm not sure that FBX accept smoothing the faces I will check it.
from gltf-blender-exporter.
I added an option (not uploaded yet), where you can disable the auto smooth check.
At a later point of time, I will check, how this can be made faster.
from gltf-blender-exporter.
This scene seems have incorrect normals after export. Could you take a look?
from gltf-blender-exporter.
In the above two images (Blender render and my internal renderer), auto smooth is disabled. The output seems to be correct. We will have a look at it, when auto smooth is enabled. But it will be an enhancement, as you can get the same result with another approach.
from gltf-blender-exporter.
Related Issues (20)
- wrong scale units HOT 6
- Emission node not working
- Glass? .. Can anyone explain how to do it?` HOT 15
- Animation not appearing right HOT 3
- Exported animation keys are off by one HOT 2
- NormalScale and Roughness texture not working in VR windows mixed reality home environment HOT 6
- Compressed texture are not exported HOT 2
- Use GLTF_COMPONENT_TYPE_UNSIGNED_SHORT for < 256 indices meshes
- Exporting from the command line HOT 2
- Image Data Block ID indexing HOT 4
- Material parameters not exporting with glTF2_Principled shader HOT 2
- BasicColorFactor Animation not exporting HOT 7
- Optional enabling/disabling of the lights exports HOT 2
- Export Extras option is not working. HOT 4
- UV Unwrap gets messed up HOT 1
- Blender 2.8 Beta GLTF and GLB export... is not working / broken HOT 1
- Bones "Inherit Rotation" property is ignored. HOT 2
- doesn't export material properly (pbrMetallicRoughness node is empty) from Blender 2.8 properly HOT 5
- Feature request: Export scene.extras HOT 1
- Exported GLTF is always black HOT 2
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 gltf-blender-exporter.