Print at Sep 28, 2020, 7:10:19 AM

Posted by enkonyito at Nov 20, 2018, 7:13:22 PM
Re: How to find the vertices of a 3D shape?
To have a reference of what I had to look for, I performed tests in Sunflow directly by editing the example_scene.geo.sc file.

I have found that vertices are only well taken into account if they are grouped into a single object defined in the .obj file.
# 3D model cube_v2.obj

mtllib cube_v2.mtl

g cube

usemtl default

v 0.0 0.0 0.0
v 100.0 0.0 0.0
v 100.0 0.0 100.0
v 0.0 0.0 100.0
v 0.0 100.0 0.0
v 100.0 100.0 0.0
v 0.0 100.0 100.0
v 100.0 100.0 100.0

f 1 2 3
f 1 3 4
f 2 1 5
f 2 5 6
f 1 4 7
f 1 7 5
f 3 2 6
f 3 6 8
f 4 3 8
f 4 8 7
f 7 8 6
f 7 6 5


Results in Sweet Home 3D.


By launching the rendering several times, sometimes the triangle mesh light is not well applied.
I think I should put my method searchVertices (light) elsewhere than in exportLightSource especially since there is redundancy with some methods already present in the PhotoRenderer file.
----------------------------------------
EnkoNyito gallery