The Official Happiness Thread
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
Looks like good quality codez =)
However, I'm not quite sure how I'm meant to load a model's data from a map...
I see: Load(byte[] raw_data, DResource[] raw_resources, DCompressionRanges compression_ranges)
but where do I get raw_resources and compression_ranges?
I can has Read(BinaryReader br);?
However, I'm not quite sure how I'm meant to load a model's data from a map...
I see: Load(byte[] raw_data, DResource[] raw_resources, DCompressionRanges compression_ranges)
but where do I get raw_resources and compression_ranges?
I can has Read(BinaryReader br);?
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
Yea, tagblock loading is naff right now... You have to ask the map for one, then just pass out the properties from the model block.XZodia wrote:Looks like good quality codez =)
However, I'm not quite sure how I'm meant to load a model's data from a map...
I see: Load(byte[] raw_data, DResource[] raw_resources, DCompressionRanges compression_ranges)
but where do I get raw_resources and compression_ranges?
I can has Read(BinaryReader br);?
Code: Select all
MapStream map = new MapStream(@"C:\Users\stem\Documents\headlong.map");
model tag = (model)map.GetTag(map.FindFirst((tag_class)"mode", "bridge_light"));
var raw = tag.Sections[0].GetRawPointer();
map.Position = raw.Address;
byte[] raw_data = new byte[raw.Length];
map.Read(raw_data, 0, raw_data.Length);
Mesh mesh_data = new Mesh();
mesh_data.Load(raw_data, tag.Sections[0].GetSectionResources(), tag.GetBoundingBox().GetCompressionRanges());
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
After a bit of messing about, I'm down to this error, which I can't do anything about...
'Moonfish.Core.model.BoundingBox' does not contain a definition for 'GetCompressionRanges'
'Moonfish.Core.model.BoundingBox' does not contain a definition for 'GetCompressionRanges'
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
You might be be to call GetDefinition() on the model.BoundingBox object for the DCompressionRanges. I removed that property sometime I guess.XZodia wrote:After a bit of messing about, I'm down to this error, which I can't do anything about...
'Moonfish.Core.model.BoundingBox' does not contain a definition for 'GetCompressionRanges'
I just want to point out unless you're trying to edit the existing model or something you don't need to use the Load method to create a new model-tag for entity.
Just :
Code: Select all
Mesh mesh_data = new Mesh();
if (mesh_data.ImportFromWavefront(string_wavefront_filename))
{
mesh_data.ExportForEntity(folder, tagname);
}
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
Its not for entity, I need access to the vertices, triangles and uv's
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
XZodia wrote:Its not for entity, I need access to the vertices, triangles and uv's
Code: Select all
var map = new MapStream(@"C:\Users\stem\Documents\headlong.map");
var tag = (model)map["mode", "pallet"].Export();
Mesh mesh = new Mesh();
mesh.Load(tag.Sections[0].Raw, tag.Sections[0].Resources, tag.Compression[0]);
mesh.Indices;
mesh.Vertices;
mesh.ShaderGroups;
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
viewtopic.php?f=41&t=1942&p=36200#p36200
A few models work, but most don't...
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: Attempt to set the position to a negative value
System.IO.FileStream.set_Position (Int64 value)
Moonfish.Core.MapStream.set_Position (Int64 value) (at Assets/Editor/Moonfish/Moonfish.Core/MapStream.cs:176)
Moonfish.Core.ModelRaw.Moonfish.Core.IResource.CopyFrom (System.IO.Stream map) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:612)
Moonfish.Core.TagBlock.Parse (System.IO.Stream map) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:244)
Moonfish.Core.TagBlockList`1[Moonfish.Core.model+Section].Moonfish.Core.IFixedArray.CopyFrom (System.IO.Stream source) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:185)
Moonfish.Core.TagBlock.Parse (System.IO.Stream map) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:239)
Moonfish.Core.MapStream.GetTag (Moonfish.Core.Tag tag) (at Assets/Editor/Moonfish/Moonfish.Core/MapStream.cs:299)
Moonfish.Core.MapStream.Moonfish.Core.IMap.Export () (at Assets/Editor/Moonfish/Moonfish.Core/MapStream.cs:151)
A few models work, but most don't...
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: Attempt to set the position to a negative value
System.IO.FileStream.set_Position (Int64 value)
Moonfish.Core.MapStream.set_Position (Int64 value) (at Assets/Editor/Moonfish/Moonfish.Core/MapStream.cs:176)
Moonfish.Core.ModelRaw.Moonfish.Core.IResource.CopyFrom (System.IO.Stream map) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:612)
Moonfish.Core.TagBlock.Parse (System.IO.Stream map) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:244)
Moonfish.Core.TagBlockList`1[Moonfish.Core.model+Section].Moonfish.Core.IFixedArray.CopyFrom (System.IO.Stream source) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:185)
Moonfish.Core.TagBlock.Parse (System.IO.Stream map) (at Assets/Editor/Moonfish/Moonfish.Core/Structures/TagBlockDefinition.cs:239)
Moonfish.Core.MapStream.GetTag (Moonfish.Core.Tag tag) (at Assets/Editor/Moonfish/Moonfish.Core/MapStream.cs:299)
Moonfish.Core.MapStream.Moonfish.Core.IMap.Export () (at Assets/Editor/Moonfish/Moonfish.Core/MapStream.cs:151)
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
Internal models only right now, and I don't check in the code when setting the address :p
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
Your texture coordinates are wrong, they all come out as (0.5, 0.5)
Also, there appear to be missing vertices...
Can you explain how I use shader groups?
Finally, how would you feel about joining my efforts to turn unity into a halo 2 editor?
i.e. instead of using OpenTK, you use the UnityEngine libraries.
(cause its a pain for me to have to go through and switch them over each time) =P
It also means less work overall, because unity handles all the heavy lifting for rendering etc.
On topic happiness:
Various Banshee Permutations

Also, there appear to be missing vertices...
Can you explain how I use shader groups?
Finally, how would you feel about joining my efforts to turn unity into a halo 2 editor?
i.e. instead of using OpenTK, you use the UnityEngine libraries.
(cause its a pain for me to have to go through and switch them over each time) =P
It also means less work overall, because unity handles all the heavy lifting for rendering etc.
On topic happiness:
Various Banshee Permutations
- Attachments
-
- Halo 2 Banshee in Unity.png
- (133.52 KiB) Not downloaded yet
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
I wouldn't mind, I only really use value_types from OpenTK anyways, its not hard to write operators to convert between platforms. As for the texture coords I'm gonna take a look right now because I noticed that too. And I originally thought that the indices were a single strip, but that was a incorrect assumption. They are all the shader group strips laid end to end without degenerative tris between them: so to render it you actually need to use the start and length values in the groups.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
- Attachments
-
- Halo 2 Viewer.zip
- My Progress
- (2.76 MiB) Downloaded 361 times
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
an animation rig?
Btw, It just occurred to me that I gave you the wrong unity link, as I haven't tested it on 4.x I'm using http://download.unity3d.com/download_un ... -3.5.7.exe
Btw, It just occurred to me that I gave you the wrong unity link, as I haven't tested it on 4.x I'm using http://download.unity3d.com/download_un ... -3.5.7.exe
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
Been working a little bit on the Collada format, and for fun wanted to see if I could export the nodes for models into it. Was pretty straight forward... now to figure out how to export meshes and link them to nodes... I want to get model injection working up to at least rigid bones this time before moving onto jmad, coll, or phmo.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
Sounds like a plan.
Unity supports up to 4 node weights per vertex, H2 will likely be similar but may be less.
For each connected node, a vertex should have an index to the connected node and a floating point "weight" value (between 0 and 1).
http://docs.unity3d.com/Documentation/S ... eight.html
Unity supports up to 4 node weights per vertex, H2 will likely be similar but may be less.
For each connected node, a vertex should have an index to the connected node and a floating point "weight" value (between 0 and 1).
http://docs.unity3d.com/Documentation/S ... eight.html
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
My teams game (Tick Tock Toys) has been approved for the App Store! =)
Scheduled for release 24th February!
Scheduled for release 24th February!
- CaptainPoopface
- Posts: 714
- Joined: Sat Feb 16, 2008 5:47 am
Re: The Official Happiness Thread
Congratulations!
I wish I could leverage my creative output into a revenue stream...
I wish I could leverage my creative output into a revenue stream...
- DoorM4n
- Posts: 2154
- Joined: Sun Dec 09, 2007 3:01 am
- Location: Houston
Re: The Official Happiness Thread
damn! That is so awesome xzodia!!
- neodos
- Posts: 1493
- Joined: Sun Dec 09, 2007 8:58 pm
Re: The Official Happiness Thread
Grats XZodia, that's awesome! the Halo 2 to Unity app too, gotta try that!
- DoorM4n
- Posts: 2154
- Joined: Sun Dec 09, 2007 3:01 am
- Location: Houston
Re: The Official Happiness Thread
ZOMG halo 4 snipers is the greatest thing on earth!!!!
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread

Weee.
Also:
Congratulations Xzodia and Xzodia's team :p must feel good man.
boredom bonus:
http://files.remnantmods.com/jacksoncou ... _nodes.gif
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
Cool, are the nodes connected to the vertices?
And have you fixed the missing triangles?
I want to get this in unity =)
And have you fixed the missing triangles?
I want to get this in unity =)
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: The Official Happiness Thread
Adding the skinning information when exporting for Collada is my next check-point. Not there just yet. Collada is really dense to find anything out about how the format is supposed to work. And I'm not sure what you mean by missing triangles? How can they be missing?
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: The Official Happiness Thread
For example of missing triangles, see the pics of the banshee I uploaded.
For the skinning info, If you can read the it from the map, I can make it work in unity.
For the skinning info, If you can read the it from the map, I can make it work in unity.
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: The Official Happiness Thread
So my xbox 1 started turning on by itself as soon as you plugged it in, and the power button did not work at all. Opened it up for the 10th time in 2 weeks. Checked a couple resistors, traced a few circuits, etc. Finally found that there was some sort of black corrosion on the bottom of the board which had eaten through a trace for the power button circuit. Used some 24 gauge wire and patched it up, also cleaned a few areas of the board with alcohol to remove corrosion. Works like a charm, now I just need to get a hold of a Samsung SD616T dvd drive so I can spartan kick this Philips piece of shit out the window.
Don't snort the magic, we need it for the network.