hi
can i extend the oger's mesh format to add cutom data like where is weapon mount points or player hit points to indecate damage to the player.
and also can i use blender for exporting to dotscene format and is the meshes in the dotscenes is ordinary ogre meshs.
thanks
adding data to mesh format like adding mount points
-
- Kobold
- Posts: 25
- Joined: Sun Jan 09, 2005 10:16 pm
- Location: Alexandria, Egypt
- Contact:
- DWORD
- OGRE Retired Moderator
- Posts: 1365
- Joined: Tue Sep 07, 2004 12:43 pm
- Location: Aalborg, Denmark
- Contact:
Re: adding data to mesh format like adding mount points
No. You have to use another file for that:kariem2k wrote:can i extend the oger's mesh format to add cutom data like where is weapon mount points or player hit points to indecate damage to the player.
http://www.ogre3d.org/phpBB2/viewtopic. ... 2774#52774sinbad wrote:As I've said shedloads of times on this forum, you should always, always use the MeshSerializer to read and write binary .mesh files. We reserve the right to change the .mesh format any time we feel like it, if you don't use the MeshSerializer that will break your code in all kinds of interesting and creative ways.
There's a dotScene blender exporter in ogreaddons CVS.kariem2k wrote:and also can i use blender for exporting to dotscene format and is the meshes in the dotscenes is ordinary ogre meshs.
thanks
-
- Kobold
- Posts: 25
- Joined: Sun Jan 09, 2005 10:16 pm
- Location: Alexandria, Egypt
- Contact:
- SuprChikn
- Bugbear
- Posts: 863
- Joined: Tue Apr 19, 2005 6:10 am
- Location: Melbourne, Aus
- Contact:
Off the top of my head I would suggest giving the mesh a skeleton, having bones in the skeleton to mark the anchor points. Then in the scene, attach the weapons to these bones, and animate the bones (eg: rotate, etc) to move the weapons.
[edit]
Alternatively, I spose you could have some text file (in xml or some custom format or whatever) which defines the offset that each weapon is to be placed from the center of the mesh.
Then in you app, the mesh has a scene node for moving it around, and when you add a weapon, you give it it's own scene node as a child of the main mesh's scene node, with the defined offset placement as defined in your text file.
[/edit]
[edit]
Alternatively, I spose you could have some text file (in xml or some custom format or whatever) which defines the offset that each weapon is to be placed from the center of the mesh.
Then in you app, the mesh has a scene node for moving it around, and when you add a weapon, you give it it's own scene node as a child of the main mesh's scene node, with the defined offset placement as defined in your text file.
[/edit]
-
- Kobold
- Posts: 25
- Joined: Sun Jan 09, 2005 10:16 pm
- Location: Alexandria, Egypt
- Contact:
- SuprChikn
- Bugbear
- Posts: 863
- Joined: Tue Apr 19, 2005 6:10 am
- Location: Melbourne, Aus
- Contact:
Offset, as in if you treat the center of you mesh as the origin, what are the co-ordinates needed (in world units) to place the weapon at the correct location.
Store these in the file as mentioned above, then when you attach the weapon in game, do it with the child node thing (again, as mentioned above), and set it's position using the co-ordinates in the text file, using a local transform space for the setPosition function.
Store these in the file as mentioned above, then when you attach the weapon in game, do it with the child node thing (again, as mentioned above), and set it's position using the co-ordinates in the text file, using a local transform space for the setPosition function.
-
- Kobold
- Posts: 25
- Joined: Sun Jan 09, 2005 10:16 pm
- Location: Alexandria, Egypt
- Contact: