Jump to content
Shadylasse

Animated images on models.

Recommended Posts

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.24
I 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.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...