Announcement

Collapse
No announcement yet.

[OPEN-SOURCE] Machinery Modelling Toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Trcioo View Post

    Results seems to be legit after converting to meters, posting the code (inside the spoiler) in case others pass by this topic looking for the same thing:

     
    Spoiler
    Ohh wait. I think there is a bit of confusion. The unit conversion variable "0.001", is suppose to handle velocity in cm. Area should be calculated in m2. Air density in kg/m^3. Drag coefficient is unitless. I think the wrong value you had before is the area of the cross section as 0.338 is really large, that's like a 65cm diameter shell.

    Basically you either convert all inputs into metric and then multiply results - to get it in cm again (a factor of 100 for Force and 10000 for Torque). Or just use Unit Conversion which was calculated in following way: [kg/m3]*[m^2] -> [kg/cm3]*[cm^2] -> 0.000001 * 10000 = 0.01
    So with Unit Conversion, the output is already in proper UE4 scale for Force calculation, but it's valid only for this specific air drag formula:
    1/2 * Ro * V^2 * S * Cd
    Unit Conversion handles Ro (air density) and S (area) being inputted in meters.

    So keep velocity in cm/s but re-calculate areas in m^2. Ideally you should take into account mass as well. The output of the formula is force. So acceleration will be Force/mass. Basically, heavier projectiles are harder to slowdown by airdrag.
    Last edited by BoredEngineer; 04-26-2018, 09:45 AM.
    Youtube Channel

    Comment


      Originally posted by BoredEngineer View Post

      Ohh wait. I think there is a bit of confusion. The unit conversion variable "0.001", is suppose to handle velocity in cm. Area should be calculated in m2. Air density in kg/m^3. Drag coefficient is unitless. I think the wrong value you had before is the area of the cross section as 0.338 is really large, that's like a 65cm diameter shell.

      Basically you either convert all inputs into metric and then multiply results - to get it in cm again (a factor of 100 for Force and 10000 for Torque). Or just use Unit Conversion which was calculated in following way: [kg/m3]*[m^2] -> [kg/cm3]*[cm^2] -> 0.000001 * 10000 = 0.01
      So with Unit Conversion, the output is already in proper UE4 scale for Force calculation, but it's valid only for this specific air drag formula:
      1/2 * Ro * V^2 * S * Cd
      Unit Conversion handles Ro (air density) and S (area) being inputted in meters.

      So keep velocity in cm/s but re-calculate areas in m^2. Ideally you should take into account mass as well. The output of the formula is force. So acceleration will be Force/mass. Basically, heavier projectiles are harder to slowdown by airdrag.
      You're right, it was the diameter in inches not the area, the area is 0.00231. It is getting way too much force now, initial speed is 830m/s. I think I'm getting the unit conversion wrong, do you mind in take a look in the project? it's a 2MB size with 1 projectile blueprint inside: google drive link.


      Click image for larger version

Name:	Untitled-4.png
Views:	65
Size:	279.7 KB
ID:	1467353


      Comment


        Originally posted by Trcioo View Post

        You're right, it was the diameter in inches not the area, the area is 0.00231. It is getting way too much force now, initial speed is 830m/s. I think I'm getting the unit conversion wrong, do you mind in take a look in the project? it's a 2MB size with 1 projectile blueprint inside: google drive link.


        Click image for larger version

