Quote:Once you have the UV's, getting image pixel coordinates is even easier ( x/y = img_width/height * u/v ).
hm really stuck here... we are getting bad UVs, even negative ones from this:
PHP Code:
Vec2 UV1 = Earth.mesh->parts(0).base.vtx.tex0(vertices.x);
how it is possible?
and UVs arent continous as I see in addition to negatives.
where is the error in code can anyone help to point out?
I clicked 6 times to Australia territory from east to west, ca horizontally and I would expect continous UVs to main texture.
This is a Log I made from click data:
it is not continous rather jumping, see UV1.x:
0.003, 0, 0.2, 0.018, -0.06, 0.015
hit: vertice indexes: UV1: UV2: UV3:
2767: vertices: 1652, 1659, 1653 UV1: 0.003/0.416 UV2: 0.004/0.413UV3: 0.005/0.416
32: vertices: 26, 19, 27 UV1: 0.000/0.998 UV2: 0.200/0.998UV3: 0.100/1.000
38: vertices: 30, 31, 21 UV1: 0.200/0.993 UV2: 0.245/0.992UV3: 0.262/0.994
110: vertices: 75, 76, 70 UV1: 0.018/0.980 UV2: 0.035/0.979UV3: 0.039/0.982
315: vertices: 193, 199, 194 UV1: -0.006/0.936 UV2: -0.005/0.933UV3: 0.000/0.934
354: vertices: 215, 222, 216 UV1: 0.015/0.927 UV2: 0.019/0.926UV3: 0.020/0.928