quanticc / lawena-recording-tool

Simple movie recording tool for Source Engine games
http://lawena.github.io/
GNU General Public License v3.0
80 stars 16 forks source link

Create CS:GO port #47

Closed quanticc closed 9 years ago

quanticc commented 9 years ago

Support for CS:GO is already present in the v4.x/snapshot update branch. We are still testing it behaves as expected. Additional features will be added after stability is consistent.

Can be downloaded from: https://www.dropbox.com/s/qbf8oj3301nknhr/lawena-snapshot-4.2.0-pre.2-60-g0ae61d9.zip?dl=0

Roadmap to basic functionality:

Future: Further integration with SrcDemo2/VirtualDub/HandBrake for recorded frame segments will be worked on both TF2 and CS:GO after basic functionality is working.

quanticc commented 9 years ago

High quality config, thanks SAS41! - https://gist.github.com/iabarca/90a97dbeb9e707b7ebfb Static commands to clean the interface - https://gist.github.com/iabarca/d44956abbb5f39fa21f9 Cvars that could be user-selectable - https://gist.github.com/iabarca/32d4fa55acc4a6707ed8

shaunidiot commented 9 years ago

Adding on : A list of updated commands can be found here : twowordbird

The most important commands will be (last link here)

Changing of skybox : sv_skyname skybox_name

List of skyboxes: https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Sky_List

Will you be creating a new branch for this, a new repo entirely or just using v4.x?

quanticc commented 9 years ago

I've created a branch off v4.x for now (#48)

Changes expected:

Those are mainly cosmetic changes, so the transition doesn't look like you're running TF2, but internally you could already hack the tool to run csgo on the feature branch from #48, taking advantage of the folder structure it creates under the "lwrt" folder.

Also adding that I'm most likely to work on this stuff no earlier than January 6th, where I have some spare time. If you would like to contribute I'll gladly accept your pull requests from your branch to csgo-support. Program can be run using gradlew command.

quanticc commented 9 years ago

In TF2 cl_drawhud is bound to a certain key as seen here. I think that behavior is ok, giving the option to choose one or another state within the game.

Crosshair is present in the UI as a checkbox. Same should happen for CS:GO. Also in TF2 there's an alias to prevent further changes to the crosshair cvar, since it might change during playback due to cvar changes getting recorded in pov demos. I'm not sure if this happens to CS:GO demos.

About cl_draw_only_deathnotices 1 I don't know what is better: (a) give the option to set it in the UI, (b) fixing the 1 value, (c) add a keybinding similar to cl_drawhud or both (a) and (c).

voice_caster_enable should definitely be in a checkbox so the user can decide whether to keep it disabled or not.

Question about skyboxes, can you change skyboxes during demo playback with that command? If not, does it work like TF2 where you can "trick" the game by replacing your own skybox with the same filenames of all default skybox files inside a custom folder?

Another question on a different matter. In TF2 I bundle a couple of HUDs where one of them offers partial elements visible, like a middle ground between killfeed-only and full hud. Is this possible to do/desired/expected in CS:GO?

Thanks for the help!

shaunidiot commented 9 years ago

P.S: I have some broken English in there and I know it. So sorry. My English isn't that good :(

Edit: Just tried a few old HUD and CS:GO just crashes. "swf file is invalid" or some sort. Seems like some things were changed in the HUDs. Best to just disable and ignore custom HUDs editing for now. cl_draw_only_deathnotices should probably make the screen as clean as possible.

Edit 2 : Will try out POVs demo to see if crosshair changes accordingly.

Edit 3: Crosshair stays the same throughout the demo. It follows whatever the user has. Or did I do something wrong here? All I did was download a POV demo and played it. Player's crosshair stays the same as mine.

quanticc commented 9 years ago

Thanks for the feedback, glad to know about the skyboxes thing. I think the tool won't have much custom options to choose from then, too restricted, but it's still fine in terms of simplicity.

English is not my native language either. It's working out just fine :earth_americas:

shaunidiot commented 9 years ago

Sure no problem. Glad to help! I'll search for more commands along the way as you update the repository. Another command sv_ignoregrenaderadio 1 turn off radio commands when grenade is being thrown.

quanticc commented 9 years ago

Managed to test some stuff. I've learned a few things, there is no custom folder in CS:Go, everything must go through cfg folder, ugh.

dubbled commented 9 years ago

I know it's just a hassle but can't you just move the user's regular config to a backup folder and put a movie config in it's place?

dubbled commented 9 years ago

We should also probably add an FOV slider, or just leave it at 90.

quanticc commented 9 years ago

Hi, no hassle at all. I've realized that CS:GO doesn't use custom folders so, is it only the cfg folder that can contain custom content then?

Also I don't know what qualifies as a high quality config for CS:GO, do you think this file is appropiate (graphics wise)?

Any feedback would be appreciated.

Edit: Basically I just want to know what kind of custom stuff you can add to the game during demo playback besides custom cfgs. For instance you can put model replacements, custom skyboxes, texture changes in TF2.

quanticc commented 9 years ago

