[X3D-Public] Does anyone export per-vertex normals?

Keith keithrvictor at gmail.com
Mon Feb 14 07:24:24 PST 2011

Hi Dave

In the Vivaty Studio Tools menu, there should be "convert to indexed triangle set". I think that was there in all vivaty studio versions. 

In the most recent version, there is an export option:  "export all meshes as indexed triangle set". Very handy since it maintains the mesh formats in the tool, but exports to ITS.  

Skype me, I'll give you a drop. 

Thanks to Don and NPS for funding the development to add support for ITS and 5 other low level geometric primitives.

Keith Victor 

Sent from my iPhone

On Feb 14, 2011, at 1:59 AM, Dave A <dave at realmofconcepts.com> wrote:

> Thanks Keith.
> The version I have, I don't see any option for this. Should that be in Export Options or Edit Mesh or what?
> Dave A
> On 2/12/2011 12:35 PM, Keith wrote:
>> Hey:
>> As for tools;  Vivaty studio will let you convert any mesh to an indexedTriangleSet. That will generate the normals using the cease angle. The export will then contain all your normals, and other per vertex attributes using a single index array. ( that's the format that gets pushed to hardware ).
>> If you want to see the algorithm, I'd suggest looking at the indexedfaceset class in the open source flux player code, or any other open source player.
>> It's a pretty hairy algorithm. You first generate the normals for each coordindex element using the crease angle. ( like Michalis says ). Then consolidate the vertex normals that are are identical.  Or, if you're looking to send the data to the hardware, consolidate verts when all per vertex per face attributes are identical. Then, you end up with that indexedTriangleSet.
>> Keith Victor
>> Sent from my iPhone
>> On Feb 11, 2011, at 3:10 PM, Michalis Kamburelis<michalis.kambi at gmail.com>  wrote:
>>> Dave A wrote:
>>>> If only a crease angle is given, I should, at each vertex, find the
>>>> angle between faces, and if greater than crease, create a 'smooth'
>>>> normals based on surrounding faces. If less (flat), create a NEW mesh,
>>>> removing that face from the rest, and for each of its vertices, set the
>>>> normals same as the face's normal. If flat shaded, might as well create
>>>> a separate mesh for each face, with such normals.
>>> Like Sergey says, creating another mesh sounds excessive. Also, the fact
>>> that a face has a sharp angle at one vertex, doesn't mean that all it's
>>> normals are flat. It may be smooth at other vertexes.
>>> When handling creaseAngle, you just want to create as many normals as
>>> there are coordIndex items (well, ignoring the -1 inside coordIndex).
>>> This allows you to set appropriate normal for each occurrence of a
>>> vertex. Nothing more should be needed. (You may also consider optimized
>>> implementations for creaseAngle = 0 and creaseAngle>= pi cases, this is
>>> what I have in my engine.)
>>> Michalis
>>> _______________________________________________
>>> X3D-Public mailing list
>>> X3D-Public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>> -----
>> No virus found in this message.
>> Checked by AVG - www.avg.com
>> Version: 10.0.1204 / Virus Database: 1435/3439 - Release Date: 02/12/11

More information about the X3D-Public mailing list