|
|
For smooth surface, yo must calculate normal vector. Your code is flat.
For example :
mesh2 {
vertex_vectors{
8,
<-1.224802,2.750054,3.593432>,
<1.763963E-02,2.570504,2.81744>,
<1.763963E-02,0,2.81744>,
<-1.224802,0,3.593432>,
<1.763963E-02,2.570504,2.81744>,
<2.114852,3.271527,3.580328>,
<2.114852,0,3.580328>,
<1.763963E-02,0,2.81744>,
}
normal_vectors{
8,
<-2.134022,0,-3.416781>,
<-1.994692,0,-3.193701>,
<-1.994692,0,-3.193701>,
<-2.134022,0,-3.416781>,
<1.961009,0,-5.390894>,
<2.495811,0,-6.861088>,
<2.495811,0,-6.861088>,
<1.961009,0,-5.390894>,
}
uv_vectors{
3,
<0,1>, <1,1>, <1,0>
}
texture_list{
1,
texture {mat_white},
}
face_indices{
4,
<3,1,0>,0,
<3,1,2>,0,
<2,5,1>,0,
<2,5,6>,0,
}
uv_indices{
4,
<0,1,2>,
<0,1,2>,
<0,1,2>,
<0,1,2>,
}
normal_indices{
4,
<3,1,0>,
<3,1,2>,
<2,5,1>,
<2,5,6>,
}
}
Hasan...
Post a reply to this message
|
|