WIP: Apache Helicopter Attack Sequence - A PySwarm V0.4 Study

2

Comments

  • FractalDimensiaFractalDimensia Posts: 0
    edited November 2013

    PhilW said:
    I like the idea - you can do so much to change the feel of a piece with different music! I still think that for a "production", you want to avoid having each shot lasting too long. And one of the benefits of doing the pre-render production that you are going through is so you only need to render what will actually be used. There is usually very little in an animation that gets fully produced and then ends up not being used, for this very reason.

    Agreed! Interesting enough, I never really much thought of this until now. I am beginning to see how challenging it is for film makers (directors) to create results without excessive waste. I may also go back to the storyboarding step and rescript it now that I have a more solid foundation of what I want to produce.

    The project began simply as a PySwarm demo. I had not considered it to have much merit beyond that. Before I invest time past the PySwarm proof-of-concept stage, I should be sure it is worth tackling. I have a lot of other animation sequence ideas I also want to pursue. :blank:

    Post edited by FractalDimensia on
  • wetcircuitwetcircuit Posts: 0
    edited December 1969

    INNIT2WINNIT! Go BIG!

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    INNIT2WINNIT! Go BIG!

    LOL, Holly. What do you suppose I will win?

  • FractalDimensiaFractalDimensia Posts: 0
    edited November 2013

    Step 3 - Helicopters Fire Missiles (Animation Stage 2)

    Concept Description for the Animation
    The key to stage 2's animation sequence will be in using PySwarm to manipulate the missiles similar to other BOIDs, except that there are very few rules needed here. The rules to be activated for animating the missiles include only:
    • SEPARATION - To keep the missiles from flying into each other
    • SPEED LIMIT - To keep the missiles from flying too fast
    • ATTRACTION - To draw the missiles to their targets
    • LANDING - A special version of this rule will be needed (described below)

    Modified LANDING Rule
    When the missiles launch, I don't want them all to launch at the same time. I want them to launch in a somewhat random order over a matter of 5-6 seconds. I already have a rule that handles most of what I need. Therefore, to pull this sequence off, I will need to modify the LANDING rule slightly. In fact, the only change I need to make to this rule will be able to tell PySwarm to initiate BOIDs in "landed" mode at the start of sequence. I can then set the min and max landed time values to 0 and 6 seconds. The script will randomly set the timers for each missile to a value from 0 to 6 and handle everything from there, launching the missiles in the direction they are facing (mostly towards their targets), though in truth, that doesn't matter, since with an assigned attractor, the missiles will act as if they are "locked on" to their targets, and seek them out no matter which direction they are. :)

    Note: This modification will be made available in the next version release of PySwarm, once I am sure it is functioning correctly!

    Applying PySwarm to the Missiles
    In the final rendering, I will create five targets for the missiles - one for each helicopter. So in this study, I will assign each target as the attractor object for that helicopter. I will then run the PySwarm script for each helicopter one-by-one. The keyframe insertions will be generated for each helicopter individually. The only changes I will need to make to the PySwarm script at this point will be to change the name path to that helicopter's missiles, so PySwarm can find which missiles are to be manipulated (launched).

    Of course, I write all this IN THEORY, because I really don't know that is what will happen! Time will be the test! :)

    More in a few days....

    Post edited by FractalDimensia on
  • PhilWPhilW Posts: 5,139
    edited December 1969

    Sounds ambitious - I will look forward to the results!

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    PhilW said:
    Sounds ambitious - I will look forward to the results!

    It just might be ambitious if it wasn't for the wonderful "Advanced Carrara Techniques" CD I plan to pop into my drive and have a look at how to create a nice rocket trail!!!

    (My less than subtle way of advertising for you, PhilW!!!) ;)

  • Jay_NOLAJay_NOLA Posts: 1,145
    edited December 1969

    Carrara 3D Expo #6 has a rocket exhaust tutorial in it that uses the Primivol plugin

    http://www.sharecg.com/v/47450/browse/3/PDF-Tutorial/C3DE-Issue-06

    Yeah, I agree with you about "Chaos Cinema" I honestly don't like it., your seeing it in mot movies and TV shows now sadly.

    One comment he does make about it in the videos about the technique being hypnotic and overwhelming a person t a passive state is very true.

    On a biofeedback back forum I'm on one study was mentioned that looked at TV & Movie viewing and showed that by doing rapid Chaos Cinema Style cuts causes a decrease in higher brain wave production (beta & gamma) and an increase in lower brain wave production (alpha and theta). The lower waves are found in hypnotic relaxed states in a normal person. Individuals with ADD/ADHD make more lower brain waves and this is an indicator of those conditions with proper testing.


    I'm looking forward to seeing the final render.

  • PhilWPhilW Posts: 5,139
    edited December 1969

    PhilW said:
    Sounds ambitious - I will look forward to the results!

    It just might be ambitious if it wasn't for the wonderful "Advanced Carrara Techniques" CD I plan to pop into my drive and have a look at how to create a nice rocket trail!!!

    (My less than subtle way of advertising for you, PhilW!!!) ;)

    HaHa! Thank you!

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Jay_NOLA said:
    Carrara 3D Expo #6 has a rocket exhaust tutorial in it that uses the Primivol plugin

    http://www.sharecg.com/v/47450/browse/3/PDF-Tutorial/C3DE-Issue-06

    Yeah, I agree with you about "Chaos Cinema" I honestly don't like it., your seeing it in mot movies and TV shows now sadly.

    One comment he does make about it in the videos about the technique being hypnotic and overwhelming a person t a passive state is very true.

    On a biofeedback back forum I'm on one study was mentioned that looked at TV & Movie viewing and showed that by doing rapid Chaos Cinema Style cuts causes a decrease in higher brain wave production (beta & gamma) and an increase in lower brain wave production (alpha and theta). The lower waves are found in hypnotic relaxed states in a normal person. Individuals with ADD/ADHD make more lower brain waves and this is an indicator of those conditions with proper testing.


    I'm looking forward to seeing the final render.

    Thanks, again, Jay for the links. I hope to have time tonight to get caught up on the cinema links and will review the tutorial noted above. PhilW has an awesome clip in his advanced training video that I will also need to review tonight.

    I should mention that this first test is only to test the "firing" of 8 missiles from one helicopter and successful trajectory to and striking their target. Sorry. No hot exhaust. No big BOOMs! No firy explosions.... Those are later.

    Just want to set the right expectations. :)

  • PhilWPhilW Posts: 5,139
    edited December 1969

    Expectations set - still looking forward to seeing how this works!

  • FractalDimensiaFractalDimensia Posts: 0
    edited November 2013

    Step 3 - Helicopters Fire Missiles (Animation Stage 2)
    (continued)

    This afternoon, I completed the first test run of the missile firing stage. Here are the gory details of what I have done, how I did it, and what problems I encountered.

    Missile Specifications
    I did a little research about various forms of missiles, and for now chose the following specifications for the missiles:
    Dimensions: Length: ~6 feet; Width/Height: ~3/4 feet
    Max Speed: 250 feet/second
    Time to Max Speed: ~2 seconds

    Test 1 Setup
    Test Objective:
    To get 8 missiles to launch from their current position (attached to the helicopter as objects in the “Apache” object group), to take approximately 2 seconds to reach their max speed of 250 feet/second, and strike their target positioned slightly to the side and below the missiles’ launch position and heading.

    Note: Missiles were launched simultaneously in this test. Time delays in missile launches will be added during the next test as this will require a slight rescripting of PySwarm.

    Scene Setup:
    I created a new large scene, dropped in a single Apache helicopter, positioned it at the origin with an altitude (z) of 500 feet. I then added a target object (30 feet in diameter and 50 feet tall) and placed it 1500 feet in front of the helicopter, 230 feet to the side, and 500 feet below (base at an altitude of 0 feet).

    PySwarm Script Settings:
    Here are the relevant parameter settings used for this test.
    fps = 10.0 (10 keyframes inserted per second)
    sim_start_time = 0.0
    sim_end_time = 15.0 (more than enough time for a missile flying at 250 ft/sec to travel 1500 feet)
    init_position_opt = 1 (use current location)
    init_velocity_opt = 1 (use direction missiles are facing)
    init_speed = 0.0 (force missiles to accelerate from stationary position)
    Active Rules: SEPARATION, SPEED LIMIT, ATTRACTION
    min_speed = 0.0
    max_speed = 250.0
    attractor_name = 'Target1'
    attraction_adj = ??? (read below for how this value was determined)

    Test 1 Results
    The attraction_adj parameter is used to determine the strength of the missile’s attraction to the target. Another way to think of this is that it defines the acceleration of the missile towards the target. The larger the attraction adjustment value, the faster the acceleration. Since I have a specific desired time that I want the missiles to achieve max speed (~2 seconds), I needed to try different attraction adjustment values that would achieve that result.

    I starting by setting the attraction_adj value to 1.0 and ran the script on the scene. With a fps of 10, I then measured the missiles’ positions at 0.1 second intervals and then, using a spreadsheet, calculated the velocity for that interval of time. Max speed was reached in 0.4 seconds, way under the 2 seconds I desired. (See the screenshot attached.)
    I reset the value to 0.5 and ran the script again. Max speed was reached in 0.7 seconds.
    With these 2 results, I used regression analysis and picked a third value of 0.15, where the max speed was reached in 2.3 seconds. This will be the adjustment value I will use.

    I also examined the time the missiles reached their target for each of three attraction_adj settings.
    attraction_adj=1.0: Target reached in 6.4 seconds
    attraction_adj=0.5: Target reached in 6.6 seconds
    attraction_adj=0.15: Target reached in 7.3 seconds

    Note: I know this level of analysis is not always required; however, I needed to verify PySwarm is working as expected. Also, I thought it valuable (for me) to know I was capable of doing this level of detail to create realistic animation sequences. My experience is that the human eye (and mind) is capable of discerning incredibly fine details and might easily catch animation that does not look realistic. If anyone has other thoughts on this, please share them!

    Problems Encountered
    1. During this first several dozen imports, I encountered a problem with PySwarm's interface with PyCarrara or PyCarrara's interface with Carrara. Attempts at running the PySwarm script was unsuccessful and Carrara locked up. (I had to actually kill Carrara through the Windows Task Manager.) After a lot of experimentation, I discovered the problem was related to the missile object structure (which is the object provided in the Carrara pre-defined object set), though I don't know how. I found this out by constructing a new missile from a single vertex object. PySwarm worked fine then. I am not sure what the issue is, but I logged it for exploration later. My assumption is that it has to do with how the missile object was grouped.

    2. Now that I have imported the Apache helicopter object I plan to use in the final rendering, I encountered a problem with orientation of BOIDs. The default orientation of the helicopter is in the +y axis (it faces in that direction). I developed PySwarm to assume that the default orientation of BOIDs is in the +x axis. The problem is that for BOIDs that are groups of other objects, it is not so easy to change the group's orientation. Since PySwarm manipulates the rotations (bank, pitch, heading), the helicopters fly sideways. It's kinda cute, but not good for realism! :O The fix was easy - I added (yet another) parameter that automatically compensates for any differences between the BOIDs' orientation and the +x axis. In the case of the helicopters, I just add 90 degrees to the z axis to get it pointing in the right (default) direction.

    3. Until now, all my tests of BOIDs have been with the BOIDs defined at the top level of the hierarchy (i.e., they were not grouped as part of another object). This test allowed me to finally rescript PySwarm and test having them defined at any level, since the 8 missiles are actually part of the helicopters. This modification will be made available in the next release of PySwarm, probably by the end of this week.

    Next Step
    In all three cases, the missiles flew directly THROUGH their target (direct hits). GIven these results, I believe I successfully met the objectives set, and will begin the next test tomorrow.

    Missile_Strike.jpg
    1176 x 639 - 182K
    Missile_Speed_Study.jpg
    978 x 625 - 254K
    Post edited by FractalDimensia on
  • PhilWPhilW Posts: 5,139
    edited December 1969

    Thanks for sharing all this - I am most impressed with your level of detail, you had me when you mentioned regression analysis! By running through real life scenarios like this, I am sure you are developing this to be an excellent tool - actually, it already is!

  • FractalDimensiaFractalDimensia Posts: 0
    edited November 2013

    PhilW said:
    Thanks for sharing all this - I am most impressed with your level of detail, you had me when you mentioned regression analysis! By running through real life scenarios like this, I am sure you are developing this to be an excellent tool - actually, it already is!

    Thanks, Phil. I can't say PySwarm will handle all possible scenarios, but I hope to develop a tool that covers the broadest possible range. I am also confident my second project will go much faster (already have a few in mind, and on a grander scale). Looking back, I noticed I am only 10 days into the project. Working on a very limited time budget, I would say, excluding the technical hiccups and detours I've had to take, the product does seem to quickly produce realistic results.

    I am beginning to be concerned over the shear number of parameters available for tweaking. And I have at least 3-4 more rules to add over the next month or two. I have no difficulty working with them, but that is mostly because I have been working with them for a month now. I may need to restructure and section the users' guide in a way that allows those just starting with PySwarm can get good results quickly without getting mired down in the technical details.

    As for details and regression analysis, I am a Lean Six Sigma Black Belt. The technical study comes naturally. :)

    Post edited by FractalDimensia on
  • PhilWPhilW Posts: 5,139
    edited December 1969

    I'm still impressed! I know what you mean about the number of parameters, basic flocking is great because it requires so few rules to model complex behaviours, but that inevitably needs to increase once you start having more complex requirements. You could maybe divide them into sections - the common ones that will always need to be set, and then an "Advanced" section that only needs to be set in specific circumstances.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    PhilW said:
    I'm still impressed! I know what you mean about the number of parameters, basic flocking is great because it requires so few rules to model complex behaviours, but that inevitably needs to increase once you start having more complex requirements. You could maybe divide them into sections - the common ones that will always need to be set, and then an "Advanced" section that only needs to be set in specific circumstances.

    Exactly! "Great minds ... " ;)

  • DUDUDUDU Posts: 1,945
    edited December 1969

    I may need to restructure and section the users' guide in a way that allows those just starting with PySwarm can get good results quickly without getting mired down in the technical details.

    Thank you, it will be welcome because while following your high level evolution with Pyswarm, I am afraid to put questions which could appear stupid to you.
    I made tests by modifying your presets scenes (Pysarm and Pycarrara), that works well but I have a lot of other very basic questions…

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969


    Problems Encountered
    1. During this first several dozen imports, I encountered a problem with PySwarm's interface with PyCarrara or PyCarrara's interface with Carrara. Attempts at running the PySwarm script was unsuccessful and Carrara locked up. (I had to actually kill Carrara through the Windows Task Manager.) After a lot of experimentation, I discovered the problem was related to the missile object structure (which is the object provided in the Carrara pre-defined object set), though I don't know how. I found this out by constructing a new missile from a single vertex object. PySwarm worked fine then. I am not sure what the issue is, but I logged it for exploration later. My assumption is that it has to do with how the missile object was grouped.

    From time to time, PyCarrara lock with no apparent reason. It use to be far worse before Frederic released version 1
    It may happen when you restart a script several times, after correcting a syntax error (but not that often) or not.
    I think it is related to resources locked by the script and not released, in some circumstances, by the previous run.
    I've never been able to pinpoint exactly the reason and now, I save the scene before running the script :-)

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969


    Thank you, it will be welcome because while following your high level evolution with Pyswarm, I am afraid to put questions which could appear stupid to you.
    I made tests by modifying your presets scenes (Pysarm and Pycarrara), that works well but I have a lot of other very basic questions…

    I have found that many of the questions people have are likely the same or similar questions other people have as well. As such, I don't believe there is such a thing as a stupid question. I am sure I am not 100% clear on everything, so asking questions would help me rewrite a better user guide.

    So PLEASE ASK! :)

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Philemo said:

    Problems Encountered
    1. During this first several dozen imports, I encountered a problem with PySwarm's interface with PyCarrara or PyCarrara's interface with Carrara. Attempts at running the PySwarm script was unsuccessful and Carrara locked up. (I had to actually kill Carrara through the Windows Task Manager.) After a lot of experimentation, I discovered the problem was related to the missile object structure (which is the object provided in the Carrara pre-defined object set), though I don't know how. I found this out by constructing a new missile from a single vertex object. PySwarm worked fine then. I am not sure what the issue is, but I logged it for exploration later. My assumption is that it has to do with how the missile object was grouped.

    From time to time, PyCarrara lock with no apparent reason. It use to be far worse before Frederic released version 1
    It may happen when you restart a script several times, after correcting a syntax error (but not that often) or not.
    I think it is related to resources locked by the script and not released, in some circumstances, by the previous run.
    I've never been able to pinpoint exactly the reason and now, I save the scene before running the script :-)

    Thanks, Philemo! This is consistent with my experiences as well. I have learned also to save my Carrara scenes before importing PySwarm just for this reason.

  • PhilWPhilW Posts: 5,139
    edited November 2013


    Thank you, it will be welcome because while following your high level evolution with Pyswarm, I am afraid to put questions which could appear stupid to you.
    I made tests by modifying your presets scenes (Pysarm and Pycarrara), that works well but I have a lot of other very basic questions…

    I have found that many of the questions people have are likely the same or similar questions other people have as well. As such, I don't believe there is such a thing as a stupid question. I am sure I am not 100% clear on everything, so asking questions would help me rewrite a better user guide.

    So PLEASE ASK! :)

    As the old adage says, there is no such thing as a stupid question, only a stupid answer! Not that that would apply here, as I am sure that all the answers will be gold-dust.

    Post edited by PhilW on
  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    I realized the image I posted showing the missiles striking the target was not very good, so here is another screenshot taken while preparing to start test 2.

    The target is 30 feet wide and 50 feet tall. The missiles are launched nearly 1600 feet away (about 0.3 miles or about 0.5 km) and travel at 250 feet/sec (~80 meters/sec).

    Most of the separation between the missiles is caused by having the SEPARATION rule turned on.

    Missile_Clustering.jpg
    596 x 530 - 21K
  • DUDUDUDU Posts: 1,945
    edited December 1969

    FD,
    The tutos are not easy for somebody who as me usually does not speak English.
    Moreover in this case, the scripts, it is very complicated!
    It is for that I prefer progressively to put some small questions of my investigations in these plugins.

    1- (Pyswarm)
    I can modify Boids, to animate them but I do not know how to control the collisions, sometimes they cross to each other.
    I forsook this plugin a little but I will re-examine this more closely…

    2- (Pycarrara)
    - In demo 1, I added a sphere and imported the script of the logo.
    If I am able to make it beat with the music, to change axis X for Z, I cannot move it, it is the script which decided on its starting point and impossible to change it.
    - Always in demo 1, I would be interested of knowing how a zone of deformation (Boommer) can function on the music without script? I did not find it.

    There I will stop my questions for the moment because I believe that if one does not know something at the maxi, one should not pass to another.

    Thank you.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    FD,
    The tutos are not easy for somebody who as me usually does not speak English.
    Moreover in this case, the scripts, it is very complicated!
    It is for that I prefer progressively to put some small questions of my investigations in these plugins.

    1- (Pyswarm)
    I can modify Boids, to animate them but I do not know how to control the collisions, sometimes they cross to each other.
    I forsook this plugin a little but I will re-examine this more closely…

    2- (Pycarrara)
    - In demo 1, I added a sphere and imported the script of the logo.
    If I am able to make it beat with the music, to change axis X for Z, I cannot move it, it is the script which decided on its starting point and impossible to change it.
    - Always in demo 1, I would be interested of knowing how a zone of deformation (Boommer) can function on the music without script? I did not find it.

    There I will stop my questions for the moment because I believe that if one does not know something at the maxi, one should not pass to another.

    Thank you.

    DUDU, I have not dug very deeply into the PyCarrara demos. I have only taken a brief look at them to make sure they worked, so I cannot answer your #2 question without first going back to the demo. Maybe someone else reading these questions may have a quick answer for you. If not, I'll try to take a look the weekend and get back with you.

    For #1 question, collisions are controlled by the rule called "SEPARATION." You can activate this rule by making sure the line in the script that looks like the following:
    1, # 2: SEPARATION - BOIDs keep some distance apart

    There should not be a "0" at the start of the line, but a "1". This will activate the rule that will force the BOIDs to keep some distance apart.

    There are 2 more values that you can set to adjust the separation values. Scan down a little ways in the script until you find the following text:
    #-----------------------------------------------------------------------------------------
    # Rule 2: SEPARATION Rule Parameters

    # Set the following to the distance to keep BOIDS apart (in feet)
    separation_distance = 2.0

    # Set the following for how quickly BOIDS will move away
    # Higher values for more force to keep them apart
    # Use a value of 1.0 for most situations
    separation_adj = 1.0

    The first value (separation_distance) is used to know when 2 BOIDs are getting too close. In the example above, it is set to 2.0 That means when 2 BOIDs fly/swim/move to within 2.0 feet of each other (about 0.6 meters), they will attempt to fly/move away from each other. In picking a good value, you should look at the size of your BOIDs. A general rule of thumb I use is to start by picking a value based on the length of the BOIDs' longest dimension. For example, in my helicopter animation, the Apache's size is (54 feet, 46 feet, 21 feet). So I chose a separation_distance value of 100 feet (so they wouldn't fly too close).

    Of course, if there are lots of BOIDs squeezed in a small space, those in the middle do not have much room to get away from the BOIDs around them, and they can still run into each other as a result.

    Think of the second value (separation_adj) as how strong the desire is (if BOIDs had emotions!) to move away from others. Imagine trying to push the positive poles of 2 magnets together. They will be repulsed by (push away from) each other. This value is like how strong the magnets are. Larger values (like a number in the 2.0 to 3.0 range) create very strong forces, and the BOIDs will look like they will do anything to keep from being near another BOID! A value less than 1.0 (like 0.3) creates a weak repulsion, so BOIDs are more likely to run into each other.

    (Also, you can set separation_adj to a negative value, like -1.0 This will actually cause the opposite to happen, and the BOIDs will actually move close to each other.)

    If you are attempting to create an animation based on real animals, think about how that species interacts with others of its kind. If the BOIDs are starlings (birds) or a school of fish, there is very little separation.

    If you are observing your BOIDs getting too close, you need to do what I call "tweaking" the values to get the results you want. In this case, you might try:
    (a) increasing the separation_distance value
    (b) increasing the separation_adj value
    (c) a combination of both of these

    Sorry for writing so much text, but I hope this helps! If not, please let me know.

  • FractalDimensiaFractalDimensia Posts: 0
    edited November 2013

    Quick 10 second demo showing progress on launching 8 missiles from a helicopter at a target 1600 feet away. All motion made by the missiles are generated using the PySwarm script.

    I made a few modifications to PySwarm 0.4.1 to get the LANDED rule to work with initial settings. I activated the rule and set the missile firings to occur from time 0.1 sec to 3.0 sec. The 8 missiles are fired at random times between these two values. All 8 missiles struck the target precisely.

    You can watch the video here:
    https://www.youtube.com/watch?v=blWAqH7mbOo

    I am still trying to run down the source of the movement of the missiles prior to their firing. I hope to have a solution by tomorrow.

    Test 2 will be considered complete once this bug is fixed.

    Post edited by FractalDimensia on
  • PhilWPhilW Posts: 5,139
    edited November 2013

    Good progress - it almost looks like the missiles are anticipating being fired, which is a fun effect, even if it is not what was intended! Could it be that the separation parameter is being invoked before the firing?

    Post edited by PhilW on
  • evilproducerevilproducer Posts: 9,040
    edited December 1969

    Quick 10 second demo showing progress on launching 8 missiles from a helicopter at a target 1600 feet away. All motion made by the missiles are generated using the PySwarm script.

    I made a few modifications to PySwarm 0.4.1 to get the LANDED rule to work with initial settings. I activated the rule and set the missile firings to occur from time 0.1 sec to 3.0 sec. The 8 missiles are fired at random times between these two values. All 8 missiles struck the target precisely.

    You can watch the video here:
    https://www.youtube.com/watch?v=blWAqH7mbOo

    I am still trying to run down the source of the movement of the missiles prior to their firing. I hope to have a solution by tomorrow.

    Test 2 will be considered complete once this bug is fixed.

    After watching the video, my first inclination for the unwanted movement is perhaps bezier tweeners. Try changing them to linear if possible.

  • HeadwaxHeadwax Posts: 9,924
    edited December 1969

    great video, watch out they'll be sending you to nam soon.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    PhilW said:
    Good progress - it almost looks like the missiles are anticipating being fired, which is a fun effect, even if it is not what was intended! Could it be that the separation parameter is being invoked before the firing?

    Thanks, Phil. This was also my first guess as being the problem. So I went back to the script and ruled this out after about an hour. :-S


    After watching the video, my first inclination for the unwanted movement is perhaps bezier tweeners. Try changing them to linear if possible.

    EP, you nailed it! Your animation eyeballs work better than mine! I was able to run down the problem yesterday afternoon, but had to run out before I could post my discovery.

    After some further PySwarm modifications and changing tweener mode to linear, I was able to complete this test. (Some details for anyone interested later today.)

    I also performed some successful variations on the basic layout, both moving the target locations and rotating the helicopter.

    This 10 second video shows the final test 2 result with the helicopter facing 60 degrees away from the target.
    https://www.youtube.com/watch?v=z5Nxp7OShGE

    I have one final test (to attach emitters to the tail of each missile) before integrating the results into the actual scene.

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    head wax said:
    great video, watch out they'll be sending you to nam soon.

    :)

    I happen to love Vietnamese food! And I hear the weather is nice there this time of year! ;)

  • FractalDimensiaFractalDimensia Posts: 0
    edited December 1969

    Step 3 - Helicopters Fire Missiles (Animation Stage 2)
    (continued)

    I was finally able to carve out some spare time Sunday afternoon and yesterday to complete Tests 2 and 3. Here are some details.

    Test 2 Setup

    Test Objective:
    To build on the results of test 1 by implementing delayed firing using PySwarm's LANDED rule. Some modifications to PySwarm were needed to get this to work properly. This test is still with using 1 helicopter, with the target set slightly askew (to the side and below the missiles’ launch position and heading).

    Scene Setup:
    I used the same Carrara scene used in the previous test.

    PySwarm Script Settings:

    I made the following adjustments from the previous test settings, which are described in this post:
    http://www.daz3d.com/forums/viewreply/486472/

    sim_end_time = 12.0 (still plenty of time)
    init_speed = 20.0 (slight speed to force missiles out and away from the helicopter)
    Active Rules added: MAX TURN, LANDING
    max_turn = 20.0 (restrict ability of missiles to turn to being under 20 degrees per second)
    min_landing_time = 0.1 (start launching missiles anytime after 0.1 seconds into the animation)
    max_landing_time = 3.0 (launch all missiles by 3.0 seconds into the animation)
    takeoff_angle = 0.0 (launch missiles directly out from the helicopter)
    initiate_landed = True (tells PySwarm to start missiles in LANDED mode)

    Test 2 Results

    Once I was able to solve the problem I encountered (described below), the test ran successfully and the objective was achieved.

    A short video of the test 2 results can be watched here (same as the one posted above):
    https://www.youtube.com/watch?v=blWAqH7mbOo

    Problems Encountered
    As described earlier, I was having a problem with the missiles moving prior to their launch. There were 2 parts to this problem that combined caused a delay in completing the test on time.
    1. I was using Bezier tweeners as the default. Since there is no way to define or set the tweener type in PyCarrara, this was causing the backward motion.
    2. I discovered that when attempting to add a keyframe, Carrara checks the last keyframe setting. If it is the same, then it will not add the new one. Before the missiles launch, they are not moving. And though I was telling PyCarrara to insert keyframes, Carrara was not doing it. This left gaps between the initial animation frame (time = 0.0) and when the missile launches.

    Once I switched the default tweener to linear, the animation went fine. However, this poses a potential problem in other animation sequences where a bezier or other tweener might be wanted. I'll have to look for a fix for this situation sometime later.

    Next Step
    I have two more tests I want to run before this stage of animation is complete. In the next test, I want to verify PySwarm can manipulate more complex objects - a group containing the missile object and a particle emitter (missile smoke trail).

    In the final test, I will go back to the main scene, and create full missile animation for all 5 helicopters.

Sign In or Register to comment.