Look! Some falling boxes!

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
rocketman
Kobold
Posts: 34
Joined: Wed Sep 01, 2004 6:27 pm

Post by rocketman »

Right got some joint demos here, plus Ive tinkered with all the code.

First up- a familiar face added to the first demo, as "level 8":
Image

A boring one showing all the joints. From right to left: Spherical, Revolute, Cylindrical, Prismatic, PointOnLine and PointInPlane.
Image

Sort-of cloth sim:
Image

Gave old greenie some hair- who would have known he was really a floppy haired ginga!
ImageImage

Finally a mass car crash:
Image

Im just packing up the code and the exes right now, so watch this space.
rocketman
Kobold
Posts: 34
Joined: Wed Sep 01, 2004 6:27 pm

Post by rocketman »

User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

Very good. Just have to make a request. Please provide an option to change delta time so I can test demos at different rates.
rocketman
Kobold
Posts: 34
Joined: Wed Sep 01, 2004 6:27 pm

Post by rocketman »

it doesnt have a fixed delta time, the time step depends on the frame rate (limited between 1/40s + 1/140s). If you want to implement a fixed time step just change Nogredex::simulate() providing your own delta for p->mScene->startRun(float dt).
mac
Kobold
Posts: 34
Joined: Wed Jun 25, 2003 5:17 pm
Location: Berlin, Germany

Post by mac »

That's what I call a cool demo! I like the "headbanging" one very much. And: you are not far away from the official Ogre-bowling sim. ;)

I had a lot of fun,
Thanks,
mac
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
Contact:

Post by sinbad »

Excellent, I love the 'cloth' demo.
User avatar
ahmedali
Gnome
Posts: 302
Joined: Fri Feb 20, 2004 8:52 pm
Location: Lahore, Pakistan

Post by ahmedali »

rocketman wrote:it doesnt have a fixed delta time, the time step depends on the frame rate (limited between 1/40s + 1/140s). If you want to implement a fixed time step just change Nogredex::simulate() providing your own delta for p->mScene->startRun(float dt).
Well i was a little lazy to build that. But alternativly you can give an option to time delta "Multiplier" or factor. Somthing like "p->mScene->startRun(dt * mult)"
User avatar
gfm
Gnoblar
Posts: 17
Joined: Mon Oct 11, 2004 7:05 am
Location: Oregon
Contact:

sweet demo, compilation errors tho..

Post by gfm »

these two lines:

Code: Select all

memcpy(vptr+count, vertices.begin(), size * sizeof(Vector3));
memcpy(cptr+count, colours.begin(), size * sizeof(unsigned int));
in DebugRenderable::everyFrame() are causing compilation errors on my system (VC 7.1, Novodex 2.11, Ogre 0.14.1).

Error is:
DebugGraphics.cpp(80) : error C2664: 'memcpy' : cannot convert parameter 2 from 'std::vector<_Ty>::iterator' to 'const void *'
with
[
_Ty=Ogre::Vector3
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Comment them out and everything works fine..
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
Contact:

Post by sinbad »

This is a common issue when going from (older) VC to gcc, too. All it needs (I think) is this:

Code: Select all

memcpy(vptr+count, static_cast<void*>(vertices.begin()), size * sizeof(Vector3));
memcpy(cptr+count, static_cast<void*>(colours.begin()), size * sizeof(unsigned int));
.. or, alternatively:

Code: Select all

memcpy(vptr+count,  &(vertices[0]), size * sizeof(Vector3));
memcpy(cptr+count, &(colours[0]), size * sizeof(unsigned int));
eZZy
Gnoblar
Posts: 6
Joined: Thu Mar 13, 2003 6:43 pm
Location: Kaunas, Lithuania

Post by eZZy »

Really nice! But i was wondering, why Novodex'es demos are much faster then Nogredex ;)?
rocketman
Kobold
Posts: 34
Joined: Wed Sep 01, 2004 6:27 pm

Post by rocketman »

@gfm
Yeah when I wrote that I wasnt sure that it looked particularly "safe", it assumes that the vector has the data in a nice array that can be copied straight over (which I think it should if it meets the STL specs). There is also the issue of data alignment, I dont think that it is guaranteed that sizeof(Vector3) == 3*sizeof(float).

@eZZy
I noticed that the nogredex demos are faster too, I think it is mainly down to the overhead of a scene management system. They are using a brute force method that is fine for demos, because all you see on the screen is all there is. But for a complex scene, say a game level, scene management is essential and I am sure ogre would hold its own. Plus there is a couple of other things that slow Nogredex down like scalling of primitives and recalculating normals. If I remember I will try to profile the demos to make sure the slow down isnt in the Novodex/Ogre interface.
User avatar
Phantom
Greenskin
Posts: 106
Joined: Mon Aug 02, 2004 10:28 pm
Location: Helsinki, Finland

Post by Phantom »

Looking good!
Meddten
Halfling
Posts: 71
Joined: Mon Aug 09, 2004 8:28 pm
Location: Austria

Post by Meddten »

When will we blessed with the next demo (ragdoll maybe)? :)
Limb
Gnoblar
Posts: 8
Joined: Wed Aug 06, 2003 8:15 pm

Post by Limb »

I've been working to get Trimesh support working with the nogredex framework, and I'm glad to announce I;ve got it working somewhat :)

Image

heres a screenshot of a cylinder in the renderer, and it's collision is performed by a TriMesh. and she works beautifully. I've still got some stuff to work out, mutliple submesh support (Ogrehead only gets colission on his eyes), how to scale the trimesh with the model....

All in all, with approval from rocketman and some MAJOR code cleanup, I'll release the source code for it :)

-Limb
-Limb
User avatar
Phantom
Greenskin
Posts: 106
Joined: Mon Aug 02, 2004 10:28 pm
Location: Helsinki, Finland

Post by Phantom »

Great! Looking very promising indeed.
rocketman
Kobold
Posts: 34
Joined: Wed Sep 01, 2004 6:27 pm

Post by rocketman »

@ limb: ouch man, MAJOR code clean up? bit harsh lol. like to hear what you've got though...
Limb
Gnoblar
Posts: 8
Joined: Wed Aug 06, 2003 8:15 pm

Post by Limb »

Well By major code clean up I mean taking out all the commented out stuff, optimizing, etc etc...

-Limb
-Limb
chooikw
Kobold
Posts: 32
Joined: Mon Jun 28, 2004 3:58 pm
Contact:

Post by chooikw »

Wow! Your demo looks awesome! This will be another great physics choice beside ogreode,ogretok and newton :P
Game programming is fun!
Slicky
Bronze Sponsor
Bronze Sponsor
Posts: 614
Joined: Mon Apr 14, 2003 11:48 pm
Location: Was LA now France
x 25

Post by Slicky »

Looks very cool. I haven't tried any demos yet. Only problem I see is the license not being as flexible as some other physics engines.
User avatar
Emmeran
Goblin
Posts: 272
Joined: Wed Jun 02, 2004 11:47 am
Location: Erlangen
Contact:

Post by Emmeran »

That's really cool!

But I'm missing a balancing demo :-D
pinsa
Gnoblar
Posts: 9
Joined: Thu Sep 16, 2004 6:13 pm

Post by pinsa »

How mach the NovodeX commercial lisence cost?
I send a E-mail to him one week ago, but not receive a revert.
Image
rocketman
Kobold
Posts: 34
Joined: Wed Sep 01, 2004 6:27 pm

Post by rocketman »

@pinsa. Before they released the free non-commercial license it cost you $100 for a fully licensed sdk that was tied to one machine. I would guess that it would still cost about the same now. If you are looking at a shareware release or something small it would be kind of rude of them to charge anything more.
dobbs
Gnoblar
Posts: 6
Joined: Mon Jul 19, 2004 6:23 pm

THANK YOU

Post by dobbs »

I can't say thanks enough for nogredex. Just started checking it out yesterday and I'm already jumping in and prototyping an idea I've been kicking around for a while.
pinsa
Gnoblar
Posts: 9
Joined: Thu Sep 16, 2004 6:13 pm

Post by pinsa »

thanks!
Image
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
Contact:

Post by sinbad »

@rocketman: do you want to put this in the ogreaddons CVS sometime? I think it would make a good addition.
Post Reply