kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #22018
Re: help with 3D normals
Actually, I researched a bit better and it appears vrml has a concept of
"crease angle"
http://accad.osu.edu/~pgerstma/class/vnv/resources/info/AnnotatedVrmlRef/ch2-26.htm
So you shouldnt split the mesh when saving to wrl, since a compliant viewer
should take into account the creaseangle field when calculating the normals
for rendering. And the model splitting logic should happen in the viewer
when sending the faces to opengl.
You just need to make sure you have no face normals pointing the wrong way
and have no holes or duplicate vertexes in the mesh.
On Dec 16, 2015 2:51 PM, "Cirilo Bernardo" <cirilo.bernardo@xxxxxxxxx>
wrote:
> Thanks Jose,
>
> I'll adjust the IDF plugin code to do just that - split the model so the
> top and bottom planes have 1 set of vertices and the vertical edge has
> smoothed vectors with Z=0.
>
> - Cirilo
>
> On Thu, Dec 17, 2015 at 1:44 AM, José Ignacio <jose.cyborg@xxxxxxxxx>
> wrote:
>
>> Those artifacts look like duplicate vertexes with normals pointing
>> different directions, ideally, for smooth shading wou'd want to break
>> up the mesh on each facet of the model (ie: have all vertexes from the
>> star pointing up, the other side pointing down and each side pointing
>> perpendicular to each rectangle). In Blender you'd use the edgesplit
>> modifier since even without the duplicate vertexes that star would
>> look really ugly with automatically computed normals and smooth
>> shading.
>>
>>
>> On Tue, Dec 15, 2015 at 10:21 PM, Cirilo Bernardo
>> <cirilo.bernardo@xxxxxxxxx> wrote:
>> > Hi folks,
>> >
>> > I've added 3D per-vertex normal calculations to the 3D model plugins
>> > but I'm calculating bad figures as seen in the *.wrl file below and a
>> > corresponding render from view3dscene:
>> >
>> >
>> https://drive.google.com/file/d/0By_XTJN-s8aXX3pCeFhWbTZNYWs/view?usp=sharing
>> >
>> >
>> https://drive.google.com/file/d/0By_XTJN-s8aXSmNEMlhOblRlLUE/view?usp=sharing
>> >
>> > Does anyone have some idea what I could be doing wrong to get such
>> artefacts
>> > in the image? I would like to fix my per-vertex normals calculation as
>> it's
>> > meant
>> > to be a tool to help 3D plugin developers create normals lists in cases
>> > where
>> > the model does not provide the information.
>> >
>> > - Cirilo
>> >
>> > _______________________________________________
>> > Mailing list: https://launchpad.net/~kicad-developers
>> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> > Unsubscribe : https://launchpad.net/~kicad-developers
>> > More help : https://help.launchpad.net/ListHelp
>> >
>>
>
>
References