rododo93 Posted December 19, 2015 Share Posted December 19, 2015 Hi guys! It's my first time posting here, so forgive me if I make some obvious errors or wrong assumptions.Now, my real question: I mod Halo CE (the game for PC) a lot, and I love to use its nice and easy editing kit to make beautiful effects. To do that, however, I need to pre-render some particles. I've understood the process used by later Halo games to render them, and I know how to make an algorithm to achieve that (but I don't know how to turn it into code yet). Basically it takes 2 images as input: the actual particle bitmap from which it should start, and then it copy-pastes the bitmap as many times as needed, making it fade every frame according to the gradient bitmap. Problem is: I don't know where to start. I know C++ and C (but not C#, which is a problem), so may somebody redirect me to the right places where to start looking for code? CodeLab can't help me here, and I couldn't find any source code for the only plugin I have ever seen taking external images as input (I'm talking about the Alpha Mask one). Quote Link to comment Share on other sites More sharing options...
MJW Posted December 20, 2015 Share Posted December 20, 2015 If you just want to use an image from the current layer and another from the clipboard, it's quite easy, and can be done in CodeLab. If you want to import an image from a file, you probably don't want to use CodeLab. Since the Alpha Mask code is available, you can adapt that. If you know C++, C# should be easy to learn. Unless you're using the more sophisticated features of C#, the code to write a plugin should be almost the same. All the basic C-style operations and control structures work, with some minor differences, such as the required breaks in switch statements. I'm not clear on what you intend to produce. Is it a single image or a bunch of frames? I can't provide any information on producing multiple frames, as I know nothing about the problem, and it doesn't interest me enough to find out. Quote Link to comment Share on other sites More sharing options...
rododo93 Posted December 20, 2015 Author Share Posted December 20, 2015 Basically, that's how it should workIt takes as input the number of frames you want the particle to last (the game runs at 30 fps), the actual particle bitmap (in shades of grey) and a gradient bitmap used by later Halo engines to dinamically render the particle (it contains informations about how does every pixel of the first bitmap fade as time passes according to its original color).When rendering the particle, the plugin should copy paste the particle bitmap horizontally as many times as the frames needed, then in every frame it checks the R value of a pixel and then, according to it, it changes its color according to the algorithm I've designed; basically, a curves+ that uses different curves according to the frame it is rendering. Quote Link to comment Share on other sites More sharing options...
MJW Posted December 20, 2015 Share Posted December 20, 2015 Most plugins modify the current layer, and nothing more. I know there are some animation plugins that deal with multiple frames, but I know nothing about that sort of thing. Perhaps someone who does can tell you if what you want to do is possible, and if it is, how to do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.