Normal oct-encoding

Hi all,
I’m trying to add normals oct_encoding to my gltf generator.

I got a version (python) providing good results but it doesn’t conform to the original paper (where x&y are inverted in some places).

I can’t figure out where is, in the gltf-pipeline, the function AttributeCompression.octEncode used in lib/octEncodeNormals.js (a grep -R doesn’t find it).

Can someone here point me in the right direction ?

Regards,

Fred.

The gltf-pipeline is using Cesium for that function, check out https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Core/AttributeCompression.js#L84-L86.

Hi Sean
Thanks. This is what he was searching for.

Regards,

Fred.

Hi Fred,

Just curious, can you tell us a bit about your glTF project?

We would be happy to list it here: https://github.com/KhronosGroup/glTF#gltf-tools

Thanks,

Patrick