Chairborne 2594 Posted April 26, 2014 I don't know if this is something you already knew but i decided to write this anyway in case someone (like me) missed it before. I actually must give credits to Gnat (see: http://forums.bistudio.com/showthread.php?163499-Weight-distribution-Balance-model&p=2494432&viewfull=1#post2494432) that got me to look further into it after WEEKS trying to figure it out on my own. So, i was doing some testing earlier, trying to get the old LAV25 to work decently. Despite still behaving in a weird way when on land (it basically has no weight, if you tried some of the old vehicles with the AllInArma mod you know what i'm talking about), i found out there is a "quick" workaround to fix the buoyancy when in water. Premise: i still haven't implemented the new Physx ubercool lod so my guess is this works only with the original models with no modifications, i can't guarantee you this might fix the problems you might experience if you made some major modifications or actually got Physx to work correctly. So here it is, all you have to do is go to the Memory Lod and create new vertices in order to make them look specular. This isn't necessary for every single vertex you have in the memory lod, however balancing them, both left to right and front to back, will help the vehicle stay horizontal and not flip in an insane fashion whenever it should start floating. To make you understand here's a practical example: if you take the A2 sample models and open the LAV25, you'll notice the memory points for the "pos driver"/"pos driver dir" on the left side of the vehicle, and you'll also notice that when you use it in game with no modifications, the vehicle will ALWAYS roll over on its left side when it starts floating. Now if you add (or copy/paste) new vertices specular to those mentioned above to the RIGHT side of the vehicle, you'll notice that in game the vehicle will now behave differently. Eventually by moving them around and creating a few more you'll get the vehicle to stabilize and not roll over while in water. I still don't understand how memory lod's vertices should affect buoyancy of a vehicle, given i don't have much experience in modeling, but they do. As i said before, however, this won't affect the vehicle behavior on land, meaning that it will still roll over easily or stop when hitting a bush or a sidewalk, since this problem is common to all A2 vehicles i'm guessing the only way to fix this is by getting Physx to work correctly. I hope this helps, have a nice day! :rolleyes: Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 10, 2014 Some more indepth explanation for the LOD/weight distribution relation would be quite useful as I noticed something similar a while back when I made a motorcycle that always tilted to left while driven and through trial and error I finally figured it was a some temp polygons placed on the left side on the model in a forgotten edit LOD that caused the bike to tilt. After deleting it all was well. Share this post Link to post Share on other sites
p1nga 23 Posted May 11, 2014 (edited) Some more indepth explanation for the LOD/weight distribution relation would be quite useful as I noticed something similar a while back when I made a motorcycle that always tilted to left while driven and through trial and error I finally figured it was a some temp polygons placed on the left side on the model in a forgotten edit LOD that caused the bike to tilt. After deleting it all was well. That is indeed strange, i can only assume that you were not Binarising the model Working LOD for editing. It is removed during binarization. (UV set unfold, additional shadow volume levels...) The whole editing Memory Point LOD to fix issues with weighting and roll issues does seem abit strange, i would assume that it would have something to do with a missing Buoyancy LOD. If you are going to the trouble to try and fix it by adding extra unnecessary memory points, it is almost just as simple to actually get the Geometry and PhysX and Buoyancy LODS working properly. My Australian Army ASLAV is a modified ARMA 2 LAV25, i simply took the Geometry LOD from ARMA 2 and used it for all the other special LODS, as seen in this Gallery http://imgur.com/a/EIkTX#0 The Geometry LOD Is simply the ARMA 2 LAV25 Geometry LOD with a few slight changes. First of all i selected all vertices and set the weight from 13,000 (or what ever it was) to 500. I then added 4 boxes one each at the Front, Back, Left and Right edge of the vehicle and then added weight to each box to control the Center Of Gravity and Overall Weight, so the actual vehicle geometry weighs only 500kg, while the other 12,500 Kg comes from the 4 Boxes, this allows you to control the distribution a lot easier and then it was a matter of getting in game and having a look and adjusting the weights of each box until a suitable balance was found, and i had to do this again when the PhysX Suspension was setup because they work hand in hand. You can see the box at the front has a lot more mass than the other 3, it simulates the weight of the engine in the front and the suspension then also had to be adjusted so that the front wheels were not over compressed by the weight. The left and right boxes should be the exact same distance from the center and have the same weight which should keep the vehicle stable on that axis. The PhysX LOD For the PhysX LOD it can be as simple as taking the main body of the Geometry LOD, so for the LAV25 that is just the hull with no wheels, i also used the turret as having the turret turned sideways should effect the simulation to some minor degree. The Buoyancy LOD This took the most time to figure out, i started with a straight copy of the PhysX LOD after looking at the Sample Boat BI provide, however i could never get the thing to float no matter what i tried it just sank, i even tried using the Sample Boats Buoyancy LOD scaled to the right size and it still sank like a rock. After lots of experimenting i managed to find that i was able to get it to float by taking the hull from the Geometry LOD and scaling it up by about 25% so that it was slightly larger than the actual vehicle, it was then just a matter of adjusting some corners to get the vehicle to float they exact way you wanted, either front heavy or back heavy. I may consider releasing a stripped down version of the .p3d and configs as a tutorial if it will be of some help to others out there. Edited May 11, 2014 by pastor399 Share this post Link to post Share on other sites
warlord554 2065 Posted May 11, 2014 @pastor399 It would be very useful indeed :) Share this post Link to post Share on other sites
p1nga 23 Posted May 11, 2014 @pastor399It would be very useful indeed :) Ok, im on holidays for 4 months in a couple of weeks so i will get it done before then Share this post Link to post Share on other sites
HorribleGoat 1473 Posted May 16, 2014 That is indeed strange, i can only assume that you were not Binarising the model It was binarized, thats what bugged me. But It happened back with A2 and haven't tinkered with the buoyancy yet so your example would indeed be worth seeing! Share this post Link to post Share on other sites
Chairborne 2594 Posted May 17, 2014 If you are using simulation=carX vertices distribution doesn't affect it, vehicle's behavior should be correct. If you are not, i noticed the mass has only limited influence on vehicle's behavior, particularly when in water. For some reason the engine just ignores mass distribution in Geo LOD and considers vertices in Memory LOD instead. Seeing the benefits of PhysX it's worth abandoning the old simulation anyways, vehicles behave too badly to be enjoyable. A tank can be flipped over by a bush or a minor bump, when in water they tend to roll over for no reason, so on... Share this post Link to post Share on other sites