Halomods Community Portal: Raw data - Halomods Community Portal

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2nd Gen
Raw data

#1 User is offline   bumlove 

  • Learning to program, women and children first
  • PipPipPip
  • Group: Members
  • Joined: 05-May 11
  • LocationT' West Ridding of Yorkshire

Posted 06 February 2012 - 02:54 PM

Idk why but when I heard "RAW DATA" back when I started modding it scared me [I said IDK why]
now that I'm just just just starting to program (esentially slinging a binary reader all over the place) I am wondering just why no program/programer has looked at this data (I haven't checked mode out yet click)
I vaigly understand what "mode" does what would I see looking at bsp raw (what is there that the BSP tag misses?) or any other raw? animation raw has been delved into I know but it scared me so avoided it

edit

Reviewed the program "mode" by Click/mike why has this kind of daTA been ignored?! If I understand right, amazing bsp reskins should be possible

This post has been edited by bumlove: 06 February 2012 - 03:10 PM


#2 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 06 February 2012 - 04:49 PM

Programs exist for altering most raw data types...
Bitmap, Sound, Model etc...

As far as i'm aware the only thing without much coverage is bsp raw...
but you need somewhere to start and bsp raw doesn't really provide one...

#3 User is offline   kornman00 

  • SourceGuy 2.0
  • View blog
  • Group: Administrators
  • Joined: 15-November 01


Users Awards

Posted 06 February 2012 - 06:14 PM

For Halo2's cache resources (ie, raw data), it's actually just pools of tag block, data, and vertex buffer data. BlamLib has all of this setup and documented for the most part (eg, CacheableResources.cs).

Technically speaking, raw data which isn't part of the global tag buffer is referred to as the geometry cache (though, multilingual strings are an exception to this, as their resource data has it's own dedicated storage scheme). However, it's not just geometry which is stored in these caches (which are dynamically streamed in during the game). Sounds, bitmaps, etc run on the geometry cache system.

I've written code in BlamLib to pretty much take any tag's geometry block info and 'reconstruct' them for use as tags with the HEK (eg, here's the code for reconstructing BSP resources).

When in source (ie, tag file) form, resource data is stored within a tag's 'geometry block info' field. Later when the cache for a scenario is built, the tag fields associated with the geometry block info are streamed to pagable (ie, dynamically streamable) sections in the cache file itself.

When in source form, resource data is in a platform-independent form. When a cache is built, data is baked into the format best fitted for the target platform (ie, it's morphed into platform-dependent data). In the case of a render model's vertices, the 'raw vertex' elements (found in the source tag) are processed into 'vertex buffer' elements and fields. The Xbox has different vertex buffer formats than the PC (eg, PC doesn't support compressed vertex formats, where the Xbox does). However, BlamLib has the definitions for each platform (including the Halo2 Xbox MP Alpha) and can read and process their specific vertex buffers. I use the VertexBufferInterface for implementing the Halo2 tag reconstruction code (for render models, this includes taking the platform dependent vertex buffers and recreating the source 'raw vertex' tag fields).


It's been well over a year since I messed with this part of Halo2 and BlamLib's code so I might have missed something or such.

#4 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 06 February 2012 - 07:41 PM

I don't understand blamlib, it does have enough documentation or simple examples...

#5 User is offline   kornman00 

  • SourceGuy 2.0
  • View blog
  • Group: Administrators
  • Joined: 15-November 01


Users Awards

Posted 06 February 2012 - 10:12 PM

Refer to BlamLib.Test, it has a bunch of test cases which also demonstrate how the top level APIs work, and you can go deeper from there.

#6 User is offline   XZodia 

  • Code Monkey
  • Group: Moderators
  • Joined: 05-May 11
  • LocationScotland


Users Awards

Posted 07 February 2012 - 12:14 AM

I've looked at the ones for halo 2, they're not very helpful...
I'm not even sure what they do...

#7 User is offline   Kant 

  • Newbie
  • Pip
  • Group: Members
  • Joined: 09-August 11

Posted 24 February 2012 - 02:22 AM

Korn most people who look at your source aren't going to understand it because its got things that go into different classes everywhere, it took me a good while to get to understanding it and some parts still confuse me.

#8 User is offline   kornman00 

  • SourceGuy 2.0
  • View blog
  • Group: Administrators
  • Joined: 15-November 01


Users Awards

Posted 24 February 2012 - 03:07 PM

The same can be said about .NET, or any other large framework. There's always a learning curve. Especially since not everyone actually understands some of the underlying engine concepts (not to same I'm a know-it-all). If BlamLib was rewritten today, there would be far more encapsulation (quite a few places that need to be decoupled). It's meant to be OO after all.

#9 User is offline   bumlove 

  • Learning to program, women and children first
  • PipPipPip
  • Group: Members
  • Joined: 05-May 11
  • LocationT' West Ridding of Yorkshire

Posted 24 March 2012 - 10:41 AM

kornman00 said:

There's always a learning curve cliff


I'll post here to ask will the open sauce project allow cache editing or will all the official stuff be source? and hence we'll have to code our own backwards xbox noobish butcheries

#10 User is offline   kornman00 

  • SourceGuy 2.0
  • View blog
  • Group: Administrators
  • Joined: 15-November 01


Users Awards

Posted 24 March 2012 - 05:12 PM

There will never be any official cache-editing support, though it won't be too difficult to implement rudimentary (no adding new block elements, etc) saving back to the cache.

You're walking the wrong way if you're trying to edit tags via the cache in Halo2. There's a ton of postprocessed data which only tool fills out when building a cache (and in BlamLib, some of these fields are still identified as padding, so they're lost when read from a cache). Then there are tags which get postprocessed into completely different formats, like shaders. They don't retain their source (tag) data when they're built into a cache.

BlamLib already supports tag extraction and can reconstruct 90% of tag groups as source tags based on data from a cache file. The only "backwards xbox noobish butcheries" that really need to be done is a tool which converts an H2V map into an H2X map, which really isn't that complicated.

#11 User is offline   bumlove 

  • Learning to program, women and children first
  • PipPipPip
  • Group: Members
  • Joined: 05-May 11
  • LocationT' West Ridding of Yorkshire

Posted 26 March 2012 - 04:53 PM

kornman00 said:

it won't be too difficult to implement rudimentary (no adding new block elements, etc) saving back to the cache.


Thanks for the reply, you're of course thinking of the big picture, I on the other hand am thinking towards tiny details, (like using RTH to fine tuning effe's, essentailly editing stuff not adding)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users