
The OgreOde Thread
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
- Kobold
- Posts: 31
- Joined: Tue May 11, 2004 8:09 am
- Location: Tunisia
Great monster :
Would be nice if you succeed to use real chain links, as in the Novodex
demos : http://www.novodex.com/demos.html
Would be nice if you succeed to use real chain links, as in the Novodex
demos : http://www.novodex.com/demos.html
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
- Kobold
- Posts: 31
- Joined: Tue May 11, 2004 8:09 am
- Location: Tunisia
Don't think it's the same since you are using some joints to link your spheres while using "links" only envolves contact joints : so it's more natural let's say.monster wrote:Well, the mesh that each "link" in the chain uses can be anything you want. I just used spheres 'cos that's what the ODE demo that I'm re-implementing uses.
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
Impressive Work ! Bravo !
Once finished, Ode people will have to drop their "drawlib" thing !
[edited]
As we're on Ode things, here's an two interesting snippets of code with binary win demos at http://www.geocities.com/stuart_gooding/ :
- GLodemanager : sort of odecppp + refapp (collision, friction, behaviours)
- SMCEditor : impressive editor taking animated body and set updating geoms around each bone during animation. (could be use with ODE or verlet phys.)
(beware delphi inside... but not so far from cpp code readings.)
Once finished, Ode people will have to drop their "drawlib" thing !

As we're on Ode things, here's an two interesting snippets of code with binary win demos at http://www.geocities.com/stuart_gooding/ :
- GLodemanager : sort of odecppp + refapp (collision, friction, behaviours)
- SMCEditor : impressive editor taking animated body and set updating geoms around each bone during animation. (could be use with ODE or verlet phys.)
(beware delphi inside... but not so far from cpp code readings.)
Last edited by tuan kuranes on Fri Jun 04, 2004 1:10 pm, edited 1 time in total.
-
- OGRE Expert User
- Posts: 286
- Joined: Fri Nov 01, 2002 3:54 pm
- Location: Berlin & Nuremberg, Germany
- x 1
Good work! Quite a few people will find this very useful!
(not to speak of the previous attempts to replace or enhance drawlib...)
Anyway, drawlib exists only for the samples that ship with ODE. It's not intended to be used in any other applications. It'd be crazy to replace it and introduce another dependency. (ODE doesn't need eye candy
)
-psy
I don't think this would be a good thingtuan kuranes wrote:Once finished, Ode people will have to drop their "drawlib" thing !

