Add vertices normal

Project:YafaRay
Component:YafaRay Core
Category:feature request
Priority:normal
Assigned:David Bluecame
Status:needs work
Description

Hello.

I would like to make a request.

It would be really useful to be able to add vertices normals to the mesh and disable the automatic calculation based on the smooth angle of the mesh.

It's possible?


Best regards

John

Acca Software S.p.a

Comments

#1

Hello,

Will you please explain this with more details, and examples if possible?

Thanks and best regards.

#2

Hello David.

The idea is to add the vertex normals to define the smooth edges; then disable the smootging angle.
Example

<mesh id="0" vertices="8" faces="12" has_norm="true" has_orco="false" has_uv="true" type="0">
<p x="1" y="1" z="0"/>
<p x="0" y="1" z="0"/>
<p x="0" y="1" z="1"/>
<p x="1" y="1" z="1"/>
...

<n x="0.000"     y="0.000"     z="0.000"/>
<n x="0.000000"  y="0.000000"  z="-0.025400"/>
<n x="-0.025400" y="0.000000"  z="0.000000"/>
<n x="0.000000"  y="0.000000"  z="0.025400"/>

...

<uv u="0" v="3.28083992004395"/>
<uv u="-3.28083992004395" v="0"/>
<uv u="0" v="0"/>
<uv u="-3.28083992004395" v="0"/>
...

<set_material sval="Material_0" />
<f a="2" b="0" c="1" n_a="0" n_b="1" n_c="2" uv_a="0" uv_b="1" uv_c="2"/>
<f a="0" b="2" c="3" n_a="0" n_b="2" n_c="3" uv_a="3" uv_b="4" uv_c="5"/>
<f a="2" b="4" c="5" n_a="0" n_b="1" n_c="2" uv_a="6" uv_b="7" uv_c="8"/>
<f a="4" b="2" c="1" n_a="0" n_b="1" n_c="2" uv_a="9" uv_b="10" uv_c="11"/>
...

</mesh>
<smooth ID="0" angle="45"/>  //non used with has_norm="true";

Best regards.

#3

Assigned to:Anonymous» David Bluecame

#4

Version:» <none>
Component:Code» YafaRay Core
Status:active» needs work

Hello,

I'm currently working on this and I hope this will be implemented in the upcoming YafaRay v4.x.x

More information here: http://www.yafaray.org/community/forum/viewtopic.php?p=32243#p32243

The XML interface will experience significant changes. When the new version is more stable and I can release an Alpha (hopefully in the next few months) I will document all the changes and explain the new XML format and compare "before" and "after" how to do things.