Soffish Halo 2 Content Editor

This forum is for files only, Utilities and Hacks go here, not skins.
User avatar
kibito87




Stylist Connoisseur Advisor Bloodhound
Droplet Articulatist 500

Posts: 3461
Joined: Mon Feb 21, 2005 7:49 pm
Location: Ohio
Contact:

Post by kibito87 »

So all rotations actually work correctly now? If so, awesome. But yes, that is an awesome way to edit the rotations. Nice job.
Image
User avatar
DrXThirst




Connoisseur Foundry Pyre

Posts: 3011
Joined: Fri Jun 29, 2007 6:28 am
Location: Georgia
Contact:

Post by DrXThirst »

-DeToX- wrote:No. You can.
k.
Image
ManBearPig_06





Posts: 57
Joined: Tue Mar 27, 2007 5:53 pm

Post by ManBearPig_06 »

I thought that quaternions were easier to use than vectors only when dealing with a trailing float point behind a model. How/why are they being used here?
User avatar
xzodia




Translator Connoisseur Coagulator

Posts: 1981
Joined: Sun May 15, 2005 10:31 am
Location: UK
Contact:

Post by xzodia »

cause quaternions are a better >_>
there harder for humans but easier for computers lul
Image
Halo 2 Plugins | Lock-on To Just About Anything | My Sites | Snow Hog
Old Plugins you have, upgrade you must...
Always Maintain a High Quality-To-Crap Ratio.
User avatar
xbox7887




Socialist Coagulator Decryptor Advisor
Eureka Commentator Wave Scorched Earth

Posts: 2160
Joined: Mon Dec 27, 2004 6:19 pm
Location: New Lenox, Illinois
Contact:

Post by xbox7887 »

xzodia wrote:Right now:
Soffish has a better meta editor then Entity, and with continued codeing we may be able to squeeze more speed from it.
One thing I've found to greatly improve performance is to block all contiguous reads/writes whenever possible...I don't think I need to supply all the source, this should be enough for you to get the idea ;P Basically if you're reading a bunch of values next to eachother in a loop, just read the whole block to a buffer and then parse with bitconverter. Same goes for writing...just write all values to a fixed buffer and write to the map after :)

Example:

Code: Select all

using System;
using System.Collections.Generic;
using System.Text;

namespace HaloMap
{
    public class FileTable : List<string>
    {
        private Map Map;

        #region Constructor
        public FileTable(Map map)
        {
            Map = map;
            Capacity = Map.Header.FileCount;
            Load();
        }
        #endregion

        #region Methods
        // load filetable and indicies to buffers with single read operations, then parse after...
        public void Load()
        {
            try
            {
                int count = Map.Header.FileCount;
                int indexOffset = Map.Header.FileTableIndexOffset;
                int nameOffset = Map.Header.FileTableOffset;

                byte[] indexBuffer = Map.ReadBytes(indexOffset, count * 4);
                byte[] nameBuffer = Map.ReadBytes(nameOffset, Map.Header.FileTableSize);

                int nextIndex;  //used to calculate string length
                for (int i = 0; i < count; i++)
                {
                    int index = BitConverter.ToInt32(indexBuffer, i * 4);

                    if (i != count - 1)
                        nextIndex = BitConverter.ToInt32(indexBuffer, (i + 1) * 4);
                    else
                        nextIndex = Map.Header.FileTableSize;

                    this.Add(ASCIIEncoding.ASCII.GetString(nameBuffer, index, nextIndex - index - 1));
                }
            }
            catch (Exception)
            {
                throw new MapCorruptionException("Inconsistancy detected! - Unable to load filetable.");
            }
        }
        public unsafe void Save(out byte[] indexBuffer, out byte[] nameBuffer)
        {
            int index = 0;

            //creates index buffer
            indexBuffer = new byte[Count * 4];
            fixed (byte* ib = indexBuffer)
                for (int i = 0; i < Count; i++)
                {
                    *(int*)(ib + i * 4) = index;
                    index += this[i].Length + 1;
                }

            //creates name buffer
            nameBuffer = new byte[index];
            for (int i = 0; i < Count; i++)
                ASCIIEncoding.ASCII.GetBytes(this[i], 0, this[i].Length, nameBuffer, BitConverter.ToInt32(indexBuffer, i * 4));
        }

