question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VRMLLoader: Support normals, creaseAngle, and index

See original GitHub issue

When importing this vrml file: test.wrl.zip, I expect to get this:

screen shot 2018-08-31 at 12 24 28

But instead I get this:

screen shot 2018-08-31 at 12 24 42

When inspecting the VRML file, I can see that there is an attribute called creaseAngle, which I suspect is the normal definition angle.

However, in the source code for the VRMLLoader, I can find no such attribute check.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Glinkiscommented, Sep 7, 2018

Me and my colleague have been trying to implement crease angle support for a while now, and we’ve almost got it working.

However it’s not what I’d call the most elegant solution, and putting this logic in VRMLLoader seems kind of pointless.

Iit would be way better to just have a computeVertexNormals( creaseAngle ) method in BufferGeometry, like #14859.

The loader could then just call this method and be done with it. it would also enable other loaders to do angle creasing, without a bunch of repeated logic.

1reaction
mrdoobcommented, Sep 6, 2018

What about having the same geometry on multiple meshes, when the vrml defines an instance?

Yes, that works and it’s definitely encouraged 👌

Read more comments on GitHub >

github_iconTop Results From Across the Web

VMRLLoader color issue - Questions - three.js forum
But when I load the file I see more than 20 colors. It is really strange. Help with WRLLoader code.
Read more >
Three.js / Calculate vertex normals for indexed ...
Here's how I'm calculating the normals now in the vertex shader. float diff = 0.06; // tweak this value to yield different results....
Read more >
OpenSG Starter Guide - LaBRI
This document will help you understand the structure of the Open- ... Calculating vertex normals with a crease angle sounds simpler than it ......
Read more >
Multimedia documents integrating and displaying system
JP09259157, DESIGN SUPPORTING SYSTEM ... scene graph generation means further comprises: a VRML loader means, ... creaseAngle CDATA “0”.
Read more >
Customizing Normals - 4: Getting Normals from Geometry Nodes
How to get Normals from Geometry Nodes in Blender 3.1. GeoNodes don't currently support the Custom Normals we are used to.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found