Giter Site home page Giter Site logo

Comments (12)

donmccurdy avatar donmccurdy commented on June 30, 2024 2

Transferring this to the new import/export repository, this is still a feature we'd like to get.

from gltf-blender-io.

SteffenDuenner avatar SteffenDuenner commented on June 30, 2024 2

I hope this gets some attention. We're currently in the middle of a project that needs proper user normals / vertex normals to look the way it should.

from gltf-blender-io.

sketchpunk avatar sketchpunk commented on June 30, 2024 1

https://drive.google.com/open?id=1RGwIt7a3AAapJVdnTxi7ZQEv9434cZ9v
Here is a cube sample with all the normals set to 0,0,1. This should make testing easy since its just a few vertices and a single direction for all of them. I used the blend4web plugin that makes it easier to edit the normals which then gets stored in Custom Split Normals Data.

I have been able to export to OBJ, and the custom normals do output correctly. I found an online tutorial about getting custom normals in gltf by means of exporting to collada then use the colladatogltf. This isn't the ideal workflow since most of the exports for blender uses the custom norms when auto smooth is enabled.

https://imgur.com/a/qD7EK here's an image of how it looks. Blue lines are the original normals, purple are the custom ones.

Also found this, someone with a bit of code to add the ability to export custom normals to FBX. Maybe this can help.

https://forums.epicgames.com/udk/udk-development/modeling-and-skinning/298304-custom-vertex-normals-for-blender-fbx

from gltf-blender-io.

emackey avatar emackey commented on June 30, 2024 1

Doesn't look resolved, reopening.

from gltf-blender-io.

emackey avatar emackey commented on June 30, 2024 1

This should be fixed in #414.

from gltf-blender-io.

UX3D-nopper avatar UX3D-nopper commented on June 30, 2024

I guess the addons are not taken into account. But yes, please provide an example.

from gltf-blender-io.

sketchpunk avatar sketchpunk commented on June 30, 2024

Is this issue resolved since it was closed?

from gltf-blender-io.

garyritchie avatar garyritchie commented on June 30, 2024

Is there any news on this? Would be good to have it working for the hard-surface-custom-normal workflow in order to cheaply round out the edges without making normal maps.

image

In the browser window I have A-Frame loading, from left to right, collada, glTF, and OBJ models exported from the pictured Blender file. I was using the Data Transfer modifier to get my custom normals from an object without the bevel modifier but, for the test, I've applied the modifiers.

These were the glTF exporter settings used:

image

from gltf-blender-io.

donmccurdy avatar donmccurdy commented on June 30, 2024

Interested in a solution to this as well, trying to create custom normals for foliage per https://www.artstation.com/artwork/9QGVy. Current result (with custom normals on the left shrub) is:

Blender Export
screen shot 2018-09-16 at 8 36 53 pm screen shot 2018-09-16 at 8 37 26 pm

Can share an example .blend if helpful.

from gltf-blender-io.

j-conrad avatar j-conrad commented on June 30, 2024

I think this is related to this issue-- looking for a good place to report this.
It appears to be a known issue that one cannot export a model that has manually-defined smooth/hard edges unless 'Apply Modifiers' is turned on. (Doesn't make much sense considering defining smooth/hard edges can be done without the use of any modifiers, but 🤷‍♂️)
The problem I'm having now is that I'd like to be able to export my Shape Keys AND have proper smooth/hard edges. However, Shape Keys don't export when 'Apply Modifiers' is turned on, aka the opposite problem. (Also a bit of a misnomer since Shape Keys appear to have zero to do with modifiers.)
Does anyone know how to get around this?

from gltf-blender-io.

emackey avatar emackey commented on June 30, 2024

one cannot export a model that has manually-defined smooth/hard edges unless 'Apply Modifiers' is turned on

@j-conrad As a workaround you can try, since it might take a while to get this bug fixed, is you could add an "Edge Split" modifier, and manually apply it, prior to export. Then it won't matter if the "Apply Modifiers" checkbox is set or not.

This is actually what's happening with the addon's own "Apply Modifiers" checkbox, since there's a temporary Edge Split modifier that gets used as part of the export process, and applying it is what gives you the requested hard edges. In glTF, the data is packed as needed for rendering on hardware, so, edge vertices must be split apart to have different normal vectors such as for hard edges. But the bug is basically that these normal vectors don't come from Blender's custom normal data, as they should.

See also comments in #230.

from gltf-blender-io.

j-conrad avatar j-conrad commented on June 30, 2024

@emackey thanks for the suggestion. Unfortunately, when attempting to apply an Edge Split modifier, Blender throws an error stating that you ‘cannot apply this modifier to an object that has shape keys’. 😣
Seems unreasonable to make people redo all their shape keys AFTER using the modifier which they don’t even want to apply permanently in the first place.
Looks like this problem doesn’t actually have a viable workaround.

from gltf-blender-io.

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.