        #endregion
    }
}
Shock120





Posts: 318
Joined: Wed Apr 25, 2007 10:55 am

Post by Shock120 »

Will the BSP viewer look better than Entity's &/or as good as Prey's Visual Scenery Mover

- Color for AI zones, death barriers/zones and banshee barriers
- RTH
- Unicode editor
- Script editor
- Chunk cloning
Shock120 on XLink & XBC
User avatar
xzodia




Translator Connoisseur Coagulator

Posts: 1981
Joined: Sun May 15, 2005 10:31 am
Location: UK
Contact:

Post by xzodia »

xbox7887 wrote:One thing I've found to greatly improve performance is to block all contiguous reads/writes whenever possible...I don't think I need to supply all the source, this should be enough for you to get the idea ;P Basically if you're reading a bunch of values next to each other in a loop, just read the whole block to a buffer and then parse with bitconverter. Same goes for writing...just write all values to a fixed buffer and write to the map after :)
Thanks for the tip, I have to say it never occurred to me that that would be faster.
Would the same speed be gained if a MemoryStream was created from the byte[], since its not reading from disc? (to save writing the bitconverter code)
Image
Halo 2 Plugins | Lock-on To Just About Anything | My Sites | Snow Hog
Old Plugins you have, upgrade you must...
Always Maintain a High Quality-To-Crap Ratio.
User avatar
kibito87




Stylist Connoisseur Advisor Bloodhound
Droplet Articulatist 500

Posts: 3461
Joined: Mon Feb 21, 2005 7:49 pm
Location: Ohio
Contact:

Post by kibito87 »

Shock120 wrote:Will the BSP viewer look better than Entity's &/or as good as Prey's Visual Scenery Mover

- "Perfect" Chunk cloning
On the BSP viewer part though, it would be grand if you could implement the objective chunks as different colored boxes just like Sparkedit. I'm not trying to say turn Soffish into a Sparkedit but it would be a great addition and make it easier to tell the difference between each set. I think entity's objective spawns were all set to use the masterchief model but I think it's better having them color coordinated boxes.

Although, now that I think of it, making scenario chunk cloning IN the BSP viewer would be a FANTASTIC addition! That way, you could right click a tag in the bsp viewer's hierarchy box, (or however you may be going about that) and just have a selection such as "clone chunk". Then the cloned chunk would appear either right on top of the original or next to it somewhere.

Let me know if any of the things i've suggested are already on the planned list or if they are just too out of the question at the moment.
Image
User avatar
Eaton




Enthraller

Posts: 1639
Joined: Thu Jun 14, 2007 4:16 pm
Location: USA

Post by Eaton »

Hopefully all of these great ideas can be implemented! :D Make this program better than Entity! 8)
Image
OwnZ joO




Articulatist 500

Posts: 980
Joined: Thu Nov 10, 2005 4:24 pm

Post by OwnZ joO »

xbox7887 wrote: One thing I've found to greatly improve performance is to block all contiguous reads/writes whenever possible...I don't think I need to supply all the source, this should be enough for you to get the idea ;P Basically if you're reading a bunch of values next to eachother in a loop, just read the whole block to a buffer and then parse with bitconverter. Same goes for writing...just write all values to a fixed buffer and write to the map after :)

Example:
.
.
.
As far as my work with meta editing, it's not so much reading it that takes the time as setting up the display for the tag type.
User avatar
Aumaan Anubis




Connoisseur Bloodhound Renovator

Posts: 2938
Joined: Fri Jun 30, 2006 1:01 pm
Location: Aumaan
Contact:

Post by Aumaan Anubis »

I sincerely hope that you programmers will not risk speed to make the BSP Viewer, "look better."

It was one of my worst problems on Entity before I got a new computer. I had to go back to an earlier version of Entity to find a BSP Viewer that wasn't outrageously slow due to detail.

