Shadylasse Posted April 19, 2014 Report Share Posted April 19, 2014 Hello everyone. I'm a little curious if anyone would know how to get an animated image put onto a model in Emergency 4? The game obviously doesn't recognize the .gif format, so would anyone by any chance know an alternative? Kind regardsLasse Quote Link to comment Share on other sites More sharing options...
MikeyPI Posted April 19, 2014 Report Share Posted April 19, 2014 Well if you're doing something simple like a signboard that says CAUTION then flips to STAY LEFT for example, just make two plates that have the skin for lighted up lights to do the writing, have an animation slide the unused one into the model and alternate them/ hide both in the model when it's in the off position. Pretty easy to do and works for that type of deal. Quote Link to comment Share on other sites More sharing options...
Shadylasse Posted April 20, 2014 Author Report Share Posted April 20, 2014 Well if you're doing something simple like a signboard that says CAUTION then flips to STAY LEFT for example, just make two plates that have the skin for lighted up lights to do the writing, have an animation slide the unused one into the model and alternate them/ hide both in the model when it's in the off position. Pretty easy to do and works for that type of deal. I thought about the option, although I concluded that technqiue probably wouldn't be very suitable for a running TV in a firestation. I'd assume the TV wouldn't have very much of a fine transition between the images so that it would actually look like a TV-channel playing. I believe the only viable chance of having such a thing would be to link a video to the model. I just have no idea how to do that. If anyone would enlighten me on that part, I'd be as grateful as the days are long. Quote Link to comment Share on other sites More sharing options...
Ghost Graphic Designs Posted April 21, 2014 Report Share Posted April 21, 2014 I thought about the option, although I concluded that technqiue probably wouldn't be very suitable for a running TV in a firestation. I'd assume the TV wouldn't have very much of a fine transition between the images so that it would actually look like a TV-channel playing. I believe the only viable chance of having such a thing would be to link a video to the model. I just have no idea how to do that. If anyone would enlighten me on that part, I'd be as grateful as the days are long. If I was going to do something like that, I would put some big coronas, radiation and polys with different colours changing periodically. Not exactly realistic, but it gives the effect of a TV turned on. Quote Link to comment Share on other sites More sharing options...
Shadylasse Posted April 21, 2014 Author Report Share Posted April 21, 2014 I thought about that, although I'm more interested in having an actual video roll as seen by Goya here: It's probably not worth the technical struggle just to have a TV playing, but it would be kind of cool to have anyway. It's the little things that does the tricks. Quote Link to comment Share on other sites More sharing options...
Hoppah Posted April 22, 2014 Report Share Posted April 22, 2014 It's actually not that hard to do this. The only downside? It only seems to work in a missionscript unfortunately. I never got it to work in a commandscript (for freeplay usage).The codes you need: bool PlayTextureVideo(const char *Texture_, const char *Video_, bool Loop_ = true ); bool StopTextureVideo(const char *Texture_); bool IsTextureVideoPlaying(const char *Texture_);The script simply replaces a texture with the video, so make sure that particular texture isn't being used on 200 objects, but just 1 (the screen of the tv in your fire station). To get an idea how the code works, check out the tutorial script file located in your Data\Scripts\Game\Mission folder for an example. The map file may be useful too, to get an idea how the code interfers with the object.To get a compatible video file, you need convert your animated gif or any other video to mpg format. I'm not sure which codec and settings you need, but this is the info I pulled from a video file that is compatible with the code above. It's got no audio. GeneralComplete name : D:\Emergency 4 Deluxe\Data\Video\tutorial\tutorial_clip_1.mpgFormat : MPEG-PSFile size : 1.15 MiBDuration : 7s 240msOverall bit rate : 1 335 KbpsWriting library : encoded by TMPGEnc 3.0 XPress Version. 3.0.4.24VideoID : 224 (0xE0)Format : MPEG VideoFormat version : Version 1Format settings, BVOP : YesFormat settings, Matrix : DefaultDuration : 7s 240msBit rate mode : VariableBit rate : 1 309 KbpsWidth : 256 pixelsHeight : 128 pixelsDisplay aspect ratio : 2.000Frame rate : 25.000 fpsColor space : YUVBit depth : 8 bitsScan type : ProgressiveCompression mode : LossyBits/(Pixel*Frame) : 1.598Stream size : 1.13 MiB (98%)Writing library : TMPGEnc 3.0 XPress Version. 3.0.4.24I do know that you can use any size you want, so if you want a full HD (1920 x 1080 pixels) file playing on that little tv, I'm sure that's possible. However, I assume that playing a video with that size will take a bad hit on the game's performance though. Therefore, I strongly recommend to keep the resolution of the video as small as possible. For a small tv like that, 64 x 128 pixels will already do imo. It's more about having a moving picture than being able to recognize whats currently being played. Quote Link to comment Share on other sites More sharing options...
Shadylasse Posted April 22, 2014 Author Report Share Posted April 22, 2014 Thank you very much! I'll play around with it for a bit and see if I'll gather any results worth showing. P.S. I appreciate all the replies! Quote Link to comment Share on other sites More sharing options...
bma Posted April 28, 2014 Report Share Posted April 28, 2014 It works and it really looks awesome! But is it possible to stop the video and bring back the original texture? Quote Link to comment Share on other sites More sharing options...