Name:	Untitled-4.png
Views:	65
Size:	279.7 KB
ID:	1467353

        Can’t check it now, but take into account that ballistic coefficient doesn’t equal air drag coefficient. They are different. Don’t know conversion but formulas at the beginning can be helpful:
        https://en.m.wikipedia.org/wiki/Ballistic_coefficient
        Youtube Channel

        Comment


          Actually I was wrong, if your bullet can reach transsonic speeds then air drag equation won’t work near M1. Need a different formula to cover transsonic/supersonic parts.
          It appears that this is the reason why ballistic coefficient is used in the first place and it changes with speed.
          Last edited by BoredEngineer; 04-27-2018, 03:30 AM.
          Youtube Channel

          Comment


            Originally posted by BoredEngineer View Post

            Can’t check it now, but take into account that ballistic coefficient doesn’t equal air drag coefficient. They are different. Don’t know conversion but formulas at the beginning can be helpful:
            https://en.m.wikipedia.org/wiki/Ballistic_coefficient
            thank you, this page shows a different perspective, it's helping a lot.

            Comment


              Hi everyone.
              First, thanks very much for this amazing plugin. It’s very helpful.
              Now I’m doing the final computer degree project for university and I chose to make a videogame, because I want to learn how work and are built. Then, the best way to do it, is making one.

              I need some suggestion about the actual progress… I’m a beginner in Unreal Engine and I’m sure that I’m doing something wrong or not quite correct. Of course, I’ll put my project open source for everyone.

              The project objectives are:
              - Make 2 tanks ([DONE] T34-85, and Tiger I).
              - [In Progress] Make a very simple ballistics system for damage system.
              - Make a simple multiplayer (4 vs 4) or (8 vs 8) rounds, that the team must to destroy the enemies or capture the base.

              I have based on the World of Tanks and WarThunder games.

              Video Link: https://youtu.be/T4CWC1DEJNM

              Source: https://github.com/elGears/FDPTank

              Thanks very much, yours sincerely;
              elGears
               
              Last edited by el_Yuma; 05-01-2018, 08:07 AM.

              Comment


                Originally posted by elBarri View Post
                First of all, it's unethical to swap the original license into GPL and hide the original MIT license if you just make small changes to the project (it's pretty clear that BoredEngineer wanted this work public and usable for all with the license type he originally picked for the plugin). Please use the original license type and add your own copyright note for the changes instead if you want to protect your work.

                Secondly, you can't use GPL with UE4 at all, as it clashes with UE4 license itself.

                https://github.com/0lento/UnrealEngine (GameWorks tech merges & upgrades, UE4 physics modifications)

                Comment


                  Originally posted by 0lento View Post
                  First of all, it's unethical to swap the original license into GPL and hide the original MIT license if you just make small changes to the project (it's pretty clear that BoredEngineer wanted this work public and usable for all with the license type he originally picked for the plugin). Please use the original license type and add your own copyright note for the changes instead if you want to protect your work.

                  Secondly, you can't use GPL with UE4 at all, as it clashes with UE4 license itself.
                  Ohh, sorry. It's a mistake. I'm not familiar making GitHub Projects. Thanks.

                  Comment


                    Originally posted by elBarri View Post

                    Ohh, sorry. It's a mistake. I'm not familiar making GitHub Projects. Thanks.
                    I guess GitHub added license automatically. But do follow 0lento suggestions - if you want to host your own variant of project, add additional license. Technically you don't need MMT Content as it's a project with examples . You can migrate parts that you need and include MMT Plugin as that one is necessary to work with physics sub-stepping in easy manner.
                    Youtube Channel

                    Comment


                      Click image for larger version

