DCS World – Adding Animation Arguments To Your External Aircraft Model
Four Engine Bypass Fan Animation
Over the last few weeks, I attempted to animate some bypass fans for a little project I’m tinkering with at HoggitDev. DCS World DIY modding resources seem pretty sparse, so I’m hoping to help like-minded adventurers by documenting some of the bush-whacking. For advanced modders, please take a look at what I offer below and contact me for necessary revisions.
- Preparing to Animate and Test – edModelViewer
- Turbofan Bypass Fan Animation
- Two Different Set’s of Animation Arguments
- DCS Helper Points
- Wunderluft Custom Devices
- Available Resources
Preparing to Animate and Test – edModelViewer
First, let’s get Eagle Dynamics model viewer application setup to save a little time. If you already have the ED model viewer setup to your liking, you may skip ahead. The following are basic instructions for installing and configuring the standalone model viewer, for integration into your DCS modeling workflow:
We can have the model viewer open up exactly to the specific model we choose. Modify your ‘autoexec.lua’ file located at ‘edModelViewer/Config/ModelViewer/autoexec.lua’. You need Notepad++ or comparable application to edit ‘autoexec.lua’. You need to add the location of your .edm model file that you will be exporting from 3ds. I’ve included two example paths, to give you an idea of the line you need to replace/add to your file.
LoadModel("C:/edModelViewer/Models/your-model.EDM") LoadModel("C:/Program Files/Eagle Dynamics/DCS World/Bazar/World/Shapes/your-model.EDM")
Eagle Dynamics offers a standalone version of their edModelViewer and it comes with the game located in the ‘DCS World/bin/’ directory. For NVIDIA users: you can Open NVIDIA control panel and modify the 3d Application controls for edModelViewer. Specifically, you can force ‘vertical-sync’ to ‘full’ or ‘half’ refresh rate. Otherwise, the edModelViewer runs at 100% GPU load, which is highly annoying. Also, you can add some anti-aliasing to soften some of those crispy edge pixels. Not a big deal for testing, but hey! Why not?
Turbofan Bypass Fan Animation
For my first animation, I’m attempting to animate the turbojet bypass fan on my external model. In preparation, I’ve created my own model for the bypass fan. I used the twist modifier in 3ds to twist the blades and positioned them around a section of the egg primitive for the nose cone. I counted the blades from a reference shot, and big surprise there are 36, which evenly divides into the 360 degrees of a circle. By positioning the pivot of the blade in the center of the circle, I was able to copy-rotate the object by 10 degrees. (Hint tap ‘A’ to constrain the angles to 5-degree increments). You can type in the number of copies, so entering ’35’ gives me the entire fan.
Also, I went ahead an unwrapped the model, and added a spiral, so that I can observe the true rotation of the bypass fan in operation. Next, I’ll talk about some steps I stumbled through to apply the animations in 3ds.
Fast forward another week, and I discovered so many helpful things, I don’t want them to slip by, so here they are:
Using the edModelViewer to correct preview the animation is tricky. You want to set the animation argument and then turn off the other animation shuttle. I’ll try to explain this with some image captures.
I got the animation working great for the AI controlled plane. AI animations are already worked out if you use the correct animation arguments 324,325,326,327.
I hit a snag when considering how to handle four engines, and I think I might end up working with them as two pairs of engines, so I can start up left, start up right. It seems the exhaust plumes somehow factor into this.
Two Different Set’s of Animation Arguments
Okay, well after tinkering on this for an entire weekend, I finally got the animation working on my Wunderluft mod, and the key was applying a second animation argument. AI and player aircraft engine fan animations rely on different arguments. They both need to work in-game obviously, so… The LOMAC draw arguments suggest #’s 324-332 for 1 to 8 engines to manage angle of rotation. Instead, I found applying 324 to both left engines and 325 to the right engines seems to work for AI aircraft. In addition, I applied 407, 408, 409, and 410 to each engine respectively from left to right, which works great for player aircraft. There was a ton of guess and check, and plenty of researching forums.eagle.ru to finally arrive at this solution, which also calls for custom device creation in order to implement.
need to link to lua script solution on ed forum and include code snippet
DCS Helper Points
In 3ds you can easily apply helper points with DCS specific names, which overrides the aircraft.lua position settings for certain animations. In my scenario, I used AFTERBURN_001, AFTERBURN_002, AFTERBURN_003, and AFTERBURN_004. These work great for the AI aircraft, and the first two work for player aircraft. DCS doesn’t currently support more than two egine nozzle positions for player aircraft, bummer I know! To overcome this, for now, place AFTERBURN_001 and AFTERBURN_002 on the two inner engines, and then at least, your exhaust will remain symmetrical to the fuselage.
Wunderluft Custom Devices
Have a pair of wings, each with their own set of Pratt and Whitney, is the perfect test bed for further inspiration. Build us a wind tunnel already Eagle Dynamics!
There are a couple good resources for adding animations already available.
Originally I found this on the ED forums, and I’m just hosting it here for convenience:
Now, there’s also a video available at http://forums.eagle.ru/showthread.php?t=107509 You may want to check that forum post as well for information, but for now, I’ve gone ahead and hosted the video below (size 16Mb):