Giter VIP home page Giter VIP logo

Comments (11)

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024 1

Okay, this should fix it:
d9451cd

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

Generally, it is working (this is another, similar scene):
grafik

But when I export your scene, the information gets lost. Let me check.

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

Okay, got it. I am setting the faces smooth, not the edges.

from gltf-blender-exporter.

proteamer avatar proteamer commented on May 29, 2024

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.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

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:
grafik

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

Issue added here:
#26

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

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.

proteamer avatar proteamer commented on May 29, 2024

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.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

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.

proteamer avatar proteamer commented on May 29, 2024

This scene seems have incorrect normals after export. Could you take a look?

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 29, 2024

grafik
grafik

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)

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.