Joining up meshes

Blitz3D Forums/Blitz3D Programming/Joining up meshes

Rob Farley(Posted 2003) [#1]
I've got a bunch of road segments in b3d format, each segment has 2 surfaces but these 2 surfaces are always the same on every segment. Is there a way of using surfaces from other meshs so I don't have 100s of surfaces?


Zo Zo Zee Zar(Posted 2003) [#2]
Hey Rob,

Check out the addmesh() command.

I had the exact same situation as youself with Binman (loads of road sections) adn wrote a routine that created a mesh and surface and added all road sections to it to become just one mesh and one surface - but i am told the addmesh() command does this for you!

If it doesn't work out for you with addmesh() give me a shout and i'll send you the code from Binman to do it.


Rob Farley(Posted 2003) [#3]
Cheers mate, I'll give it a go.


Gabriel(Posted 2003) [#4]
Surely AddMesh() combines entities, not surfaces. I mean you would get a speed increase, but I thought SSwift wrote a function called AddMeshToSurface() which actually combined surfaces as well for an extra speed boost.

I thought it was in the code archives somewhere. Maybe I dreamt it all.. someone else told me that AddMesh combined surfaces recently, but I was sure I tested it and it didn't.


DJWoodgate(Posted 2003) [#5]
I was under the impression that addmesh combined surfaces if those surfaces are painted with the same brush (Paintsurface). I have not tested it extensively though so I can't that will always be the case.


Gabriel(Posted 2003) [#6]
That might be the difference, yeah. I rarely use brushes.