Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 2 (modified by landauf, 17 years ago) (diff)

Mount Points

This is an archived page!
This page is very old and the content is not up to date.
Not everything (if any) which is written here will be in the final game!

Author

Patrick Boenzli

Tickets

Resources

Goal

This project's goal is to add a possibility to the .obj model to make mount-points. These points allow a modler to mark certain points on a model, these points can then be used to connect other objects. The mapping between mount points and objects is defined in a seperate file: the object-information-file (.oif).

Timetable

(Thx to [FabianLandau x3n] for the nice progross'o'meter images :D )

Date Topic Progress
22. Nov
29. Nov
6. Dec Reading in the .obj file specification and find a way to mark objects, Implement the object parser https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/70percent.gif?format=raw
13. Dec Implement the .oif file format and integrate it to orxonox https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/70percent.gif?format=raw
20. Dec Adapt WorldEntity? to integrate this new model features https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/70percent.gif?format=raw
3. Jan Test and debug https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/0percent.gif?format=raw
10. Jan Project finish https://dev.orxonox.net/attachment/wiki/SpaceStationInterior/0percent.gif?format=raw
17. Jan
24. Jan
31. Jan



UML Diagram

UML Diagram
Click for larger image



User Reference Alpha

You are able to define MountPoints that can be connected to any object you like. You will do this by:

  • adding mount-point-models of any size to the object. Each point must be in its own group
  • naming these cubes MP.<NR>.<NAME> (replace <NR> by a two digit number you like to refere to and <NAME> by an arbitrary name). For example: MP.00.Turret or MP.01.Engine1
  • the mount-point-models must be at the position where you want the objects to be added.
  • orient the mount-point-models as you like it (shortest axis marks up-vector, 2nd shortest axis marks left, longest axis marks forward)

Now the mounting points are set. You will need to define the properties of these mounting points in a seperate information file: ObjectInformationFile (.oif). An oif file could look like this:

<ObjectInformationFile>

<MountPoints>
  <MP.00.Turret>
    <Description>Turret slots</Description>
    <OrxClass>DamnBigGun</OrxClass>
    <Details>
      <name>Front Gun</name>
      <model>some model path</model>
    </Details>
  </MP.00.Turret>

  <MP.01.Engine1>
    <Description>Engine slots for the space craft</Description>
    <OrxClass>Engine</OrxClass>
  </MP.01.Engine1>
</MountPoints>

</ObjectInformationFile>

In order for the oif file to be loaded, it must be specified in the tags of the WorldEntity? in the world xml file, eg:

<WorldEntities>
...

   <SpaceShip>
      ...
      <mountpoints>models/ships/default.oif</mountpoints>
      ...
   </SpaceShip>

...
</WorldEntities>

For each mount point defined in the model there needs to be an entry in the .oif file with the same name (e.g. MP.00.Turret). Each mount point can define further properties:

  • OrxClass - defines the Orxonox class to create an object from and replace the mounting point with it (required). the class needs to be a fabricateable class.
  • Description - a string describing this mount point (optional)
  • Details - this opens a subsection: here you can add all the xml properties usualy possible for the world entity you are adding

Attachments (1)

Download all attachments as: .zip