Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draw entities and viewmodel from first frame of demo #24

Open
SmileyAG opened this issue Sep 5, 2021 · 4 comments
Open

Draw entities and viewmodel from first frame of demo #24

SmileyAG opened this issue Sep 5, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@SmileyAG
Copy link
Contributor

SmileyAG commented Sep 5, 2021

Continue of #2 (comment):

Currently, capturing of segmented runs based on output from bxt_play_run and adding additional frames from begin and end of demo, which got recorded with viewdemo cmd.

However, one of extra step as recording begin frames with viewdemo can be skipped, if we could somehow draw entities and viewmodel from first frame of demo in playdemo & bxt_play_run.

Demonstration of the issue:

frames.mp4
@khanghugo
Copy link
Contributor

khanghugo commented Feb 18, 2023

viewdemo is definitely superior to play demo properly (for segmentation at the least). playdemo has more broken frames at the beginning but somehow viewdemo skips them by default and even renders viewmodel on the "first" frame that playdemo does not render.

From what I see, the respective "first frame" for playdemo is a real frame with no viewmodel and for viewdemo is an unnecessary broken frame. The PR I had there is for playdemo because I have never worked with viewdemo but I tested a bit and it works okay too with the settings I prefer (skipping the first frame). It is just that bxt_cap_start does not automatically stop for viewdemo. Maybe that is worth adding or working around?

@SmileyAG
Copy link
Contributor Author

SmileyAG commented Feb 18, 2023

viewdemo is definitely superior to play demo properly (for segmentation at the least)

Well, let me tell you why using viewdemo for full recording is the worst crime against humanity that you can do:

  • viewdemo always missing of some game sounds at playback
  • Death animation of monsters in viewdemo can makes them stay freeze in the air
  • viewdemo draw only a first submodel of the weapon and cannot others (e.g. Fists and knife from Gunman Chronicles is the same weapon, means that if you played with a knife - it would draw in viewdemo as fists instead)
  • viewdemo can missing some effects of firing from the weapon
  • If demo contains a changelevel to the next map, then viewdemo playback would stuck in the end of first map

From my rendering experience (example of my work: https://www.youtube.com/watch?v=jHiHvFtQFWk) I can definitely tell you that viewdemo loses to playdemo in everything and I wouldn't recommend to anyone make a full recording of demos with it

The only advantage of viewdemo is that it stores a bit more of first and last frames from the demo, while in playdemo it seems they are cut off

TLDR: Full capturing of demos I'm doing with playdemo, and viewdemo is used ONLY to getting a few frames from beginning and end of the demo

@YaLTeR
Copy link
Owner

YaLTeR commented Feb 18, 2023

Well, let me tell you why using viewdemo for full recording is the worst crime against humanity that you can do:

got a bit carried away there

@khanghugo
Copy link
Contributor

khanghugo commented Feb 18, 2023

Preach.

Thanks for the info.
I thought you were using viewdemo because the first post said so. Regardless, the mentioned PR should work for both.

From my brief time looking at how the viewmodel values are stored, which you can check from the mentiond PR, in client_state_s cl.stats[2]. The real first frame of the demo is definitely there when the viewmodel values are assigned but no viewmodel rendered. If you are so kind to test out the PR, please do and see if it is to your liking (from #2).

At the very least I can have sound sleep every night knowing that I have yet to commit the cardinal sin of using viewdemo because bxt-rs doesn't have that option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants