View Single Post
  #1  
Old 05-09-2013, 10:08 AM
mshukun mshukun is offline
Member
 
Join Date: Jan 2013
Posts: 32
Texture Coordinates in a Cube Map

I am trying to ascertain texture coordinates for each created vertex in a cube map (i.e. a 360 degree panorama). I have tested "getTexCoord" in the cube map, resulting in all vertices' texture coordinates to be [0.0, 0.0, 0.0]. I thought texture coordinates of the vertex [0,0,0] to be [0.5,0.5, ?] (I don't know 'r' in this case). Is the "getTexCoor" function not meant for cube maps as well? If so, is there way to get texture coordinates or array index number for each vertex of cube face?

I truly appreciate any help that you might be able to provide. Thanks so much in advance.

Code:
import viz

viz.go()

env = viz.addEnvironmentMap('gpo_L.jpg')
sky = viz.addCustomNode('skydome.dlc')
sky.texture(env)

viz.startLayer(viz.POINTS)
viz.vertexColor(viz.GREEN)
viz.pointSize(15)

viz.vertex(0,0,0)
viz.vertex(-4.2, -16.5, 98.2)
viz.vertex(-13.8, 3.6, 99.0)
points = viz.endLayer()

print points.getTexCoord(0)
print points.getTexCoord(1)
print points.getTexCoord(2)

import vizcam
vizcam.PanoramaNavigate()
Reply With Quote