ODE implemented in Darkplaces

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Wed Oct 28, 2009 5:53 pm

  • MirceaKitsune wrote:Anyway, too curious not to ask: Now that there's a physics engine, are ragdoll physics possible to implement?


    LordHavoc said constraints are not yet implemented; I think those would be necessary for ragdoll physics.

    Also are there any plans for wheeled vehicles after the Spiderbot? I always dreamed to see something like UT2k4s Scorpion in Nexuiz :)


    I think tZork said he wasn't too interested in pursuing wheeled vehicles at the moment, but if you will code it, then I'll be happy to model and texture (and rig the suspension system?) the graphics for it, and collision mesh if desired.
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Wed Oct 28, 2009 10:51 pm

  • Flying Steel wrote:but if you will code it, then I'll be happy to model and texture (and rig the suspension system?) the graphics for it, and collision mesh if desired

    Me too! :D I offered my (little) modeling knowledge for a wheeled vehicle!
    Then, Flying Steel, if you don't want to start by modeling a vehicle and want to finish an unfinished project, there's my percival model, that is still in the air :oops: , you can find it here !
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Thu Oct 29, 2009 3:15 am

  • I was thinking of making a six wheeled LAV with a slightly exaggerated suspension system to maybe take advantage of all this ODE magic at some point. Or whatever whoever was doing the coding really wanted.

    But I took a look at your percival model and I'll respond on that in the thread you linked to.
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Sat Oct 31, 2009 10:55 am

  • yes, I saw it, thanks for your hints Flying Steel, if you need a hand for modeling some specific parts of your "six wheeled Monster" I could help you( sorry for my ignorance, what is a LAV?) :D !
    In these days I've very little free time, but for small details like tyres or suspensions I can try! About the ODE physics for vehicles, I've seen on ODE Docs site section here, that it explains how to create a vehicle. Now, I'm very stupid about programming, so my question (I post it to devs :D )is: Is it possible to use Ode "commands" inside Nexuiz like this I found on that site?
    Code: Select all
    void applyAntiSwayBarForces() {
        amt = 0;
        for(int i = 0; i < 4; i++) {            
            Vector3 anchor2 = wheels[i].Joint.Anchor2;
            Vector3 anchor1 = wheels[i].Joint.Anchor;
            Vector3 axis = wheels[i].Joint.Axis2;

            displacement = Vector3.Dot(anchor1-anchor2, axis);

            if(displacement > 0) {
                amt = displacement * swayForce;
                if(amt > swayForceLimit)
                    amt = swayForceLimit;
                wheels[i].Body.AddForce(-axis *amt); //downforce
                wheels[i^1].Body.AddForce(axis *amt); //upforce
            }
        }
    }         

    Curious people can take a look at this link and this !
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Sun Nov 01, 2009 12:51 am

  • LAV = Light Armored Vehicle.

    Anyway I probably wouldn't start work on the graphics for such a thing until a coder was ready to take a swing at implementing it in Nexuiz.
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Sun Nov 01, 2009 4:39 pm

  • Flying Steel wrote:LAV = Light Armored Vehicle

    ok, thanks!
    Flying Steel wrote:Anyway I probably wouldn't start work on the graphics for such a thing until a coder was ready to take a swing at implementing it in Nexuiz.

    Yeah, you're right. This happened to me too with Percival. Once uploaded I thought that some coder told me: "Hey, put some bones on your model and rename it so so and I'll try to write some code for moving it!" Instead no one were interested. This maybe, because the atmosphere that rules on this forum is that "vehicles are inappropriate or not so useful for Nexuiz Gameplay". But ,IMHO of course, Nexuiz shouldn't represent only a well known fast paced GPL game, but also a source (with its physics, animation, gaming features) for future games that can would be created. If I ,for example, knew a code genius, and together we create a driving- shooting GPL game like GTA, maybe this wouldn't be similar to Nexuiz Gameplay, but maybe 1000 people all around the world would love it. I don't know if someone has my same thoughts.
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Sun Nov 01, 2009 8:14 pm

  • toneddu2000 wrote:Yeah, you're right. This happened to me too with Percival. Once uploaded I thought that some coder told me: "Hey, put some bones on your model and rename it so so and I'll try to write some code for moving it!" Instead no one were interested.


    Well currently only tZork is working on coding vehicles, and he has created two of them and expressed some interest in making a third flying one. He just isn't interested in making a vehicle with physics that simulates your average wheeled vehicle.

    However, a skid steering wheeled vehicle (like your average tracked vehicle) might be alot more palatable, since it can turn in place, just like a player character can or the other nexuiz vehicles.

    This maybe, because the atmosphere that rules on this forum is that "vehicles are inappropriate or not so useful for Nexuiz Gameplay".


    I don't think anyone feels that way, anymore at least. The spiderbot and race have had a unanimously positive reception and vehicles are scheduled to become a stable feature in version 2.6.

    It is just a matter of an individual coder deciding to take up the work of coding a new vehicle or vehicle type. And if he does so he has a very good supply of us artists who seem willing to do the graphics for said vehicle (at least four of us, maybe seven).
    Last edited by Flying Steel on Mon Nov 02, 2009 4:24 am, edited 1 time in total.
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Mon Nov 02, 2009 12:16 am

  • Flying Steel wrote:LordHavoc said constraints are not yet implemented; I think those would be necessary for ragdoll physics.


    It sounds like div0 has implemented constraints...
    LordHavoc
    Site Admin
     
    Posts: 191
    Joined: Wed Mar 29, 2006 7:39 am
    Location: western Oregon, USA

