Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: ODE for Space Physics

  1. #1

    ODE for Space Physics

    Hi everyone

    This is my first post for a while so be gentle

    I'm writting an application were I want to simulate space physics, I have chosen ODE to implement this and was wondering if anyone had any tips of where to start? or had used ODE for something similar?
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  2. #2

    Re: ODE for Space Physics

    Quote Originally Posted by technomage
    Hi everyone

    This is my first post for a while so be gentle

    I'm writting an application were I want to simulate space physics, I have chosen ODE to implement this and was wondering if anyone had any tips of where to start? or had used ODE for something similar?
    I'm using ODE for my game Funkycars
    I don't know if ode is good for space physics.. space physics is usually simpler than classic one. What kind of problem do you think ode will help you for ?

    Anyway if you have to start, i suggest you to try from the beginning to visualize your ODE bodies and joints. Make a generic procedure that takes an ode scene and renders it with simple boxes/sphere. This will help you trace problems, when things will go in the wrong way.
    You can take a look to my DrawWorldUnit.pas in funkycars sources (note that is it GPLed).

    Bye

    PS Is your space game for DogFight ?
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  3. #3

    ODE for Space Physics

    Thanks for the feedback, I'll have a look at the code.

    My main idea is that I want to actually model the hull and engines of the ships separately, so that if an engine gets knocked out the physics engine will act accordingly, so I suppose I would need a box for the hull and each engine and join these together. I did have a look at the documents but I couldn't see any joints that seemed suitable tor this purpose, they all seemed to be geared to attaching wheels etc.

    Cheers

    PS - The main game isn't for dogfight, but If I make any progress with this ODE stuff I might just do a small test game
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  4. #4

    ODE for Space Physics

    Quote Originally Posted by technomage
    Thanks for the feedback, I'll have a look at the code.

    My main idea is that I want to actually model the hull and engines of the ships separately, so that if an engine gets knocked out the physics engine will act accordingly, so I suppose I would need a box for the hull and each engine and join these together. I did have a look at the documents but I couldn't see any joints that seemed suitable tor this purpose, they all seemed to be geared to attaching wheels etc.
    Ah i see.. Well there are a lot of joints, not just for wheels.
    If your engines are fixed on the hull, you can use the fix joint. If they can move in just one direction, you can use the hinge.
    Remember you can always set some variables on the joints to set the freedom of how they can move..
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  5. #5

    ODE for Space Physics

    Is says in the documentation not to use fixed joints? I wondered if there are not very efficient? I'll have a look at using a fixed joint to connect all the items together, then I suppose it's just a question of working out the way each engine workes (e.g if I press up which direction you need to add force), any tips of that area? or is it just a question of trial and error.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  6. #6

    ODE for Space Physics

    Quote Originally Posted by technomage
    Is says in the documentation not to use fixed joints? I wondered if there are not very efficient?
    It says that becouse most of the time if you think you need a fixed joint you probably can do the same with a compound geometry without joints. But in your case i see fixed joints useful. As you said, the joints can eventually get broken and the two body can move apart.
    But does your engines move about the hull ?

    I'll have a look at using a fixed joint to connect all the items together, then I suppose it's just a question of working out the way each engine workes (e.g if I press up which direction you need to add force), any tips of that area? or is it just a question of trial and error.
    Well you probably have some engines around the main body. If you add an equal force to each, you'll probably get a "forward" force.
    You simply get your input from keyboard and then use some dBodyAddForce function.
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  7. #7

    ODE for Space Physics

    Hi

    The engines are fixed on the hull, not rotating (although that's an interesting idea... ).

    I have implemented a simple model which has a main "hull" and 4 engines with a fixed joint between the engines and the hull (I call dJointSetFixed after attaching the Body's to the joint). Now when I call dBodyAddRelForce (becuause it needs to be relative to the body's current orientation) the engines all move off together, but the hull lags behind and does not keep up with the engines although the joint is still active as it does response to new inputs. Any ideas on how to ensure that the hull and the engines stay together? I can post a exe to demo the problem if that will help.

    I did try using dBodyAddForce as well with the same effect.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  8. #8

    ODE for Space Physics

    Hey guys, I expect some ODE tutorials to come out of these discussion ;-).
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  9. #9

    ODE for Space Physics

    Quote Originally Posted by technomage
    The engines are fixed on the hull, not rotating (although that's an interesting idea... ).
    Ok, then fixed should do the job.


    Quote Originally Posted by technomage
    Now when I call dBodyAddRelForce (becuause it needs to be relative to the body's current orientation) the engines all move off together, but the hull lags behind and does not keep up with the engines although the joint is still active as it does response to new inputs. Any ideas on how to ensure that the hull and the engines stay together?
    I didn't understand the problem. Is the hull "late" in moving with respect to the engines, but still following them; or is it completely detached as if the joins wasn't there ?

    In the first case, you have to adjust the joints ERP and CFM parameters. (error reduction parameter and constraint force mixing). The combination of this two values define how "loose" and how bouncy the joint is. You define them where you create the joint.
    The ode guide has some nice chapter on this settings, i suggest strongly to read them (it's not a hard read), then you can experiment with values to find a model that fits your needs. I think your joints should be as fixed as possible, so it should be easy to find out.

    If the hull competely detached, than probably you have some problem in your sources.. Compare it with some working project or demo.

    I can post a exe to demo the problem if that will help.
    I'd like to see how things are coming out
    Does it work on linux too ?
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

  10. #10

    ODE for Space Physics

    Quote Originally Posted by savage
    Hey guys, I expect some ODE tutorials to come out of these discussion ;-).
    :mrgreen:

    maybe, one day..
    If you save your data in a proprietary format, the owner of the format owns your data.
    <br /><A href="http://msx80.blogspot.com">http://msx80.blogspot.com</A>

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •