fallen-angel / cfhoded Goto Github PK
View Code? Open in Web Editor NEWCFHodEd updated to work with Homeworld Remastered files
CFHodEd updated to work with Homeworld Remastered files
I have been able to open every file attempted with CFHodEd v.4.1.00 yet any attempt to open any HOD file with this (CFHodEd v.4.1.1.0 results in the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
at Homeworld2.HOD.Texture.Mip.ReadIFF(IFFReader IFF, String FourCC)
at Homeworld2.HOD.Texture.ReadIFF(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.HOD.HOD.ReadLMIPChunk(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.IFF.Chunk.Read()
at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining)
at Homeworld2.HOD.HOD.ReadHVMDChunk(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.IFF.Chunk.Read()
at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining)
at Homeworld2.HOD.HOD.Read(Stream stream)
at CFHodEd.HODEditorA._OpenHOD()
at CFHodEd.HODEditorA.mnuFileOpen_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
thomcomstock at yah oo dot etc.
Thank you for your time and hard work.
I'm trying to extract the backgrounds from the background_light.hods and running into some problems. (I'm working with the uncompressed old versions from release).
HWRM stores the high-resolution background in this _light.hod file instead of the old-school sphere mesh (which can still be extracted properly in CFHODED). When I look at the texture of these _light.hod files, the whole DDS image has a pink/purple tint to it, and loses much of the background information.
I was hoping you could shed some light on this issue.
It would appear that the same End Of Stream exception that occurs when attempting to open HW:RM files in old CFHodEd versions now also occurs in this one (both prerelase and stable versions on the releases page).
This suggests that Gearbox changed something again.
Given that this is probably the only way to get at the models I would like to request a fix.
Here is the Exception Details:
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Collections.Generic.List1.set_Capacity(Int32 value) at System.Collections.Generic.List
1.EnsureCapacity(Int32 min)
at GenericMesh.GPrimitiveGroup`1.set_IndiceCount(Int32 value)
at Homeworld2.HOD.EngineShape.ReadIFF(IFFReader IFF)
at Homeworld2.HOD.HOD.ReadETSHChunk(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.IFF.Chunk.Read()
at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining)
at Homeworld2.HOD.HOD.ReadDTRMChunk(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.IFF.Chunk.Read()
at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining)
at Homeworld2.HOD.HOD.Read(Stream stream)
at CFHodEd.HODEditorA._OpenHOD()
at CFHodEd.HODEditorA.mnuFileOpen_Click(Object sender, EventArgs e)
at CFHodEd.HODEditorA.tspOpen_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
What am I doing wrong?
Hello, I was wondering, has this tool been updated to open .HOD files from Homeworld Remastered? I'm aware of the fork where you mention it has been semi-updated to handle HWRM's format, but I am having issues where any files I open crash the program.
Can you update CFHodEd to where it can edit .hod files for the Homeworld Remastered 2.0 / 2.1 version?
"System.IO.EndOfStreamException: Unable to read beyond the end of the stream. at System.IO.__Error.EndOfFile() at System.IO.MemoryStream.InternalReadInt32() at System.IO.BinaryReader.ReadInt32() at Homeworld2.HOD.Texture.Mip.ReadIFF(IFFReader IFF, String FourCC) at Homeworld2.HOD.Texture.ReadIFF(IFFReader IFF, ChunkAttributes ChunkAttributes) at Homeworld2.HOD.HOD.ReadLMIPChunk(IFFReader IFF, ChunkAttributes ChunkAttributes) at Homeworld2.IFF.Chunk.Read() at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining) at Homeworld2.HOD.HOD.ReadHVMDChunk(IFFReader IFF, ChunkAttributes ChunkAttributes) at Homeworld2.IFF.Chunk.Read() at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining) at Homeworld2.HOD.HOD.Read(Stream stream) at CFHodEd.HODEditorA._OpenHOD() at CFHodEd.HODEditorA.mnuFileOpen_Click(Object sender, EventArgs e) at CFHodEd.HODEditorA.tspOpen_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)"
As per the title, for some reason the 2.0 release bugs out and crashes any time I try to load a strike craft (fighters/corvettes) - and strangely enough, only strike craft. Capital ships, utility vehicles and motherships load just fine, but anything smaller (in this case, the Kushan salvage corvette) gives the following error:
An unhandled exception has occured!
Exception Details
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value
at GenericMesh.GPrimitiveGroup`1.set_IndiceCount(Int32 value)
at Homeworld2.HOD.EngineShape.ReadIFF(IFFReader IFF)
at Homeworld2.HOD.HOD.ReadETSHChunk(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.IFF.Chunk.Read()
at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining)
at Homeworld2.HOD.HOD.ReadDTRMChunk(IFFReader IFF, ChunkAttributes ChunkAttributes)
at Homeworld2.IFF.Chunk.Read()
at Homeworld2.IFF.IFFReader.Parse(Boolean FromBegining)
at Homeworld2.HOD.HOD.Read(Stream stream)
at CFHodEd.HODEditorA._OpenHOD()
at CFHodEd.HODEditorA.mnuFileOpen_Click(Object sender, EventArgs e)
at CFHodEd.HODEditorA.tspOpen_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Trace Log
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "HIER"
Type: 'Form'
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "BMSH"
Type: 'Normal'
Version: 1401
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "BMSH"
Type: 'Normal'
Version: 1401
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "BMSH"
Type: 'Normal'
Version: 1401
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "MRKS"
Type: 'Default'
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "KDOP"
Type: 'Default'
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Warning: 0 : Mesh refers to invalid vertices.
CFHodEd.exe Information: 0 : Skipping chunk:
ID: "HIER"
Type: 'Form'
By any chance, does this have anything to do with the fact that Homeworld 2 strike craft are produced and act as squads instead of individual entities, since HW:R is built from the same engine? I think it might be worth looking into, if it turns out CFHodEd just doesn't know how to properly handle that or something.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.