• How to hide player name and health during demo playback?
    16 replies, posted
I am wondering if this is even possible. I am trying to make a machinima, and I don't need those tags "PlayerName 100%" to appear. Please help! I've tried everything, addons in workshop and I even commented function in file gamemodes/base/gamemod/cl_targetid.lua [IMG]https://s4.postimg.org/9dxzt3dl9/Untitled.png[/IMG]
Might not work but: [code] sv_allowcslua 1 lua_run_cl function GAMEMODE:HUDDrawTargetID() end [/code]
Yes, Lua. [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/HUDDrawTargetID]GM:HUDDrawTargetID[/url]
You know there's such a thing called cl_drawhud 0
[QUOTE=Robotboy655;51157291]You know there's such a thing called cl_drawhud 0[/QUOTE] cl_drawhud 0 does not affect this player name tag unfortunately. It only removes health/armor/ammo and weapon selection panels from the screen. [editline]6th October 2016[/editline] [QUOTE=Robotboy655;51157291]You know there's such a thing called cl_drawhud 0[/QUOTE] Ok, minor correction. Indeed, cl_drawhud 0 removes name tags during demo playback. I don't see the names when I do "playdemo test.dem" in console. But name tags DO appear when I record the video with command gm_demo_to_video! And which is even more strange, I don't see the tags during video recording, only in the final video!!! This is very peculiar, and I absolutely need to fix this :) If anyone has a clue, please help... [editline]6th October 2016[/editline] Even if I use "startmovie" instead of gm_demo_to_video, I still get the player name tags.
converting the demo using the concommand doesn't really record the gameplay you have, I mean well it does, but it doesn't 'calculate' your addons/lua files, so you'd have to use a own recording programm, like NVIDIA's ShadowPlay. -- Thats how sin did it, thats how everyone does it.
[QUOTE=whitestar;51160224]converting the demo using the concommand doesn't really record the gameplay you have, I mean well it does, but it doesn't 'calculate' your addons/lua files, so you'd have to use a own recording programm, like NVIDIA's ShadowPlay. -- Thats how sin did it, thats how everyone does it.[/QUOTE] As far as I can tell, video generator is a part of Source engine and indeed I cannot control what's going on when I record the video. Actually, I can use demo editor/smoother (Shift+F2) to execute some console commands during demo playback. E.g. when I add cl_drawhud 0 in the demo editor then name tag disappears. But if I record video at the same time, I still see the name. This may be a bug in source engine video recorder (the fact that it ignores cl_drawhud for some parts of the HUD). I am considering using 3rd party tools for video recording, although I need something that I can automate via command-line interface. I will have a look at ShadowPlay... it is like a fancy Fraps, isn't it? I doubt it has CLI, but still. Thank you for your suggestion.
I've read somewhere yeears ago that you can make a supplement file to the demo file which can, among other things, activate console commands at certain points in the demo (i.e. cl_drawhud 0 right when the demo starts). I vaguely remember that to make it you had to play the demo with playdemo2 or something like that and edit from there. That was about HL2 and it's EPs, I don't know how much of it is in gmod or how broken it is in gmod.
[QUOTE=NeatNit;51160461]I've read somewhere yeears ago that you can make a supplement file to the demo file which can, among other things, activate console commands at certain points in the demo (i.e. cl_drawhud 0 right when the demo starts). I vaguely remember that to make it you had to play the demo with playdemo2 or something like that and edit from there. That was about HL2 and it's EPs, I don't know how much of it is in gmod or how broken it is in gmod.[/QUOTE] It actually works in GMOD. No need to do it manually, you just start playing demo with "playdemo test.dem", then press Shift+F2 to open playback GUI. Press Pause, then Edit. Another window will open, where you can add certain additional events during demo playback, e.g. you can skip certain part of the demo or add arbitrary console command. When you press save, it will create new file near your demo with .vdm extension. It looks like this: demoactions { "1" { factory "PlayCommands" name "Unnamed1" starttick "455" commands "demo_timescale 0.175" } } Interestingly, you can use demo_timescale command to slow down the playback and create interesting "bullettime" sequences.
oh, I see.. it's a real shame then if it doesn't work for recording. :(
as I said above, you can edit the demo you're VIEWING as much as you like, the recorder is not broken, it'll record the gameplay 'raw' it ignores all commands ran, and all addons etc.
Actually, I was wrong. It is indeed impossible to remove this name tag during demo playback. This name tag only disappeared from the screen during gm_demo_to_video recording (but appeared later in the video itself). cl_drawhud is 0, crosshair is disabled, r_drawviewmodel is 0, I've tried Lua solution but nothing seems to work. These name tags must be embedded deep into Source engine, considering how hard it is to remove them. If anyone has any idea - please post here, it'd be very helpful. [IMG]https://s18.postimg.org/4tu4kibbd/Untitled.png[/IMG]
Can you use the old-fashioned startmovie then play the demo normally instead? Sorry for the lousy suggestions/comments but I figured anything that might spark an idea in your head is good :)
Run this in the console: [CODE]lua_run_cl hook.Add("HUDDrawTargetID", "hideplayerhp", function() return "GO AWAY" end) [/CODE] Display it again with: [CODE]lua_run_cl hook.Remove("HUDDrawTargetID", "hideplayerhp")[/CODE]
[QUOTE=Remixful;51166812]-snip-[/QUOTE] I've said it two times, now I'll say it a third time, he uses the built-in demo-to-video converter, wich ignores EVERY CUSTOM THING -- LUA AND COMMANDS. It makes the video from RAW MATERIAL. IF you want custom stuff including (Name tag removal) you need to play the demo with normal playback, do your Lua/Commands and record it using a Program Like NVIDIA ShadowPlay, Fraps or OBS.
[QUOTE=NeatNit;51166775]Can you use the old-fashioned startmovie then play the demo normally instead? Sorry for the lousy suggestions/comments but I figured anything that might spark an idea in your head is good :)[/QUOTE] Yes, I've tried that, does not help unfortunately. I've even tried to save movies as a series of .tga screenshots - and on each .tga image there was this name tag. [editline]7th October 2016[/editline] [QUOTE=whitestar;51166960]I've said it two times, now I'll say it a third time, he uses the built-in demo-to-video converter, wich ignores EVERY CUSTOM THING -- LUA AND COMMANDS. It makes the video from RAW MATERIAL. IF you want custom stuff including (Name tag removal) you need to play the demo with normal playback, do your Lua/Commands and record it using a Program Like NVIDIA ShadowPlay, Fraps or OBS.[/QUOTE] I may not explain it clearly enough (English is not my native), but I thought I said this in the previous post. This is not related to video recording mechanism, the issue also appears during normal usual demo playback. I did not realize that at first, because I was only interested in video recording, and I mistakenly linked this to video recording. Just to be 100% clear, steps to reproduce: - start gmod dedicated server - Player1 and Player2 connect to server. Player1 stares at Player2, which means he points his crosshair at Player2. - Player1 starts demo recording (record test.dem), and then stops. - Player1 plays the demo using command "playdemo test.dem". The name tag will appear on the screen no matter what. Actually it is very easy to remove this name tag during normal gameplay - all of the above solutions work, including LUA hooks, cl_drawhud etc. But during demo playback the name tag always appears, and I found no way to remove it. The name tag also appears if you use demo smoother. E.g. when you recorded the demo you didn't look at Player2, but if in demo smoother you create "camera" (make key) which looks at Player2, name tag will appear in the middle of the screen.
[QUOTE=whitestar;51166960]I've said it two times, now I'll say it a third time, he uses the built-in demo-to-video converter, wich ignores EVERY CUSTOM THING -- LUA AND COMMANDS. It makes the video from RAW MATERIAL. IF you want custom stuff including (Name tag removal) you need to play the demo with normal playback, do your Lua/Commands and record it using a Program Like NVIDIA ShadowPlay, Fraps or OBS.[/QUOTE] whitestar, but how do I actually do this? I started to think about it, but I don't know the way to execute Lua code during demo playback. What is the proper way of doing this? I mean, I can't even print a simple message to console. "lua_run" and "lua_run_cl" seem to be completely ignored. I know that there's no "server" during demo playback, so is there actually a way to execute Lua code during "playdemo"? [editline]8th October 2016[/editline] Also, I wanted to ask a little favor. If someone has spare three minutes, could you please reproduce this problem to make sure it does not happen only on my computer? I still have suspicion that some of the addons may mess with this, but I can't remove them now (I tried to disable them all, it didn't change anything). So, to do this you just need to login to sandbox server, stare at someone and record demo. Then please tell me if you can or cannot play it back without the name tag on screen. I would really really appreciate this :)
Sorry, you need to Log In to post a reply to this thread.