The OgreOde Thread

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
3rd eye brainworm
Gnoblar
Posts: 3
Joined: Mon Jan 05, 2004 1:16 am
Location: WA, USA

Post by 3rd eye brainworm »

i have a theory:

ode is bogging down the computer
hackers are the unforgiving scum of the earth
if i was to be a hacker, id forgive the world
die scum
feel the pain in my heart muscle
feel it
User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1

Post by psyclonist »

I have a theory, too:

You post nonsense. Or back your claim up with hard profiling data :twisted:
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

[Moderator Note]
3rd eye brainworm posted 4 messages after this, all of which were devoid of anything remotely resembling content and were thus removed.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

Is the helicopter's body a trimesh or just a box
It's a compound geom; six boxes (body, 2 wings, tail "boom", tail "flipper" and tail fin) and three spheres for the wheels. I'm yet to be convinced that moving trimeshes are a good idea in a game environment.
What sort of framerates are you getting, especially for that particular shot
At startup (of that demo) I get about 40fps with shadows on 70 with them off. Once I've smashed into the wall and the boxes are more spread out I get more like 65 with shadows on and 140+ with them off. That seems to be the limit of my card, since the other scenes (which are, physically speaking, much simpler) max out at about the same level. These are obviously very rough estimates, and that's on; P4 3.2GHz, 1Gb RAM, GeForceFX5600 256Mb, Ogre's running windowed at 800x600 32-bit no anti-aliasing.
how is ode working with your buggy
Perfectly. It even gives a reasonable version of arcade-style car physics (powerslides, oversteer, understeer, wheelspin) straight out of the box. Without any fancy tyre modelling.
i hate it and im writing my own physics code
Seeing as ODE has been developeed over many years by a number of extremely clever people, including Russ, the lead developer, who previously used to develop physics code professionally; if you can come up with anything better I would be very surprised.
ode is bogging down the computer
Well sure, it can. As can sqrtf (or glBegin, or fprintf, etc, etc) if you call it enough times per frame.
3rd eye brainworm posted 4 messages after this, all of which were devoid of anything remotely resembling content and were thus removed.
Why am I not surprised!
:D
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1

Post by Vectrex »

howdy Monster, you are Ed Jones from the Ode list right? I love your remakes :) that 2d Joint really should be in the core ODE. 2d/3d games rule
ps I see you're in Melbourne too. I've decided that Yake with lua scripting is the only way I'll ever actually finish a game, but I also do music if you need some :)
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

Shhh! You'll spoil my mysteriousness if you reveal my real name!
If only I could take credit for the 2D joint, but I just nabbed it off someone else! Glad you like my remakes, hopefully there'll be another one on the way soon. And thank's for the music offer.

The lesson for today is; don't try to destroy scene nodes to which particle systems have been attached at the start of a frame, do it at the end. You've no idea how many hours that's just cost me!

And here's today's screenshot;
Image
[edit]picture updated; nicer looking particles[/edit]
Last edited by monster on Wed Jun 09, 2004 3:11 pm, edited 1 time in total.
User avatar
houssem_bdioui
Kobold
Posts: 31
Joined: Tue May 11, 2004 8:09 am
Location: Tunisia

Post by houssem_bdioui »

Hey, from better to best :)

Don't you have problems with the collision of the missiles and the
boxes since I suppose they're travelling at a high speed?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Wee-Hee ! :D

I am almost speech-less ... 8)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

Don't you have problems with the collision of the missiles and the
boxes since I suppose they're travelling at a high speed?
Yeah, but they're not travelling that fast, and the physics is running at a consistent 200Hz. Better would be to attach a little Ray collision geometry object to the front of the missle to check if it's going to collide with anything within the next timestep. But that, as they say, is beyond the scope of this demo!
User avatar
KeaponLaffin
Kobold
Posts: 28
Joined: Sat Jan 17, 2004 7:45 pm

Post by KeaponLaffin »

monster wrote:
Is the helicopter's body a trimesh or just a box
It's a compound geom; six boxes (body, 2 wings, tail "boom", tail "flipper" and tail fin) and three spheres for the wheels. I'm yet to be convinced that moving trimeshes are a good idea in a game environment.:D
Why not 4 more boxes for the prop? Just curious. ;-)
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66

Post by sinbad »

I agree with monster's approach - if you can use a combination of simple collision proxies, for god sakes do, they're a lot less expensive than full tri mesh collision and you'll be hard pressed to notice a difference if you pick the proxies well. Too many people go immediately for the trimesh solution unnecessarily - ok it's the only option in some cases like world collision, but in those cases the local tesselation level is not high so it's justified.
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

Why not 4 more boxes for the prop? Just curious.
Because it's just a demo! I've gotta leave something as a exercise for the reader!
;)

In reality (i.e. a "real" game) you'd probably only use boxes for the rotors when they're spinning really slowly. When they get up to anything like operating speed you'd be better off using a proper (as opposed to capped) thin cylinder or a sphere (and then disregarding collisions that aren't close to the "equator") since the boxes would probably be spinning too fast for sensible collision detection.

Plus, in a real simulation there's about a million other things to consider when modelling a helicopter. Almost all of which I don't understand. This demo just shows that you can fly stuff around by simply applying forces in the right places. It's the crappest helicopter simulation ever!
Guest

Post by Guest »

when you demolish that wall of boxes,

do the boxes ever come to a stand still?