Name:	image_138409.jpg
Views:	77
Size:	305.0 KB
ID:	1478872

                      BoredEngineer
                      Брат Люк, как сделать анимацию движения танка и снять на камеру в Секвенсоре?
                      Надо чтобы танк въезжал в кадр и останавливался, как на картинке.


                      Мы делаем документальный патриотический некоммерческий фильм о Подольских курсантах.
                      Спаси тебя Христос.


                      Brother Luke, how to make an animation of the movement of the tank and shoot on camera in the Sequencer?
                      It is necessary that the tank drove into the frame and stopped, as in the picture.


                      We are doing a Patriotic non-profit documentary film about Podolsk cadets.
                      Christ save you.
                      Last edited by jorajban; 05-22-2018, 02:43 AM.

                      Comment


                        Updated plugin and content to 4.20.2.
                        Youtube Channel

                        Comment


                          Forum doesn't send notifications when it's your first post. I've noticed your post just now.

                          To answer your question. I don't know how physics interaction can be recorded, beyond some basic stuff like movement of an actor. To record tank movement properly, number of things need to be done:
                          1) Suspension movement have to be captured, so that track spline can bend properly
                          2) Track rotation position need to be recorded and "played"
                          3) Movement and rotation of the tank root body can be easily recorded with sequencer

                          I've tried sequencer for a different type of the vehicle and we could record only actor's rotation/position and state of the skeletal meshes. So suspension animation would have to be done using skeletal mesh to record it. But such recording won't capture movement of the tracks. So it's not possible out of the box.
                          Youtube Channel

                          Comment


                            Hello! First of all, Big Thank You to BoredEngineer for this giant work done so far, and shared. It is mind blowing. I started to dig UE4 a year ago, and "my thing" is Sci-Fi aerial combat (i will post youtube link at the end of post). I learn, I experiment, I have some pleasant results with arcade-ish flying AI. Recently, I started to to look in PIDs direction (so far i have used just "fake" flying and a bit physics). I know there is a PID component in MMT too, I did read on page 2 here, I also have tried downloaded project too, of course. I would like to ask some educational question, could Author or anyone who knows this matter, direct me please in just couple of sentences, what principles i should try to drive PID by "AI", and by AI for now i mean simple "go there" commands. I would be interested to try PID for both flying and ground vehicles. What will be right UE4 nodes to apply here, to point "PID arrow" to whereever my AI logic says so?
                            Thank You in advance!
                            My UE4 videos here: https://www.youtube.com/user/Latvian3Dman/videos

                            Comment


                              Originally posted by Thunder_Owl View Post
                              Hello! First of all, Big Thank You to BoredEngineer for this giant work done so far, and shared. It is mind blowing. I started to dig UE4 a year ago, and "my thing" is Sci-Fi aerial combat (i will post youtube link at the end of post). I learn, I experiment, I have some pleasant results with arcade-ish flying AI. Recently, I started to to look in PIDs direction (so far i have used just "fake" flying and a bit physics). I know there is a PID component in MMT too, I did read on page 2 here, I also have tried downloaded project too, of course. I would like to ask some educational question, could Author or anyone who knows this matter, direct me please in just couple of sentences, what principles i should try to drive PID by "AI", and by AI for now i mean simple "go there" commands. I would be interested to try PID for both flying and ground vehicles. What will be right UE4 nodes to apply here, to point "PID arrow" to whereever my AI logic says so?
                              Thank You in advance!
                              My UE4 videos here: https://www.youtube.com/user/Latvian3Dman/videos
                              PID controller is a very simple device described by a few math operations. It might be too simple to drive any sort of AI. One of the typical PID controllers is a thermostat in refrigerator that enables cooler when temperature goes higher than some threshold value. It just measures the difference between current and desired temperature (this value is called error) then does few math operations on this value and outputs "control signal", which is again just a value. For cooler it can be an actual electric current that enables it.
                              Just PID on it's own is not very useful, the challenge is in understanding how to measure error and what to do with the control signal, when you solve those, the PID code is trivial. The other problem is that parameters P, D and I are not intuitive, they don't really have any relation to a real world and not transferable from one device to another. They are very low level too which means that only very basic behavior can be done using them. If you drop integral (I in PID) coefficient then it becomes a spring - how much AI can you do with a spring?

                              For AI controlling physics based vehicles you can look into example of "Steering Behaviors" it's a collection of simple algorithms, that are kind of like PID controller but made for more specific purpose:
                              https://www.red3d.com/cwr/steer/gdc99/
                              https://www.red3d.com/cwr/steer/
                              https://gamedevelopment.tutsplus.com...-gamedev-12732
                              Just google it if you need more articles or other examples.
                              Youtube Channel

                              Comment


                                Thank You for this insight, initial explanation! Appreciated.

                                Comment

                                Working...
                                X