peter_spy Posted February 12, 2020 Report Posted February 12, 2020 (edited) https://wiki.thedarkmod.com/index.php?title=Cutscene_video_with_FFmpeg Haven't tested it yet, but instead of bothering with new GUI, couldn't you just teleport a camera to a dark room, as Dragofer suggested, where it points to a surface with with videoMap material applied? Edited February 12, 2020 by peter_spy Quote Artstation stuff
Dragofer Posted February 12, 2020 Report Posted February 12, 2020 I have some buggy doors which have a pretty big drop in sound volume across them even though they're open, and they don't respond to loss_closed and loss_open spawnargs. For example if I'm in a deckhouse and open the left door, the wind becomes louder as expected, but if I open the right door the wind is still muffled by what must be 10dBs. Only when I walk through the doorway does the wind become louder. The wind speaker has a very large maxradius that's more than twice the distance to those doors, and there are no visportals on the way. Has anyone else run into this/solved it? Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Springheel Posted February 12, 2020 Report Posted February 12, 2020 I assume the door doesn't have a loss_open value (or whatever the spawnarg is that allows open doors to occlude sound)? Quote TDM Missions: A Score to Settle * A Reputation to Uphold * A New Job * A Matter of Hours Video Series: Springheel's Modules * Speedbuild Challenge * New Mappers Workshop * Building Traps
Dragofer Posted February 12, 2020 Report Posted February 12, 2020 It looks to me like it does have one, it's under intrinsic properties as "loss_open" "1". Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Geep Posted February 13, 2020 Report Posted February 13, 2020 Thanks, Dragofer & peter_spy, don't know how I overlooked that wiki page about video. Complicated as expected. One thing I didn't see in a quick scan of the article was how to actually start the playback (of a non-briefing vid), from either a script, trigger/target, or STIM/Response. Quote
Geep Posted February 13, 2020 Report Posted February 13, 2020 Probably teleporting into a dark room with a video-wall is not the best way to go for a true cutscene. You'd need to center the player's view on the wall and lock him there, i.e., disable keyboard and mouse controls. Plus you'd be scaling each vid pixel twice (once onto the videowall, then onto the physical screen) with attenuation of quality. Looking instead for a variation of the TDM "briefing video" method, but that can be invoked anywhere throughout the story, perhaps more than once with different content. May need to add a visual hint about it being a cutscene. I've seen letterbox top & bottom black bars used for that in other games. Probably that FX could be done in a video editor or FX package, rather than TDM. All still theoretical so far. I have no video capture software or video editor on my dev box yet. Quote
Geep Posted February 13, 2020 Report Posted February 13, 2020 Oh, I guess what I thought was a "video briefing" mode was (after consulting the "Advanced" section of the "Briefing" wiki info) just programmatic timed slide manipulation like zoom & rotation. Hmmm, perhaps the video-wall method is all we got at the moment. Any known way to instantly freeze then later unfreeze the player controls? Quote
Dragofer Posted February 13, 2020 Report Posted February 13, 2020 You can trigger a func_camera to freeze controls and again to unfreeze. It's good practice to put those triggers into a script together with a sys.wait command so that the player is able to press escape to skip the cutscene. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Geep Posted February 13, 2020 Report Posted February 13, 2020 Ah, I see this from stumpy in the distant past: Quote the player gets frozen during cinematics, but only cause the player's view gets moved to a func_camera. So it's the func_camera that would be locked onto the video wall image in the darkened room. (Not clear to me why the player would have to be teleported to the room... couldn't one be anywhere when the cinematics is invoked? Is that needed to solve potential audio conflicts, because, say, func_camera doesn't have microphone capabilities? Or just to get the player isolated from any potential AI attack?) Quote
Dragofer Posted February 13, 2020 Report Posted February 13, 2020 It's because the player will still hear his former surroundings if you don't teleport him, the func_camera only changes what he sees. Safety from AI is another benefit of course. IIRC grayman did work with changing the position of the player's 'ear', so it may be possible to get a kind of microphone functionality. This is pretty vague coming from me though. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
peter_spy Posted February 13, 2020 Report Posted February 13, 2020 IIRC You don't have to freeze anything during the camera cutscene because it's alreafy frozen (unless you have noclip turned on, then you can turn your head around. You need to teleport the player to where your camera is mostly to control where he is. If you e.g. move your camera along a spline, the player will move in relation to his last position where he triggered the cutscene, so he can end up in the void. Quote Artstation stuff
grayman Posted February 14, 2020 Report Posted February 14, 2020 3 hours ago, peter_spy said: You need to teleport the player to where your camera is mostly to control where he is. If you e.g. move your camera along a spline, the player will move in relation to his last position where he triggered the cutscene, so he can end up in the void. Is there evidence of this behavior? Quote
peter_spy Posted February 14, 2020 Report Posted February 14, 2020 I noticed that in my own WIPs, when I was practicing cutscenes based on your Wiki tutorial. Will check if I still have them. Quote Artstation stuff
peter_spy Posted February 14, 2020 Report Posted February 14, 2020 (edited) Here you go: https://we.tl/t-b49jMFNaFP Place these maps in any of your project folders, I deleted all the custom stuff and changed materials to stock TDM assets. First, launch ctscn_t01.map. When the cutscene ends, you should be right where the camera was during the last frame. Now launch ctscn_t02.map. Player ends in the void after the cutscene finishes. Open maps in DR. The only difference is that in the second map I deleted the player teleport that was linked to the trigger volume, which placed the player exactly where the starting point of the moving camera is. The cutscene is a bit long-ish, you can press Esc to get there faster it you want to. @grayman Edited February 14, 2020 by peter_spy Quote Artstation stuff
grayman Posted February 14, 2020 Report Posted February 14, 2020 The fault is in the "2" map, and is not a general "the player will move...". What happens in the "1" map: 1. The player falls into the trigger, and gets teleported to a spot just below mover1. 2. The player falling into the trigger also calls the script routine "cs_cam1". 3. This routine runs AFTER the player has been teleported. 4. The player is bound to the mover, and stays with the mover until it's finished its movement. 5. When the player's view is restored, he's at the end of the mover's path, so when he's unbound from the mover, he drops down to the floor in the 'end' area. What happens in the "2" map: 1. The player falls into the trigger, and DOES NOT teleport, because the teleport entity doesn't exist. 2. The player falling into the trigger also calls the script routine "cs_cam1". 3. The player is bound to the mover, and stays with the mover until it's finished its movement. Since the player never teleported, he ends up a large offset from the mover, at (4623.88 2948.38 204.64), which is in the void. 5. When the player's view is restored, he's unbound from the mover, and since he's in the void, he begins to fall forever. Quote
peter_spy Posted February 14, 2020 Report Posted February 14, 2020 (edited) Map 1 is a workaround for a problem with map 2, which was technically the first one. I wasn't able to trigger the camera the simple way, where view would just return to player's last position, as it would be in other engines. In map 2 player moves with the camera, just with the starting position offset to player coordinates. Edited February 14, 2020 by peter_spy Quote Artstation stuff
Geep Posted February 14, 2020 Report Posted February 14, 2020 Sounds like a way "to trigger the camera the simple way, where view would just return to player's last position, as it would be in other engines" is needed. I think, returning to my desire for pre-recorded video cutscenes, I understand the basic playback approach of dark room+videowall+func_camera+teleport, and will explore it. I still view this as a messy workaround, inferior to direct video+audio playback. I gather the engine already has the ability for direct playback of sample videos (but only invoked by the command line, and displayed in a small test rectangle). So a new-feature request to the engine devs, to extend this to full-screen and script-invocable, is warranted, even if it should come too late to help me. Quote
nbohr1more Posted February 14, 2020 Report Posted February 14, 2020 Well, I believe you can: 1) Create a material def with "videomap" pointing to a pre-recorded cut-scene in mpeg, roq, etc format. 2) Create a movable entity with a simple patch that has this material applied to it 3) Use a script event to immobilize the player and attach the entity to the player's head I believe that the "overlay" system is better suited to this idea but I don't think it can be controlled via script? (Though it may be a good idea to add that...) Quote Please visit TDM's IndieDB site and help promote the mod: http://www.indiedb.com/mods/the-dark-mod (Yeah, shameless promotion... but traffic is traffic folks...)
Amadeus Posted February 14, 2020 Report Posted February 14, 2020 Alright, two questions: First, I have a sign that I made frobable because I want a message to show up on screen when it is frobbed. It uses a sign_shield_keg skin, but every time the hovers over it, this happens: https://imgur.com/9PqB0r0 Anyone know why this happens? Second question: The player_tools spyglass and player_tools compass that I place in my map always disappear in game. I have the blackjack, sword, and other equipment that show up just fine, but no compass or spyglass. Any reason why these disappear in game? Quote FMs: A Good Neighbor, Eye on the Prize Co-FMs: Seeking Lady Leicester, Written in Stone, The Painter's Wife
Dragofer Posted February 14, 2020 Report Posted February 14, 2020 @Amadeus #1 looks like it's because the material used by that skin is mixing several different textures together. For #2 if this happens even though your compass has inv_map_start and no diff_x_nospawn spwnargs I'd replace them with the ones you get when importing the prefabs from the mapper_tools folder. Remember to adjust their diff_no_spawn spawnargs after you imported them. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Amadeus Posted February 14, 2020 Report Posted February 14, 2020 Thanks! Will do. As for question 1, is there anything I can do to fix that? Quote FMs: A Good Neighbor, Eye on the Prize Co-FMs: Seeking Lady Leicester, Written in Stone, The Painter's Wife
Dragofer Posted February 14, 2020 Report Posted February 14, 2020 You could override that particular material by copy pasting it into your own .mtr file (renamed from .txt), fix the inconsistency in it and provide it with your mission. As for fixing it, I'd look first to see if at one place it points to diffusemap x and another to diffusemap y. Can't look at this myself atm as I'm not near a PC. 1 Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Destined Posted February 15, 2020 Report Posted February 15, 2020 16 hours ago, Geep said: Sounds like a way "to trigger the camera the simple way, where view would just return to player's last position, as it would be in other engines" is needed. I think, returning to my desire for pre-recorded video cutscenes, I understand the basic playback approach of dark room+videowall+func_camera+teleport, and will explore it. I still view this as a messy workaround, inferior to direct video+audio playback. I gather the engine already has the ability for direct playback of sample videos (but only invoked by the command line, and displayed in a small test rectangle). So a new-feature request to the engine devs, to extend this to full-screen and script-invocable, is warranted, even if it should come too late to help me. Would it be possible to create a custom GUI that covers the whole screen and only consists of one material that shows the video playing? In that case, you could pause the game via script (at least I found the script event void pauseGame() ), call the GUI and unpause afterwards. I have no experience with GUIs, so it may be that this is simply not possible to create, but it is an idea that sounds easier than the whole teleporting stuff. Quote
Dragofer Posted February 15, 2020 Report Posted February 15, 2020 Yes, looks like you can simply define a GUI and call it as an overlay with a script. Still just an ingame texture, but more refined than making an ingame cinema screen for the player. Quote FM: One Step Too Far | FM: Down by the Riverside | FM: Perilous Refuge Co-FM: The Painter's Wife | Co-FM: Written in Stone | Co-FM: Seeking Lady Leicester Dragofer's Stuff | Dragofer's Scripting | A to Z Scripting Guide | Dark Ambient Music & Sound Repository
Geep Posted February 15, 2020 Report Posted February 15, 2020 nbohr1more and Dragofer - these are 2 interesting ideas. I wonder if anyone has ever tried either with video before? I was hoping not to be the pioneer on this one. Quote
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.