Alright, it's possible to test stuff with this working version: lawena-snapshot-4.2.0-pre.2-34 (Edit: Link removed, check latest version on the first comment)

It contains the core features, now your feedback is required. Commit details are at #48

Instructions: extract, run lawena.exe and select Counter-Strike: Global Offensive.

Thanks @Dubbled, @SAS41 and @shaunidiot so far.

dubbled commented 9 years ago

I believe mat_postprocess_enable 0 should be added as well to the config.

quanticc commented 9 years ago

Ok, that can be added directly to recording.cfg inside lwrt/csgo/config/cfg (link). No need to bundle it in a commit yet.

quanticc commented 9 years ago

I've been reading this thread and applied some convars and settings to the pull request before I merged it. Files/settings are loaded correctly, but I need to test the values if they are having any effect.

Other things I've learned..

Posting here as update, I'll research about those topics and make the fixes next Wednesday.

dubbled commented 9 years ago
dubbled commented 9 years ago

Ok, so I've attempted to record using the version you posted on the 31st, and it seems there is a problem with the recording config. Once the frames have been rendered and the wav recorded, the wav sound is glitched as if host_timescale is set to 0 instead of 1, but this is not the case as I have attempted to change to host_timescale 1 and this has not resolved the problem.

quanticc commented 9 years ago

Alright, but the config in that exact version was updated. Can you check updating that version to latest one (4.2.0-pre.2-37)

If you already did, files loaded into csgo are these: https://github.com/iabarca/lawena-recording-tool/tree/v4.x/lwrt/csgo/config/cfg

In particular, recording.cfg has the recording stuff. I've noticed that almost all of the commands there are not working due to being "locked" (says unknown command).

I'm going to change host_timescale to demo_timescale: https://github.com/iabarca/lawena-recording-tool/blob/v4.x/lwrt/csgo/config/cfg/recbindings.cfg#L63

Also defaulting host_timescale to 0

That might solve it. Thanks

Edit: line 63, not 64

quanticc commented 9 years ago

Updated to 4.2.0-pre.2-42 of snapshot branch, reflecting above changes.

O keybind toggles between host_timescale 0 (Lawena default) and host_timescale 1

dubbled commented 9 years ago

Ok, 4.2.0-pre.2-42 has solved the no audio problem. I was able to record with host_timescale 1 and have no demo bugs. Here is a 60 fps H.264 render.

https://www.youtube.com/watch?v=kXWIu3WdgdU

dubbled commented 9 years ago

OK! I've done some more testing after a little bit of a hiatus and I've decided a couple of things should be changed to make the tool easier to use:

quanticc commented 9 years ago

Awesome, glad to have you back.

The suggestions are great but I'm not sure if startmovie can be used to do video-only or audio-only passes. I know that if you ignore the video and audio parameter, it just uses tga/wav by default. Have you confirmed that startmovie x wav works?

At the moment, the only way I know to avoid wasting disk space by doing two passes would be using SrcDemo2.

dubbled commented 9 years ago

I have confirmed that you can use startmovie x wav. Run just startmovie and check out the output to look at the other options. We can also use startmovie x tga to do video only.

quanticc commented 9 years ago

Perfect. I'll be adapting the record bindings to allow for video-only and audio-only segments. Thanks

quanticc commented 9 years ago

Okay, pushed a couple commits, latest version is now 4.2.0-pre.2-59. It should allow recording of video only and audio only segments using F1 and F2 respectively.

Also added a way to remember game selection to avoid choosing game each time.

Edit: Made some corrections

dubbled commented 9 years ago

Sounds good. Two things:

quanticc commented 9 years ago

bind F4 toggle sv_skyname cs_baggage_skybox_ embassy italy jungle office sky_cs15_daylight01_hdr sky_cs15_daylight02_hdr sky_cs15_daylight03_hdr sky_cs15_daylight04_hdr sky_dust vietnam vertigoblue_hdr

dubbled commented 9 years ago

I believe the skybox issues could be sorted using the same method as the recording framerate. Since the TF2 and CS:GO functionality are separate (from what I understand) wouldn't it be possible to do lines.add("sv_skyboxname " + skybox);?

dubbled commented 9 years ago

I'll clarify. If there is a specific skybox selected in the drop down, do lines.add("alias startrecording "demo_timescale 0.001; recframerate; bind P stoprecording; sv_skyboxname " + skybox"); to recbindings.cfg. If the skybox is set to default, just leave out the skybox part.

quanticc commented 9 years ago

I thought you could change skyboxes during the demo playback. Is that correct?

dubbled commented 9 years ago

You can.

quanticc commented 9 years ago

At the moment I think It's not practical to extract the official vpks to get the skybox files and show preview images for the user to select, since the selected skybox can be modified in-game using sv_skyname command (this is not possible in TF2). I think a toggle (or group of aliases) to rotate between all available skyboxes should be enough.

quanticc commented 9 years ago

I pushed something to cover the skybox changing. Therefore I'm closing this since the basic functionality is available and working relatively fine. Next step will be adding the VirtualDub integration.

Further improvements or fixes to the cs:go version are going to their respective issues.