3rd Party Models/Media Chat / How to get the physics correct for a custom model?

Author
Message
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Feb 2014 15:50
So I have been playing around with the stock propane tanks. Setting up 30 or 40 of them and shooting them with the shotgun. Watching them fly away and spin and collide with each other. Very cool like a duck shoot.



So I wanted to make some beach balls. Made a sphere in model program, set the collision to what used to be a sphere (collision=4), set the weight and the friction to what the propane take has in it fpe file.



Run the map and shoot the beach balls and they don't move. Shot the propane tanks towards the beach balls and I am noticing that the propane tanks bounce off my beach ball in the space around the beach ball like a square encased around them. Also tried removing the collision part out of the fpe file like the propane tank. Same thing, they don't react to the force of the shotgun.



OK. So my question. How to get my beach balls to have the same reaction as the propane tanks. I know that I need to export the LOD objects with the ball, but do I need to export a sphere for the collision shape I want also, and if so does it need to have some special name? Thanks.

J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 3rd Feb 2014 16:03
well this is what i got for my balls





It needs some fine tuning, a ball should receive force when you walk over it or if you step on it, using my settings above you will see it is almost behaving the way it should.

http://j0linar.carbonmade.com/
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 3rd Feb 2014 16:08
Almost, but not like the propane tanks you can shoot for hundreds of feet. Same with there stock creates.



Using the setting and setting them ridiculously low does not produce the same effects that the stock entities have. And you can see if you shoot an object towards them that the object will bounce off my object in a cube not a sphere.

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 4th Feb 2014 02:39 Edited at: 4th Feb 2014 06:40
OK. So after some further investigation as to why I cannot shoot my custom object across the landscape, like a stock object.:



Finding:

Complete solution unknown as of yet.



What I do know is that when I import a stock object xfile into my model program I see the 3 LOD models together, same as mine.



So I renamed the stock xfile to the name of my object and cleared the dbo and bin files and retested a map. I could shoot the object all over the landscape.



Conclusion is that some how the settings for this are embedded into the mesh somehow.



If you guys at TGC could be so nice as to spill the beans on how you are achieving this, that would be most appreciated. Thanks.



Video of what happens:





Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 4th Feb 2014 11:31
You know pretty soon you won't be able to make tests like this using propane tanks. Why? Because they will simply explode once shot with a shotgun lol

Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 5th Feb 2014 01:23
http://fpscreator.thegamecreators.com/wordpress/?p=285



Well this would explain it all.

J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 5th Feb 2014 01:29
well Myke

you can give me your model packade up and i will check whats goign on, if you wish.

http://j0linar.blogspot.co.at/
PM
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 5th Feb 2014 01:42 Edited at: 5th Feb 2014 02:24
Maybe sphere collision for dynamic objects isn't in there yet and it's defaulting to box and messing with the physics.

I don't see any collision settings in stock fpe's all the same so they are all likely defaulting to box and your not noticing it because of scale..



If collision settings can be made using a bunch of boxes then that's ok for some objects, but we are going to run into issues with some model shapes eventually. Spheres being a prime example I dont want to make a bunch of buildings only to find I can't have proper collision with a dome.From what I see though it offers options for collision but I wouldn't have a clue what these will be.

Though I doubt they intend to remove poly collision these additional collision envelopes should be included in any editor/importer, would be nice to get a visual on reduced collision for example and control over the percentage.
Spotaru
Game Guru Backer
12
Years of Service
User Offline
Joined: 6th Nov 2012
Location:
Posted: 5th Feb 2014 02:28 Edited at: 5th Feb 2014 02:53
Not sure if this works in beta 5 as I have not even bothered to install it after seeing all the bug reports. It does work in 4.5 though. Don't give the model a collision mode at all. If there is an entry for collision in the fpe delete the whole line. Also make sure that defaultstatic = 0 and not 1 The physics settings seem to be set up automatically the first time you use the model. I have not played with the weight settings yet but it seems to guess how heavy the object is based on size. I also have not tested it on a sphere shaped object yet only boxes so may still not work.







EDIT: I have gone back and tested with a ball that I made and it indeed looks as if it is trying to use box or cylindrical collision on the sphere. Changing the settings makes no difference.
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 5th Feb 2014 06:40
Actually the collision setting for the fpe file seem to be working. I can set collision to 4 (sphere) and the balls roll down the hill much easier the with collision 0 or 1.



What I seem to be missing, and the news letter in the above link confirms to me, that the tool they are developing will attach the proper physics collision to allow us to be able to shot our custom model across the terrain like the boxes and propane tank, which obviously have been run thru this tool to act proper in the engine.



I used the stock mesh x file (propane Tank.x) in my fpe file and it shot across the terrain no problem. So I am sure that when this tool is release towards the end of the month, that it will solve my issue with physics.

J0linar
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 3rd Feb 2010
Location: Vienna, AT
Posted: 6th Feb 2014 02:41 Edited at: 6th Feb 2014 02:41
Question is if it will be released by teh end of teh month,

since focus once more shifted towards stability and it looks like there wont be any new features seen before the core is solid.



I might be even wrong regarding the features but hey thats why we are here, to discuss it.



But i would be glad as well if we could get that tool by the end of the month, especially since i plan to get soem assets into teh store and currently without being able to provide proepr physics settings for the models - there is no sense to publish models just yet.

http://j0linar.blogspot.co.at/
PM
Pirate Myke
Forum Support
14
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 6th Feb 2014 05:06
The tool will be essential in assigning proper physic shapes for the engine. I need to troll the internet and see what the sdk says. What ever time it takes to complete is going to be what it is. But I am willing to try out a beta version of it. It must have some functionality as the stock objects seem to be working relatively well a few at a time.



Plus it will setup your other stuff proper for collision of other types, when complete. So it will be a great asset. By the pictures posted in the news letter it looks like it is meant to handle all the mesh imports, including characters and assembling building.



I personally don't mind testing stuff that is new. It gives me insight as to what is going on in the engine.



As far as getting stuff into the store. as long as you don't want to shoot it across the map static object and other dynamic non animated stuff can be published. Maybe you might need to update a texture or something later when the engine is more complete.



I believe that it is headed in a good direction. Find out where the problem spots are early for essential modules for a basic all around function and then optimize to make it all work the best. I have an older quad core machine and a newer Nvidia 660 graphics card and I am getting 40 - 60 fps in most areas of mesh and terrain. Of course I can load it up till it stops. I have not used a program yet that I could not max out. My only bog down is when I start messing with the physics and dropping a lot of objects. But I am sure that will get worked out with the new tool.

Login to post a reply

Server time is: 2024-11-24 00:16:56
Your offset time is: 2024-11-24 00:16:56