Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Make mesh from Object (w/ limbs) is order important?

Author
Message
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 2nd Nov 2004 02:35
Hello all.

I'm constructing game levels using the MAKE MESH FROM OBJECT command. What I do is take a bunch of primitives (faces) and piece them togethr to make the floor and walls via the LIMB commands, then make the mesh from that object. Works like a charm!

So I was wondering, does it matter which order I place the faces onto the main object via LIMB commands? Or will making the mesh from the object sort the faces automatically? Or does it not even matter at all what order they are in? I'm just thinking of efficiency in DB rendering these level meshes. Thanks for any insight!!
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 2nd Nov 2004 23:18
Nobody knows?

Am I being paranoid?
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Nov 2004 23:29
Well when you create a mesh from a limbed object, it looses all it's original limb data, your effectively merging everything into 1 mesh. I'm not sure how your handling texturing, because it'd be quite handy to have each texture as a seperate limb (if you know what I mean) - that way you could put shaders on specific material (like water) really easily. You can only use 1 texture on a mesh, so having your meshes as seperate limbs then texturing them manually might be a good idea.

What about doors though? - you might be making it hard for yourself to add door objects because you'd have no effective way of moving the door. I think having a door mesh, and adding that as a limb would be the best option, then you could easily rotate it so it works nicely.


Van-B


Muhahahahaha.
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 2nd Nov 2004 23:46 Edited at: 2nd Nov 2004 23:47
Hi VanB.

I guess my question is when DBPro "merges the limbs into one mesh" does it save the faces in a specific order that would be similar if I was using a modeler? I'm still not familiar with the internal workings of 3D objects so I'm not even sure if that MATTERS or not, but I just want to make sure.

I'm using a single texture to texture the entire level. Since I'll have a level editor built into the game it will be nice to make "themed textures" so it would be easy to change the look of a level based on what large texture I use. I'm still learning about Memblocks and UV settings so that I can texture these primitives "on the fly" in the program.

The doors will be separate individual objects. Since this isn't a "real world" level like an RPG, the doors will just fade away and sink into the ground once you've unlocked them, but thanks for the idea of the water I may end up using that if I put water in.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 2nd Nov 2004 23:59
Ahh, makes sense to use 1 huge texture. I'm pretty sure that it'd just make the mesh in whatever polygon order it finds, like in order of limb number, but I don't think that really matters because it's all getting converted into raw polygon data, like 3 vertices per polygon, so really the order that it makes these polygons in won't matter too much unless your using transparent textures. For instance, when making a memblock matrix, you start at one corner and end at another, so logically the terrain should display quicker when looking from the first corner to the middle, but I really haven't noticed any strange performance jitters - that's on a 32k poly mesh as well, so it surely would have made it noticable.


Van-B


Muhahahahaha.
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 3rd Nov 2004 02:20
Thanks Van-B!
APEXnow
Retired Moderator
22
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 3rd Nov 2004 03:28
Although this is not a solution of sorts, more of a functional description, my CSM Cartography Shop map importer, v3.1.1 builds the CSM map file from one object which itself is limbed based on the group hierachy of the map. Essentially this allows doors, lifts and platforms etc to be moved and rotated easily based on a pivot entity in your map. If you're after a level creation system that can easily be embedded in your games, why not try the Demo version of Cartography Shop in conjunction with my importer. It will allow you to use lightmapped levels consisting of a single object, or more objects for more complex interactive levels.

The importer has a demo 2x room with a separating swinging door and hatch to demonstrate this principle. And, because the level only consists of two objects for the whole map, it's very easy to use with Nuclear Glory or a native collision system.

Paul.


Home of the Cartography Shop - DarkBASIC Professional map importer

Login to post a reply

Server time is: 2025-06-09 04:09:35
Your offset time is: 2025-06-09 04:09:35