I m using an 3D obj file in android using min3d framework. I have created vertex groups in blender for different areas of touch. For example, in a cube, I have 6 groups. What I want is on touch, I want to know which vertex group it belongs to. How can I do that ?
Following is the .obj file.
# Blender3D v249 OBJ File:
# www.blender3d.org
mtllib box.mtl
v -0.930561 -0.729213 1.591849
v 0.344868 0.404383 0.548661
v -0.798282 0.192931 -1.078760
v -2.073710 -0.940665 -0.035571
v 0.102151 -2.363303 1.078760
v 1.377579 -1.229706 0.035571
v 0.234429 -1.441158 -1.591849
v -1.040999 -2.574754 -0.548661
vt 0.333497 0.666700
vt 0.333618 0.333518
vt 0.666779 0.333639
vt 0.666658 0.666821
vt 0.000214 0.333639
vt 0.333376 0.333518
vt 0.000336 0.666821
vt 0.666838 0.333518
vt 1.000000 0.333577
vt 0.999941 0.666759
vt 0.666779 0.666700
vt 0.333832 0.333518
vt 0.333497 0.000336
vt 0.666658 0.000000
vt 0.666994 0.333182
vt 0.666838 1.000000
vt 0.666779 0.666818
vt 1.000000 0.999941
vt 0.000000 0.333182
vt 0.000336 0.000000
vt 0.333161 0.333518
vn -0.516356 0.817045 0.256545
vn 0.516355 -0.817045 -0.256545
vn 0.571575 0.105726 0.813710
vn 0.637714 0.566798 -0.521594
vn -0.571575 -0.105726 -0.813710
vn -0.637714 -0.566798 0.521594
g Face3
usemtl Material_box.png
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
g Face1
f 5/5/2 8/6/2 7/1/2 6/7/2
g Face6
f 1/8/3 5/9/3 6/10/3 2/11/3
g Face2
f 2/12/4 6/13/4 7/14/4 3/15/4
g Face5
f 3/16/5 7/17/5 8/10/5 4/18/5
g Face4
f 5/19/6 1/20/6 4/13/6 8/21/6
Following is the mtl file
# Blender3D MTL File:
# Material Count: 1
newmtl Material_box.png
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd box.png
There are 2 methods that I know of color picking and ray tracking. I did not find a good tutorial or documentation anywhere. I was thinking if I can get which vertex group it belongs, it would be easier since they are mentioned in .obj file as Face1, Face2 etc. Please help. Thanks