Product Chat / The relation between static/ dynamic and physics

Author
Message
rekjl
9
Years of Service
User Offline
Joined: 30th May 2014
Location: Somewhere in Midgar
Posted: 5th Jun 2014 16:28
Hi guys, and sorry if this is a real noob question. Please correct me if I am wrong, but is this correct?

Static and Dynamic refers to whether or not the object can be moved or not when interacting with a physical force. Physics predicts how these objects react when interacting with a physical force.

Is this true?

I am getting a bit confused as my fps was a solid 30+, I added many props entity on a small table, and when my character continues running up against the small table, I suddenly go to 10fps. I notice that physics is taking a big increment. So I wanted to understand what I should turn off and on to achieve better framerates. For my case, I just want those entities to act like stone, it stops the player from going through it, but the player can't affect it at all.

Windows 7 Home Premium, i7 2600K, Gigabyte GTX560 SOC, SB X-Fi Titanium, 8GB...err...6GB of RAM left....
PM
Uman
GameGuru TGC Backer
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location:
Posted: 5th Jun 2014 21:11 Edited at: 5th Jun 2014 21:13
Static and Dynamic objects : You have it roughly correct there.



To understand it - think of your game engine objects in terms of the real world around you. So walls and or other very dense heavy objects usually cant be moved so you don't need anything related to dynamics turned on for them. Of course you have to use your discretion - a heavy object could also be moveable - a car or a heavy wall even if you bulldoze it or blow it up





On the other hand something may be heavy and not able to be moved but may have a moveable part.



Examples of dynamic objects may be living organic things or moveable mechanical or electrically operated equipment and so on just as in the real world. e.g, a butterfly or a helicopter. Very different sizes and weights, one organic, one not and with different movement characteristics but both dynamic.



Dynamic objects which move can have these very different characteristics and as well as being affected by Physics and weight they may be affected also by friction, resistances, gravity and other forces around them - e.g. wind, collision and so on.



Remember that at the moment in Reloaded Physics is not yet anywhere near fully in place leave alone any specific additional work that may eventually be included relating to the other forces of gravity and so on and this will limit what you can do currently to a large degree.



Two examples here that are somewhat opposites might be a heavy light fitting which might fall on your head if it is dynamic and cant be held up at the height you want it and falls to the ground. A balloon which may be very light and does not need to fall downwards under most circumstances but would usually float away endlessly upwards - if outdoors and you have wind and other physics forces to carry it away.



You don't have wind so cant easily have it drift in numerous directions at once. e.g. upwards to the left and so on.



We are a bit short of such physics and other associated real world properties for all kinds of objects at the moment.



As to your performance issues not sure but there are many ways to keep the performance at a high currently and not using too many dynamic objects may be one of them. Firstly if you are having an issue with performance then try and start off with a high level before you start adding too many things and then add things slowly and test to see how they impact.



If you need to save/boot performance then turn down whatever quality settings are necessary to get it back up.



As far as I am aware running into your table may or may not cause a sudden drop in being Physics issue related I don't know personally and not experienced anything like that. If you do then don't keep running into your table. Place things in more than one location if they are collect-able to avoid the issue.



If you want the entities not to be collectable make them static and immoveable. You may have to change any script a collectable/dynamic object has to a default static object script. Just be careful what you are doing and don't mess up your default objects install.



Hope that helps a little.



rekjl
9
Years of Service
User Offline
Joined: 30th May 2014
Location: Somewhere in Midgar
Posted: 6th Jun 2014 03:48
Thanks for the detailed information Uman. Haha ya, I could stop running into the tables, but I wanted to understand how FPSCR engine works and how objects interact with each other in the engine. Also, this game I am creating is for the competition, so I am trying my best to make it as consistent as possible.

So would I be correct in saying that since my entities are static, I can turn physics for those entities off? I have a table with a full compliments of entities on top of it, computers and stuffs, about 10 on the table. Initially I thought it was going slow because when my player pushes on the table, the engine was calculating the physics for how all the entities were interacting with one another due to my player's push. So I set all the entities to static and turned their physics off, even the table. But I still get the same results even with physics turned off for those entities, which is why I am a bit confused right now. The physics tab goes from mid single digits to 50+ when I collide with the table. There is a chair in front of the table, and if I collide with it, physics goes to 60+, I am thinking that it must be a additive physics problem as each entity is added to the other, but I have turned all the physics off for those entities so I am now a bit confused.

Windows 7 Home Premium, i7 2600K, Gigabyte GTX560 SOC, SB X-Fi Titanium, 8GB...err...6GB of RAM left....
PM
rekjl
9
Years of Service
User Offline
Joined: 30th May 2014
Location: Somewhere in Midgar
Posted: 6th Jun 2014 09:50
Uman, after some testing I found a few things.

1. Even if I turn the physics for the entity off, it shows that it is still being calculated.

2. The spike in physics calculation is not an additive problem, but the entity model problem. Now that I've removed the chairs (Legacy pack, modern prop, office seats), the physics calculation went down hugely. With the chairs, I was getting around 60 to 70 physics calculation. Without them, I get in the low 10s. Could this be an issue with the model itself, or a bug?

By just removing the chairs, and a couple of other entities that were leading to high physics calculations(not sure if it is because of it being high polygon), I am not getting solid mid 20s fps.

Windows 7 Home Premium, i7 2600K, Gigabyte GTX560 SOC, SB X-Fi Titanium, 8GB...err...6GB of RAM left....
PM
unfamillia
Forum Support
13
Years of Service
User Offline
Joined: 26th Jul 2010
Location: Preston, Lancashire
Posted: 1st Jul 2014 14:14
if you don't need to move the table or go underneath it, just change the collisionmode in the FPE to =0. That will give it a solid block of collision around it and will remove the lag your are seeing when you get too close.

This seems to be an issue when certain objects have polygon collision set.

Cheers

Jay.

Login to post a reply

Server time is: 2024-04-28 11:11:24
Your offset time is: 2024-04-28 11:11:24