weld vertices

Blitz3D Forums/Blitz3D Beginners Area/weld vertices

Paulo(Posted 2005) [#1]
Hi all,

If I wanted to make a 3d tile set, is it possible to weld vertices in Blitz (like I would in Milkshape) to achieve a seamless effect. I played with Updatenormals, but didnt see the result I was looking for. Any advice would be appreciated, thanks.


Raitsun(Posted 2005) [#2]
Updatenormals doesn't affect the vertices. It just affect the lighting.

You can affect vertices by getting the surface via countsurfaces() and getsurface(). You then have to get the vertex-index of the vertice to affect with countvertices(). you can't move vertices, you will have to create a new surface by creating new vertices and free the old ones. You can get a vertex-position with VertexX, VertexY and vertexZ.

But all in all it is no good idea to try to make the tiles seamless by manipulating the mesh. Better make Tiles that fit together, that will limitate you much, but that's a problem you will ever have when using tiled environments.

Raitsun


Paulo(Posted 2005) [#3]
Hi Raitsun,

Thanks for that. I am actually using b3d meshes that fit together perfectly, but the seaming is too bad to justify, even with the texture 100% perfectly tiled.

The reason I quized the lighting was because when I make a standard flat QUAD as a tile, and stamp it out, I can't see the seam, beacuse of the way the light hits the surface, but when I make cliffs and a more rugged terrain kind of surface, the seams show up badly, because it appears that the lighting doesnt strike the mesh correctly (as you would see in a 3D modeller, until you weld your vertices.) :)


Damien Sturdy(Posted 2005) [#4]
Hey mate, Sorry i not been around much.. ive been living with the GF for the last week or so.
I'll be around later on but not for too long.. I'll happily work it out with you.

Catch you later.


Paulo(Posted 2005) [#5]
groovy mate :) my editor is working - not saving yet tho!


Ross C(Posted 2005) [#6]
What you could do, is create a big texture and copyrect the smaller textures onto the big texture and use that on a surface.


TartanTangerine (was Indiepath)(Posted 2005) [#7]
Have a look in the code archives there are a couple in there for welding vertices.


TartanTangerine (was Indiepath)(Posted 2005) [#8]
Heck don't bother with that. I use a version of the one by Terabit but I modded it to work with vertex colors and alpha.

Here ya go.

http://www.blitzbasic.com/codearcs/codearcs.php?code=1377


Damien Sturdy(Posted 2005) [#9]
I sorted the problem.

The seaming was mainly just textures not being spot on i think (Paulo could explain it better :/) and a 2nd issue was with lighting.

I fixed the lighting by converting entity coords into mesh coords and then checking for vertices that share a location, and averaging the normals... Hell, i dont think the lighting fix was required in the end :/


Paulo(Posted 2005) [#10]
The texture problem was simply that i only designed it to tile left - right, or up - down, so rotating the tile 90 deg causes a seam, solution was to make the texture tile with any face in any direction - can limit your texture a little though.

Thanks for the input guys! Much appreciated.


RustyKristi(Posted 2016) [#11]
Anyone got a working example on this? Still looking for this type of feature.