MGS4 3D engine post mortem [translation needed]

Discussion in 'Console Technology' started by gongo, Sep 13, 2008.

  1. one

    one Unruly Member
    Veteran

    Joined:
    Jul 26, 2004
    Messages:
    4,838
    Likes Received:
    167
    Location:
    Minato-ku, Tokyo
    So here's my summary of the Game Watch article for one of the MGS4 sessions at CEDEC 2008.
    http://www.watch.impress.co.jp/game/docs/20080912/cedec_mgs.htm

    First this pic
    http://www.watch.impress.co.jp/game/docs/20080912/mgs04.htm
    from another MGS4 session about its artistic design workflow.
    This session on another day is covered by other articles such as
    http://www.gpara.com/article/cms_show.php?c_id=9335&c_num=56
    http://www.famitsu.com/game/news/1217941_1124.html
    According to them, MGS4's art was produced by 100 Konami employees and other exterior staff. 30 people for motion, 20 for maps, 20 for mechs, and others. 1 map consists of 0.25-0.35 million polygons for the final version (0.8 million in the 2005 trailer). Characters are 5,000 - 10,000 polygons (Snake is 14,000 polygons) and main characters have 115 bones on average. Also characters have 5 shaders on average such as eye, hair, skin. Plus they have normal maps and facial rigs.

    OK back to the Game Watch article.

    MGS4 adopted HDR lighting for the first time in the series to represent the mix of the light and the dark more realistically
    http://www.watch.impress.co.jp/game/docs/20080912/mgs05.htm
    or to make blur and DOF look better.

    At first they did it with FP16 but they eventually abandoned FP16 and adopted 32bit/pixel HDR encoding since MSAA can't coexist with FP16 on PS3 due to memory restriction. To render alpha with this HDR method, they used mini blend-buffer.

    HDR encoding buffer and tone-mapped color buffer
    http://www.watch.impress.co.jp/game/docs/20080912/mgs06.htm
    non-opaque buffer rendered by HDR encoding and non-HDR blend buffer
    http://www.watch.impress.co.jp/game/docs/20080912/mgs07.htm
    HDR non-opaque buffer, blend buffer for efects, mini blend buffer for effects
    http://www.watch.impress.co.jp/game/docs/20080912/mgs08.htm

    As for lighting, a character has
    • Parallel light (w/ shadow)
    • 2 parallel lights
    • Ambient light
    • Rim light
    • 2 point/spot lights
    For the background
    • Parallel light (w/ shadow)
    • Prebaked ambient light (baked by XSI)
    • Separated pre-lighting (baked by PS3)
    • 2 point/spot lights
    http://www.watch.impress.co.jp/game/docs/20080912/mgs09.htm

    Ambient light in MGS4 is hemisphere lighting and can be controlled by artists.
    http://www.watch.impress.co.jp/game/docs/20080912/mgs10.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs11.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs12.htm

    "Separated pre-lighting" is their moniker for radiosity normal mapping which was also used in HL2:EP1. Its merit is that it consumes less textures and can be adjusted dynamically. But it's not the most optimal method for RSX, so it requires additional culling and LOD.

    Separated pre-lighting works for both direct lights and ambient-occlusion-like effects
    http://www.watch.impress.co.jp/game/docs/20080912/mgs13.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs14.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs15.htm

    Effects in MGS4 were done by the same old method as in MGS3, changing vertex colors, due to texture size restroction.
    http://www.watch.impress.co.jp/game/docs/20080912/cedec_mgs.htm
    (Apparently it was surprising for most devs in the room and induced some laughs) But Snake has some special effects and the specular level changes when he's wet.

    For snow, it computes how much snow is on every vertex in a snow-cover model and bakes it as an alpha, then kills pixels when polygon's alpha doesn't surpass texture luminance as a threashold for pixel appearance.
    http://www.watch.impress.co.jp/game/docs/20080912/mgs17.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs18.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs19.htm

    For water, they tested simulation but it was not looking good. Instead they end up using pseudo effects that look cooler.
    http://www.watch.impress.co.jp/game/docs/20080912/mgs20.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs21.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs22.htm

    For depth of field, they used 19-point sampling by shader or a lite version of it with less processing load scene by scene.

    Fog effects (sand/snow) in front of camera was present in MGS3 too but they did it with full-screen smoke textures on PS2 since alpha was not available. On PS3, they used a 1/16-size buffer for shader effects and adjusted density and brightness while seeing depth when synthesizing it with a frame buffer.
    http://www.watch.impress.co.jp/game/docs/20080912/mgs23.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs24.htm
    http://www.watch.impress.co.jp/game/docs/20080912/mgs25.htm

    Finally the "polygon demo" system aka realtime movies. The realtime cutscene system first appeared in MGS 1. Realtime cutscenes are called "polydemo" among Konami developers.
    http://www.watch.impress.co.jp/game/docs/20080912/mgs26.htm

    As merits of realtime movies, the Konami developer cited smaller size, long playback time, interactivity, seamlessness, and faster reaction to dynamic design changes. In MGS4, realtime movie data are compressed by the chronological order and packetized per frame. After subtitles and sound are added, all of them are encoded into a special stream format. With an in-house 3dsMax plugin designers can modify it. Preview on PS3 is also possible. To suppress data-size explosion of next-gen assets, far-camera character data are more compressed. (In the Q&A time one of questions was about what on the Blu-ray disc is taking that much size, but Konami developers didn't disclose it at the event.)

    2D movies are also realtime to suppress data size. It's on a 2D animation system that is data-compatible with Adobe Flash (but it doesn't have ActionScript and other advanced functions). This system was also used in MGS games on PSP and DS. They could use professional Flash authoring tools to save development time and cost.

    As the last words, the Konami developer suggested the PS3 spec was still fluid when they started MGS4 development. The difficulties they encountered in this "porting" job to the final PS3 even include the scope the coordinate system can express, or unsupported functions. So it's not your typical "RSX vs 7800" discussion.
     
    #221 one, Oct 21, 2008
    Last edited by a moderator: Oct 21, 2008
  2. Fox5

    Veteran

    Joined:
    Mar 22, 2002
    Messages:
    3,674
    Likes Received:
    5
    If they're forcing a mandatory install, they could just use some ultra compression scheme (lossless for data, lossy for images). Say LZH compression for the data, JPEG for textures or some such. Files could either be kept in a packed form and take advantage of the extra available free memory, harddrive, and when lacking an install option, the faster disc speed, on the 360 (streaming archives in as needed) and decompressing/converting on the fly. Think Live CD. Even better if they have some cpu power left over specifically for the streaming and such. Then again, if they weren't able to find things to multithread, they're probably not going to be looking into exotic archival schemes.
    Zip would probably be a better compression format than LZH though. The lossless stuff isn't going to compress that much more with one over the other, and I believe zip allows for an archive to be mounted and read part by part whereas I think most more advanced compression algorithms need the whole thing loaded in. Or do they? How do live cds do it, they certainly don't load all 4GB of data into memory, or even the 700MB image file, so they must be decompressing on the fly.

    Alternatively, everything could be compressed on the disk and just decompressed for the install. Think...just about every PC game these days. They would need to do the same installation per act thing as the PS3 version though, and at that point why not just split into multiple disks? The cost of a few extra disks might be comparable to the cost of man hours for figuring out how to compress or strip things down to fit. It's not just paying people to figure out how to make the game fit, that's also taking them away from other potential work.
     
  3. Brad Grenz

    Brad Grenz Philosopher & Poet
    Veteran

    Joined:
    Mar 3, 2005
    Messages:
    2,531
    Likes Received:
    2
    Location:
    Oregon
    This part, to me, suggests that there's a lot more going on in the huge demo.dat than just a bunch of audio that can easily be compressed further.
     
  4. Lefungus

    Regular

    Joined:
    Feb 6, 2002
    Messages:
    271
    Likes Received:
    124
    I remember reading somewhere that MGS4 was using LPCM 7.1 uncompressed sound. At the times, I was surprised at them not using a lossless codec.
    If this rumor is true, then squeezing the game into a few dvds should be easier as you can gain somehow around 50% by using lossless compression, and even more with lossy.
     
  5. inefficient

    Veteran

    Joined:
    May 5, 2004
    Messages:
    2,121
    Likes Received:
    53
    Location:
    Tokyo
    I don't know why people are so willing to believe Kojima Productions's programming team is incompetent.

    Compressed assets (textures, geometry, audio) have been a defacto standard for a long time now. This is not something new or revolutionary. Of course it was compressed.

    The whole uncompressed audio thing was misinformation and frankly quite a ridiculous notion.
     
  6. inefficient

    Veteran

    Joined:
    May 5, 2004
    Messages:
    2,121
    Likes Received:
    53
    Location:
    Tokyo
    There is a lot of BS information floating around out there. You will read lots of misinformation about MGS4.

    There is no 7.1 mix in MGS4 at all. The game only supports 5.1 Dolby Digital. I don't know why people keep insisting it is stored uncompressed on disc and in memory since it won't even output uncompressed audio.

    It's 5.1 DD period.
     
  7. Shifty Geezer

    Shifty Geezer uber-Troll!
    Moderator Legend

    Joined:
    Dec 7, 2004
    Messages:
    44,106
    Likes Received:
    16,898
    Location:
    Under my bridge
    You know, it makes sense that demo.dat is the cutscenes, as it's by far and away the largest file, and by far and away the majority of MGS 4 is cutscene :twisted:. If so, that'd make those far harder to split up/compress.
     
  8. betan

    Veteran

    Joined:
    Jan 26, 2007
    Messages:
    2,315
    Likes Received:
    0
    Why is it difficult to split?

    And for those who think MGS460 will require install, please get real.
     
  9. damienw

    Regular

    Joined:
    Sep 29, 2008
    Messages:
    513
    Likes Received:
    61
    Location:
    LA
    Well since nobody here knows the hardware in a 460, you may be correct.:lol:
     
  10. TheAlSpark

    TheAlSpark Moderator
    Moderator Legend

    Joined:
    Feb 29, 2004
    Messages:
    22,146
    Likes Received:
    8,533
    Location:
    ಠ_ಠ
    At the same time, let's also not forget the 4GB game cache that is already reserved on HDDs. Although it certainly would be pain to swap games (cache overwrite) and then have to go through the cache-streaming all over again, it's not like it didn't occur in Xbox days; Doom 3, FarCry Instincts, and Team Ninja games etc made you sit through an intro video of some sort before letting you go to the main menu. Even Halo 2 streamed 2GB's worth of content over any time it was able to do so without the user really experiencing a wait.
     
  11. Lefungus

    Regular

    Joined:
    Feb 6, 2002
    Messages:
    271
    Likes Received:
    124
    It is not that far-fetched when you consider that some blu-ray movies do contain uncompressed audio for their sound tracks (I haven't checked if it's 7.1 or 5.1 only). So as the specs allow it, maybe they thought 'we got plenty of storage space to spare, let's skip compression on audio'.

    Now, if DD5.1 has been confirmed, let's forget this silly subject.
     
  12. joker454

    Veteran

    Joined:
    Dec 28, 2006
    Messages:
    3,819
    Likes Received:
    139
    Location:
    So. Cal.
    Thanks for that summary. It's interesting that they vary the depth of field samples on a case by case basis, I guess the cutscenes really run at the performance edge. I don't even recall noticing a change in the depth of field look across different cutscenes so I guess that's a reasonable thing to do. Has there been any indication of what MGS4 does with the spus?
     
  13. SNAKE_EYES_EX

    Newcomer

    Joined:
    Oct 22, 2008
    Messages:
    1
    Likes Received:
    0
    Location:
    Chicago area
    I played MGS4 in 5.1 PCM with my PS3 connected to my receiver via HDMI. It was not in encoded in Dolby Digital when I played it.

    I think the confusion comes from people assuming that there is no compression on the sounds just because there is not a codec being used in the sound delivery to the pre-amp. Just because there wasn't a codec being used doesn't mean the sounds on the disc aren't compressed in some form - perhaps less on a Blu-ray than a DVD-9, but there are still runtime and memory considerations present in a game that aren't in a linear movie presentation.
     
  14. Brad Grenz

    Brad Grenz Philosopher & Poet
    Veteran

    Joined:
    Mar 3, 2005
    Messages:
    2,531
    Likes Received:
    2
    Location:
    Oregon
    Exactly, how the sound is stored on the disc is of no consequence to how it is output from the system. The sound effects, dialogue, music, etc, are mixed in real time and then encoded to whatever format is required by your audio set-up. HDMI to the receiver will allow uncompressed PCM, if your audio is through the optical output it could be DD or DTS, if you use the analog stereo output you're looking at Dolby Pro Logic II.

    And Blu-ray movie specs have no bearing whatsoever on PS3 games.
     
  15. rekator

    Regular

    Joined:
    Dec 21, 2006
    Messages:
    793
    Likes Received:
    30
    Location:
    France
    Sorry, but if you store your sound compressed on disk, you have no interest to output it uncompressed (speaking of PCM)… you have lost quality sound by the compressed stockage (all right only few people can made the difference)
    So if you want uncompressed sound output, you need uncompressed sound stockage…
    The only reason to store compressed sound and to proclaim to have uncompressed output is a marketing reason, but it's BS.
     
  16. assen

    Veteran

    Joined:
    May 21, 2003
    Messages:
    1,377
    Likes Received:
    19
    Location:
    Skirts of Vitosha
    All in all, I agree with the "only marketing" and "only few people" parts. But technically, after all the sound processing is done inside the game - spatial positioning, effects, reverb etc. - the sound is pretty far from what was stored on the disk, the decision whether to output it in 7.1 LPCM (as the PS3 allows virtually for free AFAIK) or only in 5.1 DD can be made separately from the decision of whether to compress it in the first place.

    To make an analogy with visuals: even if a game uses compressed textures, this doesn't mean it's OK for all purposes to use only JPEG screenshots. For pixel-counters (and audiophiles, which are roughly the same, but with thicker wallets) uncompressed is still better.
     
  17. Brad Grenz

    Brad Grenz Philosopher & Poet
    Veteran

    Joined:
    Mar 3, 2005
    Messages:
    2,531
    Likes Received:
    2
    Location:
    Oregon
    I'm not saying anything about marketing claims, only correcting a misconception that how a file is stored on the disk means it will necessarily be output in the same format. Your uncompressed sound files could ultimately reach the player via a lossy Dolby Digital bitstream and, likewise, your highly compressed MP3 audio files on disk could end up being delivered as an uncompressed multichannel PCM stream.
     
  18. catisfit

    Regular

    Joined:
    Oct 27, 2007
    Messages:
    638
    Likes Received:
    0
    What about lossless compression? :smile:
     
  19. one

    one Unruly Member
    Veteran

    Joined:
    Jul 26, 2004
    Messages:
    4,838
    Likes Received:
    167
    Location:
    Minato-ku, Tokyo
    Nothing more about actual hardware usage, if it had such info I'd have put the summary much earlier :smile:
     
  20. TrungGap

    Regular

    Joined:
    Jun 17, 2005
    Messages:
    578
    Likes Received:
    2
    Doesn't MSG4 contain multiple audio languages? Or is that only true of Europe? I'm sure if needed, they can drop multi-language feature...
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...