Anyway, drawlib exists only for the samples that ship with ODE. It's not intended to be used in any other applications. It'd be crazy to replace it and introduce another dependency. (ODE doesn't need eye candy

-psy
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
Ah, fair enough. I haven't looked at the Novodex samples much. However, as I've said before these tests are really just re-implementations of the ODE tests to make sure my framework isn't doing anything stupid and to try to get it tuned to work with real-world values.Don't think it's the same since you are using some joints to link your spheres while using "links" only envolves contact joints : so it's more natural let's say.
Plus, in any reasonably complex game situation I would argue that there's absolutely no way you'd want to model chains in Novodex's "real world" way since that would be far, far too computationally expensive.
I totally agree with psy on that one, but I'm sure you were just being ironic anyway.I don't think this [dropping drawstuff] would be a good thing
The drawstuff library is just a teeny tiny graphical framework for visually testing ODE. There's no way you'd use it in a production application, just like you wouldn't use Ogre's ExampleApplication or ExampleFrameListener, and people who are just after a physics engine wouldn't want several megs worth of graphics library!
Ogre is completely separate from ODE, as it should be, and OgreOde is (spookily enough) positioned to be the glue between the two. Just like Ogre, OgreTok, and Tokamak in fact! But then I'm sure you already knew that!

-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
I'm interested in the lighting in that scene.
You seem to have a perfect light "cone" with speculat light on the right side. What are your light values, and how is that floor surface made up.
When I have one ground mesh and one point light, I can only get the whole mesh to either be fully lit or not lit at all, with no specualr, no matter what settings i use
You seem to have a perfect light "cone" with speculat light on the right side. What are your light values, and how is that floor surface made up.
When I have one ground mesh and one point light, I can only get the whole mesh to either be fully lit or not lit at all, with no specualr, no matter what settings i use
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
@ sinbad
For sure, but it'll probably be a while before it's ready. I'm always up for a bit of boistrous jostling.

(where's your other hand? between two pillows. those aren't pillows! etc...)
@ tintin
It's just a spotlight. The ground mesh is just a bunch of simple flat meshes, each one 20x20 units (in my case 20x20 meters) and 5x5 quads (i.e. 50 tris). The more polys you have the better the edge of the spot lit area is, so really I should have high-poly version in the middle and lower LODs further out where it's dark and no-one ever goes! But it is just a demo to test my wrapper.
To get specular lighting I just set a specular component on my light and in my material. That works even if my mesh is 1000x1000 and 2 tris. It doesn't work in OpenGL though, only DirectX.
For sure, but it'll probably be a while before it's ready. I'm always up for a bit of boistrous jostling.

(where's your other hand? between two pillows. those aren't pillows! etc...)
@ tintin
It's just a spotlight. The ground mesh is just a bunch of simple flat meshes, each one 20x20 units (in my case 20x20 meters) and 5x5 quads (i.e. 50 tris). The more polys you have the better the edge of the spot lit area is, so really I should have high-poly version in the middle and lower LODs further out where it's dark and no-one ever goes! But it is just a demo to test my wrapper.
To get specular lighting I just set a specular component on my light and in my material. That works even if my mesh is 1000x1000 and 2 tris. It doesn't work in OpenGL though, only DirectX.
-
- Kobold
- Posts: 32
- Joined: Tue May 25, 2004 3:03 pm
- Location: Montevideo, Uruguay
Why? To get specular highlights in huge triangles you need some kind of per pixel lighting, which OpenGL supports - maybe it's a problem with your drivers?monster wrote:To get specular lighting I just set a specular component on my light and in my material. That works even if my mesh is 1000x1000 and 2 tris. It doesn't work in OpenGL though, only DirectX.
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
Dunno. I've just never got specular lighting (with the fixed function pipline) under OpenGL (with Ogre). Makes no difference whether it's huge triangles or small ones. Here's two shots takes from exactly (give or take a few pixels) the same position in my OgreOde test app, with exactly the same code. One under OpenGL, one under DX9, the only difference is what I chose in the Ogre config dialog. That's on a GeForce FX5600 with the 56.72 drivers.Why? To get specular highlights in huge triangles you need some kind of per pixel lighting, which OpenGL supports - maybe it's a problem with your drivers?
Top one's DX9, bottom one's OpenGL;


And, while we're on the subject of OpenGL being bonkers. Modulative texture shadows. Crayzzeee!

In case you're wondering, the shadows seem to be OK on the mesh that's under the spotlight casting them, but they're repeated across every mesh in the scene. And when the casting object(s) moves off that mesh then the shadows don't get cast any more. They fade out in the very very far distance, rather than in accordance with the spotlight settings. That's using the Octree scene manager. Works fine under DX9.
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
Oh, and just so DirectX doesn't feel left out; texture shadows sometimes cause horrible stuttering under DirectX in Release mode. If I turn off shadows (I can flip them on and off dynamically in my test app) then the stuttering goes away, or if I switch to OpenGL (although I do get the bonkers effect from above), or if I run under DirectX in debug mode (and that's not the debug version of DirectX, just of Ogre and my app), I don't get the stuttering. Or even sometimes I don't even get it under DirectX!
Hang on, all of this graphical cobblers has nothing to do with physics! I've hijacked my own thread here.
D'oh!
Hang on, all of this graphical cobblers has nothing to do with physics! I've hijacked my own thread here.
D'oh!
-
- Kobold
- Posts: 28
- Joined: Sat Jan 17, 2004 7:45 pm
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
- Halfling
- Posts: 64
- Joined: Mon Apr 05, 2004 6:25 am
- Location: North Vancouver, Canada
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
As for the GL texture shadows, there's a GL transform state bug (I really don't like GL's stateful transform pipeline - too open to bugs like this..) hidden somewhere in there which I managed to create once, but never managed to create again - it just went away (always concerning). Obviously it's still there - when your code is ready for ogreaddoning I'll see if I can recreate it with that.
I've no idea what the stuttering is about, never seen it!
And I'm amazed that DX gives you a per-pixel specular effect when you use large tris. It shouldn't, in truth, since specular terms are only supposed to be calculated at vertices.
I've no idea what the stuttering is about, never seen it!
And I'm amazed that DX gives you a per-pixel specular effect when you use large tris. It shouldn't, in truth, since specular terms are only supposed to be calculated at vertices.

-
- Halfling
- Posts: 74
- Joined: Tue Dec 17, 2002 11:57 am
- Location: Somerset, England
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
It just does something like this;
Where "plane.mesh" is a 20x20 unit grid of 50 triangles (i.e. 25 quads, 4x4 units, 5 on a side, if you see what I mean).
[edit]...same sort of thing happens on the Trimesh demo (last picture posted) under OpenGL; the shadows are cast on the "terrain" mesh as if it hasn't been transformed. It's just moved by (0,3,0) and it's the only entity in the scene using that mesh.[/edit]
Code: Select all
// Use a load of meshes to represent the floor
int i = 0;
for(Real z = -80.0;z <= 80.0;z += 20.0)
{
for(Real x = -80.0;x <= 80.0;x += 20.0)
{
Entity* mPlane = mSceneMgr->createEntity(String("Plane_") + StringConverter::toString(i++), "Plane.mesh");
mPlane->setCastShadows(false);
SceneNode* mPlaneNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
mPlaneNode->attachObject(mPlane);
mPlaneNode->setPosition(x,0,z);
}
}
[edit]...same sort of thing happens on the Trimesh demo (last picture posted) under OpenGL; the shadows are cast on the "terrain" mesh as if it hasn't been transformed. It's just moved by (0,3,0) and it's the only entity in the scene using that mesh.[/edit]
-
- OGRE Community Helper
- Posts: 1098
- Joined: Mon Sep 22, 2003 2:40 am
- Location: Melbourne, Australia
-
- Kobold
- Posts: 31
- Joined: Tue May 11, 2004 8:09 am
- Location: Tunisia
-
- Gold Sponsor
- Posts: 446
- Joined: Fri May 02, 2003 10:05 am
- Location: UK
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
-
- Greenskin
- Posts: 114
- Joined: Wed Feb 11, 2004 5:41 pm
- Location: England!
-
- Gnoblar
- Posts: 3
- Joined: Mon Jan 05, 2004 1:16 am
- Location: WA, USA