Games Unravelling the Secrets of "Normality" (1996) (Read 5056 times) ANALYZE

  • Group: Member
  • Joined: Jun 18, 2013
  • Posts: 11
I have to confess that I know next to nothing about video formats and working with them. If you are willing to take a look, I can provide some video files from Realms of the Haunting. If you can come up with a way of converting them to a more common video format and back again, I can handle scaling the video in between. Which admittedly would probably be the least troublesome step in this process. Also, I would be most grateful.
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
Sent you a private message...
  • Avatar of quackgyver
  • Group: Member
  • Joined: Jun 3, 2013
  • Posts: 14
I have to confess that I know next to nothing about video formats and working with them. If you are willing to take a look, I can provide some video files from Realms of the Haunting. If you can come up with a way of converting them to a more common video format and back again, I can handle scaling the video in between. Which admittedly would probably be the least troublesome step in this process. Also, I would be most grateful.
 
I'm also a huge ROTH fan. :)​ 
 
Did you manage to get anything done on this?
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
ah sorry about that - I offered to help Crowley with this but had a lot of trouble trying to work out how to re-encode image frames back into a GDV video properly and took a break, and still haven't got back to it :( but I do intend to...
Last Edit: July 16, 2013, 11:57:22 am by denzquix
  • Group: Member
  • Joined: Jun 18, 2013
  • Posts: 11
If you can figure out a way to put resized frames back into the video file and have the game play it at that size, I'm willing to handle resizing all the thousand and thousands of frames myself. Someone who knew more about coding could probably cook up a macro or something to do that more automatically, but what the hell.
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
Hi zetper, thank you very much for these videos! I'm sorry about the code I posted here, not being immediately executable as it is. I do intend to change the scripts to Python at some point, and then they will run immediately (as long as you have Python installed), but I haven't yet been able to find the time to do this.
Last Edit: January 28, 2014, 12:02:43 pm by denzquix
  • Group: Member
  • Joined: Feb 16, 2014
  • Posts: 1
Hi! 
 
Thank you for figuring all of this out! :O
I found this thread when trying to figure out how to mod this game.
I was willing to spend a lot of time to figure it out (and still am) but then I found this thread. :D
It would be really awesome if we could work on this together although I have say I'm fairly new to reverse engineering games (and this forum).
 
My primary goal is to change as much from the game as I possibly can, so we could create new maps  and pictures and such.
I realize this will probably take a long time, though.
 
Kind Regards,
HiddenKnowledge
 
p.s. Sorry if my post seems slightly chaotic, I'm just so happy I found other people working on this. :)
Last Edit: February 16, 2014, 11:40:18 am by HiddenKnowledge
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
Welcome to salt world HiddenKnowledge!
 
Unfortunately I never got very far with working out how the 3D map data works... and even if I did, making a 3D tool to edit it would probably be pretty difficult/time-consuming.
 
On the other hand I'm pretty sure it should be possible to make a tool/script that can re-pack custom images into Normality textures/sprites (and animated GIFs for animated textures/sprites) using the info I found though.
  • Group: Member
  • Joined: Jun 18, 2013
  • Posts: 11
Have you gotten any further in figuring out if it might be possible to stick frames back into the video files?
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
I've been looking again at putting video frames back into a GDV file. Quite a big stumbling block that I hadn't explored until just recently is that the video format sets a hard limit on the amount of data that a compressed video-frame can take up -- previously, I'd kind of assumed that the reason the existing video files were aggressively, destructively compressed (dropped frames, extra-low-resolution frames, etc.) was just so the files would all fit on a CD-ROM. And since today we don't have to care about saving diskspace so much, I assumed we could have bigger, less-compressed files of higher quality/resolution without much fuss. But it turns out that the video format itself forces your hand -- there's actually not enough space allocated per-frame for every frame to have a high level of detail.
 
I'm sure it's possible to put modified frames back into a GDV, but it's hard to see right now how to do it without making the results look much worse. Hmm...
  • Group: Member
  • Joined: Jun 18, 2013
  • Posts: 11
As I've mentioned before, what I really want to do is scale the video up to less squashed proportions. I'm content to leave everything else as is. Have you been able to figure out what roughly is the maximum space allowed for a frame? The making of -video uses frames which are 320x400 instead of 320x280, and there are frames there which take slightly over 120 kilobytes. Scaling a random frame from 280 to 400 vertical resolution increases the size roughly from 80 to 120 kilobytes.
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
Scaling a random frame from 280 to 400 vertical resolution increases the size roughly from 80 to 120 kilobytes.
Yep, but that's uncompressed. The maximum compressed size for a video frame is encoded as a 16-bit integer, which means it has a hard maximum of 64K for a compressed frame. So: each 320x400 frame must compress to about 50% of its size in order to go in a .GDV file.

