Calculating UV

Blitz3D Forums/Blitz3D Programming/Calculating UV

Moore(Posted 2011) [#1]
Hi all. I'm creating a map editor for a very old game. One of the very first 3D MMORPGs. The players got a hold of the code and are running a server. Anyways heres the problem when creating the room in 3d. I create a mesh, add all the surfaces and verts. And for each vert in a surface Im calculating the UV values. If I dont do this when I paintsurface() with a texuture map the texturemap doesn't appear.

Is there some way to calculate all the uv values in a surface automaticaly so that when I addvertex I can just addvertex(x,y,z) instead of addvertex(x,y,z,u,v)???

Check out the game and editor discussion here!


Warner(Posted 2011) [#2]
Well, maybe you could give AddVertex(x,y,z,x,z) a try.


Matty(Posted 2011) [#3]
I'm not sure I understand - you have to set the UV values if you want a texture to be mapped correctly (or even at all) - it doesn't make sense to expect a texture to map without uv coordinates...


Graythe(Posted 2011) [#4]
I think 'UpdateNormals' is what your looking for