or do they keep wobling like as in the bsp collision demo using ode,

the boxes in that demo they keep wobling with some left over momentum they never get rid of
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

do the boxes ever come to a stand still?

Certainly. But I'm using the very latest ODE code, and I think the "vanilla" Ogre uses quite an old version that's not so clever about contact generation and/or auto sleeping.
Guest

Post by Guest »

Actually, ODE's new QuickStep is much faster than WorldStep or StepFast, AND more accurate. Boxes also sleep more realistically than before. =]
User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England

Post by bad_camel »

Heh, I was gonna ask if the copter was fully working or if you just plopped it in there and rigged up a box proxy and hooked up the keys to move it.

Guess thats been answered :)
User avatar
monster
OGRE Community Helper
OGRE Community Helper
Posts: 1098
Joined: Mon Sep 22, 2003 2:40 am
Location: Melbourne, Australia

Post by monster »

Actually, ODE's new QuickStep is much faster than WorldStep or StepFast, AND more accurate.

No it's not. It's faster, for large systems, but it's less accurate. If you can come up with a solver that's very fast, very accurate and scalable then I daresay you could make a lot of money.

The ODE docs say;
"For large systems this is a lot faster than dWorldStep, but it is less accurate."

I don't know how it compares to step fast, that's never been in core so I've never used it. All these demos (actually it's just one demo, you can flip between the different scenes at will) use quickStep.
Boxes also sleep more realistically than before.
The realistic-ness of your sleeping depends on how you set your auto-sleep parameters. You can set up things to auto-sleep in really bizarre positions if you like! Auto-sleeping is new (ish), previously you could do it, but only manually. The test_crash demo still does manual sleeping I think.
Heh, I was gonna ask if the copter was fully working or if you just plopped it in there and rigged up a box proxy and hooked up the keys to move it.
Oh ye of little faith!
;)

It uses a lot of damping to make it controllable, where it should use a feedback-based fly-by-wire type system.
User avatar
Noiprox
Halfling
Posts: 64
Joined: Mon Apr 05, 2004 6:25 am
Location: North Vancouver, Canada

Post by Noiprox »

It looks very good.
Nice job, monster!
Dieter Buys
Image
"Death, be not proud, though some have called thee mighty and dreadful, for thou art not so." - John Donne
User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England

Post by bad_camel »

Yeah that quickstep is not suited for anything "realistic" in that if you rely on thin object actually colliding, you might be disappointed.
User avatar
KeaponLaffin
Kobold
Posts: 28
Joined: Sat Jan 17, 2004 7:45 pm

Post by KeaponLaffin »

monster wrote:In reality (i.e. a "real" game) you'd probably only use boxes for the rotors when they're spinning really slowly. When they get up to anything like operating speed you'd be better off using a proper (as opposed to capped) thin cylinder or a sphere (and then disregarding collisions that aren't close to the "equator") since the boxes would probably be spinning too fast for sensible collision detection.
You're right of course. I was just assuming a non-moving rotor for this "simple" demo. ;-)
tlaloc
Kobold
Posts: 35
Joined: Mon May 03, 2004 5:03 pm

Post by tlaloc »

monster wrote:
Is the helicopter's body a trimesh or just a box
It's a compound geom; six boxes (body, 2 wings, tail "boom", tail "flipper" and tail fin) and three spheres for the wheels. I'm yet to be convinced that moving trimeshes are a good idea in a game environment.
And your helicopter is just one mesh? How do you know exactly the position and size of the wheels, the flipper, the boom, etc. when you are creating the Geom?
Aren't you using any physics for your heli? Or your Geom as a Body to?
User avatar
houssem_bdioui
Kobold
Posts: 31
Joined: Tue May 11, 2004 8:09 am
Location: Tunisia

Post by houssem_bdioui »

tlaloc wrote: And your helicopter is just one mesh? How do you know exactly the position and size of the wheels, the flipper, the boom, etc. when you are creating the Geom?
Aren't you using any physics for your heli? Or your Geom as a Body to?
I can maybe reply in the place of monster (I'm massively using his Jeep's simulation :) ).

Every part is a single mesh. The size can be retrieved using the bounding box. However, I guess, the position of the wheels, for example, are hard-coded. Or did you find a solution for this monster?
User avatar
bad_camel
Halfling
Posts: 74
Joined: Tue Dec 17, 2002 11:57 am
Location: Somerset, England

Post by bad_camel »

I wouldnt be surprised if they were trial and error hard coded values. This is just a demo after all...but I stand to be corrected.
User avatar
Firegod
Gnoblar
Posts: 13
Joined: Mon May 17, 2004 10:00 am
Location: Taree, Australia

Post by Firegod »

:?: I think I must be missing something here, I've been using ODE in OGRE already. Isn't it built into Ogre? Whats the difference between whats being used in the collision demo and what monster is working on?
I can't find cylinders in the Ogre implementation, how would you do a cylinder (like a pound coin)?

Paul.
If in doubt, whip it out!
User avatar
houssem_bdioui
Kobold
Posts: 31
Joined: Tue May 11, 2004 8:09 am
Location: Tunisia

Post by houssem_bdioui »

I wouldnt be surprised if they were trial and error hard coded values. This is just a demo after all...
I think this must be done in the ode wrapper's in order to make things more elegants, and the demo is just there to show the usefulness and the simplicity of writing some code above this wrapper. isn't it?