..Blender3D to OGRE mesh exporter..

Started by Naughty Alien, March 19, 2025, 03:47:29

Previous topic - Next topic

Naughty Alien

..hi Blender folks..I have found some blender to Ogre mesh exporters, but i would like to hear from your experience, rather me trying around, which one is best/easier to use ?

Naughty Alien

#1
So i have installed blender to ogre exporter from here https://github.com/OGRECave/blender2ogre
So i can see exporter in add on section inside Blender. However, these are missing from downloaded exporter and im not sure where to get these?



EDIT: I managed to get it all over the place, so it seems blender doesnt complain, so ill try and export some meshes ..

Derron

Can't you export to gltf and use an gltf importer for ogre if it cannot handle it natively ?

GLTF might be ...more standard.


bye
Ron

Naughty Alien

Quote from: Derron on March 19, 2025, 12:29:26Can't you export to gltf and use an gltf importer for ogre if it cannot handle it natively ?

GLTF might be ...more standard.


bye
Ron
..you are correct..usually ill be using gltf, but in this case development environment is PureBasic, so i needed .mesh to be exported..managed it..now i need to figure out, how to separate parts of mesh in to individual objects (inside Blender). For example, Tank turret. Current model has both turret and gun as a one object, but since i need to rotate gun along pitch axis i need it as separate object. Baby steps in Blender...but so far, i like it.. ;D


Derron

if the model uses "separated meshes" but joined them you could simply select a vertex of the turret and select all "connected" (you can also select by material, angle, ... etc). Once you did that, simply separate them and they become individual objects.


Bye
Ron

Pfaber11

Alien the one I used in the past is the one you are looking at. It did work back then. I think ASSIMP file converter was used as well but not sure what for.   
Windows 11 home edition
PureBasic 6.20 and AppGameKit studio
ASUS Vivo book i5 15 16gb ram 512gb ssd
ASUS Vivo book i3 15 16gb ram 256gb ssd
HP Desktop; AMD 6700 A10 16GB ram 2 GB graphics card windows 10

Naughty Alien

@Pfaber11 
This exporter works well..i wasnt sure is it going to be ok as it was for much older version of Blender and Ogre, but it worked well..


Naughty Alien

Quote from: Derron on March 20, 2025, 07:10:28if the model uses "separated meshes" but joined them you could simply select a vertex of the turret and select all "connected" (you can also select by material, angle, ... etc). Once you did that, simply separate them and they become individual objects.


Bye
Ron
..As you can see, model has 4 main parts. Some of them i need to separate in order to be able to control them. For example, turret is one mesh with gun. I need to separate these in order to control angle of each independently, but i have no clue how this works in Blender. Also, pivot point (turret) is slightly off center(Turret rotation center). How to realign pivot point so rotation will be accurate?


Pfaber11

#8
That looks awesome. It took me about 2 or 3 weeks to get to know blender for the bits I needed to know. I use it for AGK now as well and regard it as a vital bit of software for me. Wings 3D is nice but does not support animation so blender is a good choice. I hated it at first but now I think it's great.  Just a thought Alien if you look up pfaber11 on the PureBasic forum and looked at the questions I asked on there you might find this useful.
Windows 11 home edition
PureBasic 6.20 and AppGameKit studio
ASUS Vivo book i5 15 16gb ram 512gb ssd
ASUS Vivo book i3 15 16gb ram 256gb ssd
HP Desktop; AMD 6700 A10 16GB ram 2 GB graphics card windows 10

Derron

you open the model, select it, press "tab" to enter edit mode. Select a vertex of the cannon and then select "linked" vertexes. if the turret vertices were _not_ merged with vertexes of the turret or base vehicle, then it will only select the cannon.
Then press "p" to separate the turret.

If it was merged, then you need to select vertices eg utilizing the "+" key (growing a specific selection). But instead of separating first you would press "d" to duplicate and then "p" to separate ... you would have to fill in some new vertices, closing "holes" etc.
Same for the turret you there delete the cannon and would fill the gaps (eg select the vertices around the "hole" and try if "f" would already fill it for you).

Once you get the turret separated you can around the pivot point you set - in Blender!.
https://docs.blender.org/manual/en/latest/editors/3dview/controls/pivot_point/index.html

But in the game engine I guess it would rotate around the object origin. You can easily move the origin to the 3D cursor - or if you prefer it more visually, move the mesh (in edit mode, not object mode!) until the origin is there you want your stuff to "rotate around".

Depending on your engine you can also use parenting and eg have an "empty" (so no model attached, just a vector ....) and parent eg the turret to it. rotate the empty and the turret would "orbit around". Useful if you have various elements which are parented to one or multiple empties ...


bye
Ron 

Naughty Alien

@Derron 
..thank you very much .. in the process of separating gun from turret, as you described, am i going to lose UV settings for gun or turret??

Derron

You won't loose it. The separated objects will have the same modifiers, materials, ... 

It is a bit like duplicating the object and then deleting the "to extract" stuff from the original and the base part from the copy.

bye
Ron