That's great for the frames that are mostly the same as the previous frame, or have a lot of places where the same pixel colour repeats many times in a row. But if not, the frame will be too big after compression. So, what happens then?

Well, one of several things. But in any case, the visual quality is going to be degraded. And since the whole point of what you want to do is to make the video look better, that seems like a problem...
Last Edit: July 01, 2014, 06:25:53 pm by denzquix
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
Okay Crowley9, I've been thinking about this some more, and I've come up with a possible solution.

Here's a proof-of-concept, the two GDVs that first play when RotH launches, at 320x400 instead of 320x280:

https://www.dropbox.com/s/luygjhmehykjfd5/GREMLOGO.zip?dl=1 (155mb)

I know there are a couple of glitches here. When the title appears, some pixels that should be white are turning black instead, and it looks like there's something flickering towards the bottom of the screen at regular intervals. I'm not sure why this is, yet, something's going wrong with the decoding/re-encoding. I need to do more investigation on that.

Also, the files are much bigger now, e.g. INTRO.GDV has gone from 88mb to 528mb. I can probably improve this too.

But otherwise, does this look like you would hope it would look? Let me know.

The trick that I used was to double the frame-rate, from 12fps to 24fps. The "odd" frames (1, 3, 5, etc.) draw about half the image, but do not get displayed when the video is playing. The even frames (2, 4, 6...) complete the rest of the image started by the previous frame, and then display it. It seems to work pretty well, and gets around the problem of limited space for compressed frames.
Last Edit: July 04, 2014, 10:53:21 am by denzquix
  • Group: Member
  • Joined: Jun 18, 2013
  • Posts: 11
Yes, that looks exactly as I hoped and expected it would. I noticed that first glitch also happening when the intro showed the dream about Rebecca, only there the pixels appear to be peach-colored. As for the flickering, I think you are referring to the subtitles. Those are positioned so that they would normally be on the black bar just below the video, but now of course the video overlaps them. Whether or not anything can be done about that, it is not part of this specific task, I think. And of course those can be turned off. Fortunately everybody in the game speaks clearly enough (that I can remember) that this is no big loss.

Thank you greatly for figuring things out so far. Hopefully you will manage to sort out that first glitch.
Last Edit: July 04, 2014, 12:26:31 pm by Crowley9
  • Avatar of denzquix
  • PipPipPipPipPip
  • Group: Member
  • Joined: Aug 22, 2012
  • Posts: 630
You're welcome, sorry it took so long to figure out. I'll get to work on fixing the glitch.
As for the flickering, I think you are referring to the subtitles. Those are positioned so that they would normally be on the black bar just below the video, but now of course the video overlaps them.
Oh right! Yeah, I forgot all about the subtitles. That's one less thing to worry about, at least.
  • Avatar of Broken Pencil
  • Group: Member
  • Joined: Aug 2, 2014
  • Posts: 4
Is this discussion still active? I'm new here, But I've been lurking this thread for a few days now. Anyways, this is really cool! Also, I made a very cool discovery:




Please note that this is a PDF, and that I do not own the original game.
"Spoo-eee!"
  • Avatar of dada
  • VILLAIN
  • PipPipPipPipPipPipPipPip
  • Group: Administrator
  • Joined: Dec 27, 2002
  • Posts: 5538
which PDF is that? funny how they mirrored the strategy guide, so you couldn't just lazily get all the answers. you had to make a commitment to cheat.
  • Avatar of Broken Pencil
  • Group: Member
  • Joined: Aug 2, 2014
  • Posts: 4
I am actually not sure... I downloaded it off the internet, so It's rather hard to determine. Maybe it's the GOG one.
 
EDIT: I'm sure it's the original. At the time, I'm sure it was hard to do it since you needed software. And most software on home computers couldn't do that back in 1996.
Well... Because I wan't born yet.
Last Edit: August 03, 2014, 02:59:56 pm by Broken Pencil
"Spoo-eee!"
  • Avatar of dada
  • VILLAIN
  • PipPipPipPipPipPipPipPip
  • Group: Administrator
  • Joined: Dec 27, 2002
  • Posts: 5538
or you just hold it in front of a mirror :)