Normals Format

41 views
Skip to first unread message

Guido Lein

unread,
Feb 15, 2022, 6:29:59 AM2/15/22
to alembic-discussion
Hi everyone,

I hope you can point me in the right direction as I wasn't able to properly find information about how normals are processed/working.
Exactly, what the format is that I have to write into the normals array. 

Let's assume I have 2 triangles, 4 vertices and 6 proper indices 0,1,2, 1,2,3 for example. What would the normals format look like?
What I could find out that it is not per-vertex normal, correct? 
From another post, I read that the array for a plane will contain 6 normal vectors. So I figured it to be per FaceIndex? Or is it per Vertex + 1 normal for every face? 
Vn, Vn, Vn, Fn, Vn, Vn, Vn, Fn? Or Just Vn x8 per FaceIndex so to say? 
Can I read up on it somewhere on what is expected? 

I hope you understand my question at all :D

Because I have a proprietary data stream that I want to convert, I have to build up all the arrays myself instead of getting maya normals or whatever (and maybe reverse those ...) Currently, my incoming data has only vertex normals and I am generating a new array by iterating over the IndexArray. 

Thanks in advance. 

Lucas Miller

unread,
Feb 15, 2022, 12:03:24 PM2/15/22
to alembic-discussion
Because normals are set via a N3fGeomParam::Sample, you can indicate whether they are per vertex, OR face varying.

A face varying example is here:


If they happen to be indexed you can also write them out as such by the same OGeomParam::Sample interface.


I hope this helps,

Lucas
Reply all
Reply to author
Forward
0 new messages