Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Showstopper bug in DarkPhysics - can't finish my game. When's the update?

Author
Message
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 21st Nov 2006 09:04 Edited at: 21st Nov 2006 09:06
This bug is a showstopper for my project.

phy make rigid body static mesh

does't work the same as all of the rest of the Dark Physics make commands.

There are two (related) problems with it that I've run into so far (and probably more):

1) If you create a static mesh and try to move it into position the visual object doesn't follow. So in other words, the physics 'shape' moves into position correctly, but you can't see it there. Balls will bounce off of your mesh in the spot it is supposed to be, but you won't be able to see it unless you move your dark basic visual representation there manually (all the other commands handle moving your visual representation of the physics object for you as they should... I can't imagine this would be by design)

2) Worse yet is rotation. You can issue the phy set rigid body rotation command and it will change the orientation of the physics object in the simulation, but not the visual. And there is nothing you can do to work-around this part of the bug. With the positioning problem, at least you can call position object and move your visual to line up with the static mesh, but calling rotate object has no effect, and the visual maintains a rotation of 0, 0, 0 (the engine is controlling the rotation of the visual and it can't be rotated by you at all). This is what is making it impossible for me to finish my project (before Christmas! Let alone now with time for Chritmas sales! (Yes I get the most sales during December because they all come to my site to see if there is a new vrChristmas screensaver.)) since this makes pieces of my simulation that are rotated in the physics sim and not on the screen. Please fix this or at least provide some sort of work-around so I can ship.

I would imagine this would be an easy fix to the library. If it were the other way around (the physics mesh not moving or rotating) then perhaps it would be harder. But this looks like it was just an un-tested oversight. Can you guys please fix this and give us an update?

Please don't just say something like "Why not just save your .x file with it rotated and moved into position already?". The reason I cannot do that is because my game revolves around an editor. The user is given the ability to move and rotate objects where they want them to be, and I can't just limit it to boxes, spheres and capsules. And most need to be static meshes (I have plenty of boxes and capsules but I really can't finish without static meshes).

Thanks, and looking forward to a fix to this hopefully very soon!
-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --
Syncaidius
18
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 21st Nov 2006 09:29
Those arn't bugs. The reason it is called a 'Static Mesh' is becuase it isn't supposed to be movable.

You are supposed to move the visual object into place (using DBP commands) before you turn it into a static mesh.

Here how not to use the phy make rigid body static mesh command:


Heres how the above code should be written:


If you really do want to try and move a static object once it has been created, good luck, because this isn't supposed to happen. Static objects DO NOT move.

You should try using Dynamic Meshes, Dynamic Convex objects or kinetic objects. Kinetic objects react like static objects (i.e. gravity and other forces do not effect them), but they can be rotated and positioned.

Hope this helps.

BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Nov 2006 10:43
Just to give you a second opinion, DBking is right

By the way, I looked at your site, the screen shots look quite nice. But when I tried to download "Loving Missiles", the zip file was corrupt.



Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 21st Nov 2006 10:59 Edited at: 21st Nov 2006 11:02
@VRMan3D

As DBking pointed out, static meshes aren't supposed to be moved. And since you already have the intention to move your objects, the best way to proceed (although may require more resources) is to set-up your object as dynamic and then set it as a kinematic object. This will mean that the object will behave like a static one but still be moveable.

@DBking

Quote: "
Heres how the above code should be written:


"


In theory it is supposed to work like that, and in this case, this works perfectly as you are using DBP primitives. Once you start loading external files, the results are unpredictable. Take a look at the example found at the end of this thread.

Edit: Took too long to type, Batvink is also right

Home computers are being called upon to perform many new functions, including the consumption of homework formerly eaten by the dog.
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 21st Nov 2006 20:48
Hey guys, thanks for the replies.

Yes that's fine (although dumb and lazy on TGC's part not to let you move a static physics object - every other physics library (INCLUDING THE AGEIA SDK) lets you move a static mesh around - the point is they are static so they won't get whacked out of position by a dynamic object, and for keeping the sim fast) if you have to delete then re-create static meshes to move them, fine. HOWEVER, there is a BUG with rotation.

YOU CANNOT CREATE A STATIC MESH FROM AN OBJECT THAT YOU LOAD, ***THEN ROTATE!***(before creating the physics object = your suggestions) The visual representation does not ever rotate with the physical object. It stays locked at a rotation of 0,0,0. Not to mention it also screws up positioning (All the others work fine, box, sphere, capsule, static mesh is bugged). YES THIS IS A BUG, I UNDERSTAND WHAT STATIC MEANS, and this is not so much a moving issue. I DO INDEED create, move and rotate my objects BEFORE calling phy make rigid body static mesh, but the position and rotation is ignored. The visual position can be fixed by calling good ol' POSITION OBJECT afterwards but the rotation bug cannot be worked around by calling ROTATE OBJECT (nor phy set rigid body rotation which I understand you are saying is not the way to go once you've created it, I can live with that by destroying and re-creating the static mesh after moving it. But BECAUSE OF THIS ROTATION BUG it's a show stopper.)

The only other thing I can think of that might be different about my program is that I 'clone' objects before creating the physical version. I guess I will have to make yet another example to demonstrate this difficult to understand and confusing BUG.

Anyway, there is already AN EXAMPLE IN THIS FORUM in another thread referring to the same bugs I am. Check this link: http://forum.thegamecreators.com/?m=forum_view&t=93185&b=30

Sorry to sound upset but this shouldn't be this way - it is a bug (the rotation part) and not being able to move static objects is really a cop-out on TGC's part if you ask me. This is not a complex thing for a physics engine to do.

Thanks for the replies, but perhaps you will all understand better when I post a new example (which I will start working on now)

Best regards,
-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Nov 2006 21:18
Quote: "the point is they are static so they won't get whacked out of position by a dynamic object"


No, the point of a static object is that it can be highly optimised, becaue it will never move. TGC haven't copped out, they have provided you with kinematic objects which do exactly what you want.

I've used Newton, and that doesn't use unstatic static objects either. In fact it makes optimised collision trees, which make them impossible to move.



VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 21st Nov 2006 21:27
Oh and thank you for pointing out that my zip file is corrupt BatVink. It works fine here, but perhaps that's because I used WinRar to make it instead of WinZip. I'll create a SFX of it.

And yes, you're right about Newton (I've used it lots also and have written custom collision tree generators and I shouldn't have said that without re-checking and thinking about it a little longer. Still, how hard can it be to just move a static?). And like I said I can live with that, but there is still a bug with PHY MAKE RIGID BODY STATIC MESH. Pre-rotating an object doesn't work if you make a static mesh of it - this part is the showstopper for me.I will look into kinematic stuff again, but there is no 'mesh' type as far as I recall, only 'convex' which is quite limited (say as compared with Newton).

Best regards,
-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 21st Nov 2006 21:32
VRman3D is correct in saying there is a bug, a very big bug. Its a show-stopper. I've worked around it with my compo entry but I had to make 4 seperate files with position, and rotation pre-calculated before. Which means that my file went from only 1 resourse .x to 4 .x files. You see the point now><><<>>><>><<><><.....The bottom line is this is a very serious bug. Show-stopper indeed.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Nov 2006 21:46
Your problem must be elsewhere. Attached is a quick test I made. It loads 4 objects and rotates them by 90 degrees so they all face different directions. As you can see, the balls fall and come to a rest exactly where you would expect them to, wrapped around the objects.



Attachments

Login to view attachments
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Nov 2006 21:47 Edited at: 21st Nov 2006 21:50
And here is the screenshot

[EDIT] This is with static boxes. If you change to static mesh, it does fail.





Attachments

Login to view attachments
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 21st Nov 2006 21:50
@batvink......I see why you think there is no bug.

You are not doing it properly. You have to use static mesh. your using static box.

Try mesh and you will see it dont work.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Nov 2006 21:51 Edited at: 21st Nov 2006 21:52
yes, I just edited my post above. Once I change to mesh it fails.

Post it in bug reports and feel free to use my example, it's nice and simple to follow. Just remember to change it to mesh!



david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 21st Nov 2006 21:54
this bug hasnt been reported in the bug area but in this area there is about 20+ bugs that have been reported.

http://forum.thegamecreators.com/?m=forum_view&t=92726&b=30
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 22nd Nov 2006 00:20 Edited at: 22nd Nov 2006 00:21
Thanks guys...

I also sent my vrPinballPhactory program to Mike@thegamecreators.com (he's in charge of DarkPhysics) (which I was hoping to ship before December - IT'S PHAST and PHUN and PHULL of PHYSICS! and will probably be a good seller, but I really need to be able to use meshes for things like ramps, tubes, etc.) . At first he said the same thing that all of you said - no bug, VRMan you are doing it wrong... (which is frustrating, but it's a difficult to understand bug which makes everyone jump to conclusions... Man I love parenthetical statements!). But I think he will see the light after trying out my pinball game where the bug is extremely easy to see visually.

Thanks for the example BatVink.

I will also post this info on the Bugs thread. Good call I missed that one.

Best regards, and


-=VRMan=-

World Famous 3D Screensavers
-- http://www.vrman3d.com --
Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Nov 2006 03:29
I don't see this as a bug. I don't see the need to rotate static meshes. A static mesh is typically the entire level. If you want a different view, then reposition the camera. If you want smaller static objects, use static rigid bodies. Static meshes are optimized, and tampering would just slow them down.


Come see the WIP!
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 22nd Nov 2006 04:31
Quote: "If you want smaller static objects, use static rigid bodies"


Static rigid bodies are exactly what we are talking about. I think you meant to make a distinction between static meshes and the other shapes such as boxes, spheres and capsules. And yes 'typically' static mesh objects are used by some for 'entire levels' but why be so narrow minded? What if you wanted to use static rigid bodies for trees to gain the optimization that 'static' gives you. Should we be required to make 360 different versions of the tree ahead of time so that we can vary the angles of the tree? This is what computers are for - you write code (in this case TGC writes this code) and the computer does the work for you so we don't have to save out 360 different tree models.

Why are you rooting for a limited physics engine? Allowing you to pre-rotate an object before creating the static mesh will not add 20megs to your executable or make it run slow, and it wouldn't make static mesh game levels run any slower. It would be the same pre-calculated optimized static mesh pointed in a different direction.

I hope you give this more thought Mr. Curtis II, there are thousands of uses for static objects in a physics engine, not just levels.

Does anyone else agree or am I completely losing my mind?

World Famous 3D Screensavers
-- http://www.vrman3d.com --
Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Nov 2006 05:06
You don't need to patronize or insult me VRMan3D. I accept this as a limitation of the optimization of static meshes. I know a good deal about using physics in games.

I wouldn't make every tree into a static mesh. The polygon counts would be obscene and pointless for a physics simulation. You don't need mesh collisions with all of the leaf plains.

You could simply use a static convex rigid body. What exactly is wrong with this solution? They rotate just fine, and create accurate representations of the physics body. They are much more efficient than concave meshes.

I think that you need to study the reasons behind these methods before you start preaching to everyone about how things should be done.


Come see the WIP!
Mike Johnson
TGC Developer
21
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 22nd Nov 2006 13:14
I made a small change to the DLL and fixed the program that BatVink posted. I believe this may also sort out VRMan3Ds problem as well. I have sent a DLL to try out and we'll see how we get on.
VRMan3D
18
Years of Service
User Offline
Joined: 3rd Apr 2005
Location: New England
Posted: 22nd Nov 2006 18:48
I certainly wasn't trying to patronize you or put you down in any way Cash, and I am sorry if you feel that way. I am just excited about Dark Physics and passionate about seeing it move forward to it's greatest potential (because I have a heap of projects lined up and in the works that I'm switching over from Newton, and I want DP to be all that it can be.) and your comment scared me that this was going to become a mediocre library when it can be so much.

Once again, I didn't mean to offend, I was only making a point (yes it's obvious no one in his right mind would create 360 trees but that was the point.) Sorry bud.

World Famous 3D Screensavers
-- http://www.vrman3d.com --
Cash Curtis II
18
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 22nd Nov 2006 20:01 Edited at: 22nd Nov 2006 20:02
It's cool. My point remains about how I'd create the trees. Lots of static meshes would not be a good way to go about that, concave collision bodies are much more CPU intensive than convex ones and most things only require convex bodies (like the trees).


Come see the WIP!

Login to post a reply

Server time is: 2024-02-25 03:29:31
Your offset time is: 2024-02-25 03:29:31