Look! Some falling boxes!
-
- Kobold
- Posts: 34
- Joined: Wed Sep 01, 2004 6:27 pm
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":
A boring one showing all the joints. From right to left: Spherical, Revolute, Cylindrical, Prismatic, PointOnLine and PointInPlane.
Sort-of cloth sim:
Gave old greenie some hair- who would have known he was really a floppy haired ginga!
Finally a mass car crash:
Im just packing up the code and the exes right now, so watch this space.
First up- a familiar face added to the first demo, as "level 8":
A boring one showing all the joints. From right to left: Spherical, Revolute, Cylindrical, Prismatic, PointOnLine and PointInPlane.
Sort-of cloth sim:
Gave old greenie some hair- who would have known he was really a floppy haired ginga!
Finally a mass car crash:
Im just packing up the code and the exes right now, so watch this space.
-
- Kobold
- Posts: 34
- Joined: Wed Sep 01, 2004 6:27 pm
-
- Kobold
- Posts: 34
- Joined: Wed Sep 01, 2004 6:27 pm
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- ahmedali
- Gnome
- Posts: 302
- Joined: Fri Feb 20, 2004 8:52 pm
- Location: Lahore, Pakistan
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)"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).
- gfm
- Gnoblar
- Posts: 17
- Joined: Mon Oct 11, 2004 7:05 am
- Location: Oregon
- Contact:
sweet demo, compilation errors tho..
these two lines:
in DebugRenderable::everyFrame() are causing compilation errors on my system (VC 7.1, Novodex 2.11, Ogre 0.14.1).
Error is:
Code: Select all
memcpy(vptr+count, vertices.begin(), size * sizeof(Vector3));
memcpy(cptr+count, colours.begin(), size * sizeof(unsigned int));
Error is:
Comment them out and everything works fine..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
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
This is a common issue when going from (older) VC to gcc, too. All it needs (I think) is this:
.. or, alternatively:
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));
Code: Select all
memcpy(vptr+count, &(vertices[0]), size * sizeof(Vector3));
memcpy(cptr+count, &(colours[0]), size * sizeof(unsigned int));
-
- Kobold
- Posts: 34
- Joined: Wed Sep 01, 2004 6:27 pm
@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.
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.
-
- Gnoblar
- Posts: 8
- Joined: Wed Aug 06, 2003 8:15 pm
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
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
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
-
- Kobold
- Posts: 32
- Joined: Mon Jun 28, 2004 3:58 pm
- Contact:
- Emmeran
- Goblin
- Posts: 272
- Joined: Wed Jun 02, 2004 11:47 am
- Location: Erlangen
- Contact:
-
- Kobold
- Posts: 34
- Joined: Wed Sep 01, 2004 6:27 pm
@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.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact: