Programming Question mesh co_ords vis OBM

paddy2

Addon Developer
Addon Developer
Joined
Jul 21, 2012
Messages
384
Reaction score
1
Points
18
Location
Kent, UK
I am using Orbiter Base Maker to make a base and fireworks to add some detail.
I have a spreadsheet to convert OBM co_ords to pixels and it seemed to be working fine, until I hit an issue with some meshes I had beg / steal / borrowed from other bases.

co_ords.jpg

I have placed the mesh just a little off center so it lines up with the grid. The mesh is placed at 8:3 according to OBM, (which has placed other items with pixel accuracy). The mesh, however, seems to be dumped anyhow, its center is just above the "t" of fueldepot in the add mesh block. The small red cross is at 0:0. the mesh is nowhere close!!! There is a white grid showing with 10m spacing so the size of the mesh is right. Its just not placed central or lined up on an edge.


I do not have a clue how to make a mesh so I am not having a go at mesh authors at all. Is there a line in the mesh file which I need to look at or anything.

I'm lost. I can place the item and by trial and error move them around until I get aligned but its a lot of cut an paste, open orbiter to see and then close it and try again.

Any ideas gents....
 
Each mesh has it's own set of coordinates so if mesh was made off center you can either put it by try and error or translate (move) it using mesh wizard

Clipboard013.jpg
 
Last edited:
The mesh's (0,0,0) point is at the coordinates you placed it. The mesh can be asymmetrical, so it doesn't need to align to the grid.
 
Thanks for the really quick replies. I just did not think to put it into mesh wizard. As I say I have limited understanding of the meshs but I can always reload the file

Again thanks

---------- Post added at 05:23 PM ---------- Previous post was at 05:12 PM ----------

Just used Mesh wizard......
That would have saved me so much time
At least I know I am not cracking up and my sums work now
 
Mesh handling is tricky.

OBM actually parses the mesh files to find the "bounding box" of a Mesh in order to center it.

Some Tuesday I will have to release an update to OBM that has the ability to draw a wire-frame model of the mesh.

OBM_Mesh.jpg
 
Having seen the mesh through meshwizard eyes I can now see how the Mesh is placed. From a programming point it makes perfect sense, its just I never thought of the mesh as having its own internal centre. Very few meshs are going to be simetrical ...sim met ... balanced along a centre line!
 
Back
Top