I really don't much care for the 'quality' of the Viewer, as long as I'm able to see things relatively clearly.
Image
Tural wrote:MrMurder, we're going to hold you to that promise.
It is expected, and demanded.
User avatar
SpecOp44




Advisor Recreator Snitch! Critic

Posts: 2008
Joined: Tue Jun 06, 2006 12:34 pm
Location: The Canadarm

Post by SpecOp44 »

Ideally if there were a way to set how much quality the BSP renders, that would be great.
Image
OwnZ joO




Articulatist 500

Posts: 980
Joined: Thu Nov 10, 2005 4:24 pm

Post by OwnZ joO »

Aumaan Anubis wrote:I sincerely hope that you programmers will not risk speed to make the BSP Viewer, "look better."

It was one of my worst problems on Entity before I got a new computer. I had to go back to an earlier version of Entity to find a BSP Viewer that wasn't outrageously slow due to detail.

I really don't much care for the 'quality' of the Viewer, as long as I'm able to see things relatively clearly.
Exactly, I couldn't view big sbsp's on my old computer.
User avatar
xbox7887




Socialist Coagulator Decryptor Advisor
Eureka Commentator Wave Scorched Earth

Posts: 2160
Joined: Mon Dec 27, 2004 6:19 pm
Location: New Lenox, Illinois
Contact:

Post by xbox7887 »

xzodia wrote:
xbox7887 wrote:One thing I've found to greatly improve performance is to block all contiguous reads/writes whenever possible...I don't think I need to supply all the source, this should be enough for you to get the idea ;P Basically if you're reading a bunch of values next to each other in a loop, just read the whole block to a buffer and then parse with bitconverter. Same goes for writing...just write all values to a fixed buffer and write to the map after :)
Thanks for the tip, I have to say it never occurred to me that that would be faster.
Would the same speed be gained if a MemoryStream was created from the byte[], since its not reading from disc? (to save writing the bitconverter code)
Same difference, since its working with memory instead of file io...I wrote that code when I was learning C# so I didn't know a whole lot then :P
Themandyou





Posts: 193
Joined: Sat May 17, 2008 1:15 pm
Location: Silicon Valley

Post by Themandyou »

xbox7887 wrote:when I was learning C# so I didn't know a whole lot then :P
Where'd you learn C# from?
Supermodder911




Connoisseur Coroner

Posts: 1262
Joined: Sun Sep 03, 2006 10:43 pm
Location: Michigan

Post by Supermodder911 »

Bill Gates himself.
Image
C Wizzle
User avatar
SkgSkrillaka





Posts: 192
Joined: Wed Mar 26, 2008 8:50 pm
Location: Off the streets, net cafe's and home ;)

Post by SkgSkrillaka »

google search it..
honestly. lol
Image
Shock120





Posts: 318
Joined: Wed Apr 25, 2007 10:55 am

Post by Shock120 »

SpecOp44 wrote:Ideally if there were a way to set how much quality the BSP renders, that would be great.
make plenty of settings. :wink:
Shock120 on XLink & XBC
Evilsnowflakes




Connoisseur

Posts: 396
Joined: Tue Nov 15, 2005 5:19 am
Location: Right Outside Your Window With A Gun

Post by Evilsnowflakes »

Man, if you can make this the only program we'll ever need, that be great, now we just need that animation injector/extractor for us modeling people :wink:
Image
Remember, Violence is always the answer.
User avatar
DemonicSandwich




Advisor Connoisseur

Posts: 1198
Joined: Sat Sep 30, 2006 6:10 pm
Location:

Post by DemonicSandwich »

Evilsnowflakes wrote:Man, if you can make this the only program we'll ever need, that be great, now we just need that animation injector/extractor for us modeling people :wink:
Actually you modeling people need a PMI that injects bone information more....then animation tools will actually become even more useful. :wink:
AIM wrote:Demonic5andwich (6:10:10 PM): structure of a first person weapon animation:
Demonic5andwich (6:10:43 PM): mess, mess, maybe a node?, another header?! wtf!, more mess, tacos, more shit
Post Reply