Mon Nov 02, 2009 12:23 am

  • toneddu2000 wrote:Now, I'm very stupid about programming, so my question (I post it to devs :D )is: Is it possible to use Ode "commands" inside Nexuiz like this I found on that site?


    I chose not to support ode functions at all in the QuakeC side, because they would not be saved to savegames, I went for entirely entity-based implementation, all automatic (you only set it up to use physics and configure it a bit).

    Any constraint configuration would be in entity fields.
    LordHavoc
    Site Admin
     
    Posts: 191
    Joined: Wed Mar 29, 2006 7:39 am
    Location: western Oregon, USA

Tue Nov 03, 2009 2:14 am

  • LordHavoc wrote:It sounds like div0 has implemented constraints...


    Good to hear, thanks div!
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Tue Nov 03, 2009 1:32 pm

  • Flying Steel wrote:I don't think anyone feels that way, anymore at least. The spiderbot and race have had a unanimously positive reception and vehicles are scheduled to become a stable feature in version 2.6.

    Well, This sounds like a good news! :D

    LordHavoc wrote:I went for entirely entity-based implementation, all automatic (you only set it up to use physics and configure it a bit).
    Thanks LordHavoc for the clarification, but is still too technical for me, there's a lot of things I can't understand. There's someone who can share a map with physics so I can take a look?

    Another stupid question (don't shoot at me, please ): div0 and divVerent are the same person? I've never understood! :oops:
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Tue Nov 03, 2009 5:21 pm

  • toneddu2000 wrote:Another stupid question (don't shoot at me, please ): div0 and divVerent are the same person?


    Yes, div is div, he just uses slightly. . . difFerent :) callsigns for the forums and IRC/Multiplayer.
    Flying Steel
    Keyboard killer
     
    Posts: 623
    Joined: Fri May 08, 2009 9:13 pm

Tue Nov 03, 2009 6:33 pm

  • Flying Steel wrote:
    toneddu2000 wrote:Another stupid question (don't shoot at me, please ): div0 and divVerent are the same person?


    Yes, div is div, he just uses slightly. . . difFerent :) callsigns for the forums and IRC/Multiplayer.


    OT a bit, but nowadays it seems it's a fashion for seasoned players to change their nick frequently on the forum, irc, and ingame.
    Though at least I'm using a different nick on IRC only :D
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Tue Nov 03, 2009 6:56 pm

Fri Nov 06, 2009 9:47 pm

  • Sorry I cant send you a bottle of champagne via IRC but know that I thank you... al lof you who have made this possible...
    Image
    [Image
    Image
    User avatar
    Gego
    Alien
     
    Posts: 159
    Joined: Wed Mar 01, 2006 4:39 pm

Sat Nov 07, 2009 5:15 am

Sat Nov 07, 2009 1:25 pm

  • Samual wrote:I didn't do much except testing, but well, i'll take that tyvm

    /me drinks


    Same here *drinks a small amount then :P
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sun Nov 15, 2009 12:12 pm

  • There's someone who can explain me how to create an element "wheel" in Nexuiz-ODE, or just tell me where to get information about it?
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Sun Nov 15, 2009 6:03 pm

  • toneddu2000 wrote:There's someone who can explain me how to create an element "wheel" in Nexuiz-ODE, or just tell me where to get information about it?


    As far as I know, the only way to create a wheel is to make a brush and use SOLID_BSP mode (so it does triangle mesh vs triangle mesh collisions).

    Many physics engines do not support flat-ended cylinders, only capsules (rounded end cylinders).

    ODE supports them partially - they can not collide with most primitives, so I did not implement them as their support is incomplete.
    LordHavoc
    Site Admin
     
    Posts: 191
    Joined: Wed Mar 29, 2006 7:39 am
    Location: western Oregon, USA

Sun Nov 15, 2009 7:37 pm

  • Thanks LordHavoc, but where I should use SOLID_BSP mode? In netradiant, creating an object and setting this value to it, or in Blender using the property button to add a SOLID_BSP value, or ingame in Nexuiz?
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Mon Nov 16, 2009 12:33 am

  • toneddu2000 wrote:Thanks LordHavoc, but where I should use SOLID_BSP mode? In netradiant, creating an object and setting this value to it, or in Blender using the property button to add a SOLID_BSP value, or ingame in Nexuiz?


    In QuakeC code in Nexuiz.

    However I do not know how the physics objects are set up on the Nexuiz side, I only implemented it in the engine, I think div0 is responsible for the QuakeC code for it.

    It seems likely that he made the solid type configurable in the entity in netradiant.
    LordHavoc
    Site Admin
     
    Posts: 191
    Joined: Wed Mar 29, 2006 7:39 am
    Location: western Oregon, USA

Mon Nov 16, 2009 5:13 am

  • SOLID_BSP is 4 iirc, the other physics modes are 32 or higher.
    Image
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Tue Nov 17, 2009 6:52 pm

  • LordHavoc wrote:In QuakeC code in Nexuiz.

    That was what I want to know!Thanks!
    LordHavoc wrote:However I do not know how the physics objects are set up on the Nexuiz side, I only implemented it in the engine, I think div0 is responsible for the QuakeC code for it.

    It seems likely that he made the solid type configurable in the entity in netradiant.

    Ok, so, let's see if I understood well: If I, for istance,
    1 first I create a car1.qc in data/qcsrc/vehicles and put car.qc in progs.src
    2 I write at the end of the qc file void spawnfunc_vehicle_car1()
    3 After compiling I open NetRadiant and create a spawnfunc car 1 object and I give it a SOLID_BSP attribute with ?? value . Now, instead of ?? what value should I put?
    Is this the correct way of create a wheel?

    FruitieX wrote:SOLID_BSP is 4 iirc, the other physics modes are 32 or higher.

    Sorry, but I didn't understand what iirc stands for.. and where physics mode are avalaible (netradiant values ?)!
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Tue Nov 17, 2009 7:02 pm

  • toneddu2000 wrote:
    LordHavoc wrote:In QuakeC code in Nexuiz.

    That was what I want to know!Thanks!
    LordHavoc wrote:However I do not know how the physics objects are set up on the Nexuiz side, I only implemented it in the engine, I think div0 is responsible for the QuakeC code for it.

    It seems likely that he made the solid type configurable in the entity in netradiant.

    Ok, so, let's see if I understood well: If I, for istance,
    1 first I create a car1.qc in data/qcsrc/vehicles and put car.qc in progs.src
    2 I write at the end of the qc file void spawnfunc_vehicle_car1()
    3 After compiling I open NetRadiant and create a spawnfunc car 1 object and I give it a SOLID_BSP attribute with ?? value . Now, instead of ?? what value should I put?
    Is this the correct way of create a wheel?


    You would be creating an entity whose classname is set to: vehicle_car1

    The spawnfunc_ prefix is only used in the code.

    However you also did not put enough code in there to be useful for anything, and I do not have enough time to explain what you need to put in there.

    At the bare minimum for a physics object you need this line in your spawn function:
    setmodel(self, self.model);

    Then in radiant you need to add these fields to the entity:
    "model" "models/car1/wheel.md3"
    "movetype" "32"
    "solid" "4"
    "mass" "1"

    However this will only make a wheel object, you need more code to make a car, as I said above.

    toneddu2000 wrote:
    FruitieX wrote:SOLID_BSP is 4 iirc, the other physics modes are 32 or higher.

    Sorry, but I didn't understand what iirc stands for.. and where physics mode are avalaible (netradiant values ?)!


    iirc = IIRC = If I Recall Correctly
    LordHavoc
    Site Admin
     
    Posts: 191
    Joined: Wed Mar 29, 2006 7:39 am
    Location: western Oregon, USA

Tue Nov 17, 2009 9:50 pm

  • Thanks LordHavoc, as always your reply was providential! :D
    LordHavoc wrote:The spawnfunc_ prefix is only used in the code.
    However you also did not put enough code in there to be useful for anything, and I do not have enough time to explain what you need to put in there.

    No, no, of course, I understood that! I only meant to say that If I created an ENTIRE code for a car (which explains which movements it has to do, where it should steer, and so on) , it ended with that string!
    LordHavoc wrote:At the bare minimum for a physics object you need this line in your spawn function:
    setmodel(self, self.model);

    Then in radiant you need to add these fields to the entity:
    "model" "models/car1/wheel.md3"
    "movetype" "32"
    "solid" "4"
    "mass" "1"

    Ok,thanks I'll try it as soon as I can!

    LordHavoc wrote:iirc = IIRC = If I Recall Correctly

    OMG, it was so simple! I thought it was a Net Radiant variable! :oops:
    User avatar
    toneddu2000
    Alien trapper
     
    Posts: 251
    Joined: Mon Mar 09, 2009 7:56 pm
    Location: Italy

Tue Nov 24, 2009 12:57 am

  • I'm wondering what the status of ODE is now. Is it out of experimental state and enabled by default? Can it be safely used on maps as well?
    <Taoki> ... So maybe the new colored bars under the sbar weapons could indicate ammo level rather than accuracy stats.
    <Morphed> great now there is a place to show current phase of moon on hud
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Tue Nov 24, 2009 1:11 am

Tue Nov 24, 2009 4:30 pm

  • having worked with bullet and ode, id have to say bullet would be better in my opinion for nexuiz. but i'd really like to see DMM, or Digital Molecular Matter, implemented.
    +The Dude+
    [-Project 2501-]
    Mizu Kitsune
    Alien trapper
     
    Posts: 362
    Joined: Sat Apr 11, 2009 7:51 pm
    Location: Maridia

Mon Dec 07, 2009 5:43 pm

  • Why would bullet be better Mizu Kitsune? And for obvious reasons, forget abt DDM in dp.


    Last bumped by MirceaKitsune on Mon Dec 07, 2009 5:43 pm.
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

Previous


Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest