Page 34 of 39

Re: Entity 2.1.19

Posted: Tue Apr 02, 2013 7:11 am
by troymac1ure
Sorry to tweak your strings, but someone had to do it!
Image

Re: Entity 2.1.19

Posted: Tue Apr 02, 2013 8:41 am
by XZodia
I can't believe I fell for that >_<

Re: Entity 2.1.19

Posted: Thu Apr 04, 2013 9:18 pm
by xxpenguinxx
This april fools shit is getting really old.

Re: Entity 2.1.19

Posted: Fri Apr 05, 2013 12:14 am
by troymac1ure
Click16 wrote:Fuck fuck fuck! I started modeling a BSP in 3ds! FUCK I FOGOT IT WAS APRIL FIRST >_<
Sorry, but I laughed pretty hard when I read this. So how far did you get?
xxpenguinxx wrote:This april fools shit is getting really old.
wikipedia wrote:The earliest recorded association between April 1 and foolishness is an ambiguous reference in Chaucer's Canterbury Tales (1392).
Agreed, let's put a stop to this childish (at least) 600+ year old tradition. :lol:

Re: Entity 2.1.19

Posted: Fri Apr 05, 2013 2:41 am
by Click16
I created a height map, and a grass texture... That's about it.

Re: Entity 2.1.19

Posted: Wed Apr 10, 2013 6:22 am
by troymac1ure
Created a new branch in Entity for VisualMenuEditor. Has the updated visual menu editor code (incorrect still, but see pic below).
https://github.com/troymac1ure/Entity/t ... MenuEditor

I dunno if I'm ever gonna get the push to continue it on more again. There are some other updates which are handy, but I'm not putting them on the auto-update as I can't remember what all they are (I think some bugs with poke/peek and some changes to the StringID selection box mostly). If you don't do Git and really want the newest version I can throw it up, but I don't know how much demand there is for any of this anymore.

Image

Re: Entity 2.1.19

Posted: Wed Apr 10, 2013 7:40 am
by JacksonCougar
When in doubt, git it; I find myself coming back to Halo 2 every year or so to do more work.

Re: Entity 2.1.19

Posted: Wed Apr 10, 2013 8:48 am
by XZodia
Even if it doesn't get used to make mods, I think its cool just to see how the menu is organised in the map.
Is there a binary for this?
Having a visual editor makes it a lot more fun/interesting to play around with =)

Re: Entity 2.1.19

Posted: Thu Apr 11, 2013 2:10 am
by troymac1ure
I never figured out the menu options layout. It's my brick wall.
I had ideas, but they all fall through. You thought they might be imbedded in the XBE which seemed like a dumb suggestion as that would make the menus hard coded, but I can't find any rational data otherwise.

It seems like the layouts are just randomly tossed together and magically the engine sorts them out.
I noticed some weird happenings by changing the screen IDs. Can't remember completely, but I think it was like the original item list is there even though you couldn't see it. If someone wants to look at this more, try swapping 2 menu IDs (I did it in RTH) and notice the words disappear, but the links are still there (I think).

Re: Entity 2.1.19

Posted: Thu Apr 11, 2013 8:43 am
by XZodia
Yeah, I did that a while ago when I made the plugins and came to the conclusion that the engine links the map menu info with the code links in the xbe using the screen ID's

Re: Entity 2.1.19

Posted: Sat Apr 05, 2014 10:04 am
by Click16
I have a question. Does this version of Entity support writing over certain bitmap types such as AY8, A8Y8, G8B8, etc?

Re: Entity 2.1.19

Posted: Sat Apr 19, 2014 1:18 am
by xxpenguinxx
I think Entity 1.6 UE can, or at least it can inject bumpmaps.

Have you tried injecting them?

Re: Entity 2.1.19

Posted: Sat Apr 19, 2014 6:22 pm
by Click16
xxpenguinxx wrote:I think Entity 1.6 UE can, or at least it can inject bumpmaps.

Have you tried injecting them?
No I just programmed a converter to convert A8R8G8B8 dds textures to each of the types. Only thing I didn't work in is the bumpmap converter

Re: Entity 2.1.19

Posted: Wed Apr 23, 2014 6:50 am
by troymac1ure
Click16 wrote:I have a question. Does this version of Entity support writing over certain bitmap types such as AY8, A8Y8, G8B8, etc?
From what I remember (many moons ago now) I had all formats supported. All formats could be converted to/from except no conversion to DXT I believe (and I think I had all the bugs worked out finally?). If over-writing with the same format I am sure that was no issue. Maybe I'll fire it up and check (been a looong time since I ran Entity).

EDIT: (*note* everything written here is followed by "if I remember correctly")
Injections work for same color depth and (padded) dimensions files.
So as long as it's 8-bit to 8-bit, 16-bit to 16-bit or 32-bit to 32-bit file type doesn't matter.
When I say padded, it doesn't matter if you wish to inject a 120x120 over top as they both get padded to 128x128

So, you should be able to inject a 128x128 A8Y8 over a 128x128 G8B8 if desired.
I extracted "effects\bitmaps\distortion\distortion_ripple" and injected it over "effects\bitmaps\distortion\distortion_ring" with no issue (both are 128x128, G8B8 format). Looking at my changelog, it looks like that was all done by 2.1.17.

For the following Halo formats are translated into the following DDS formats (taken from "HaloMap\DDSFunctions\DDS.cs"):

Code: Select all

        public enum H2DDSFormats
        {
            A8 = DDSFileFormats.Alpha_8_bit, // ._8bpp_8_A_alpha,
            Y8 = DDSFileFormats.Alpha_8_bit, // ._8bpp_8_A_alpha,
            P8 = DDSFileFormats.Alpha_8_bit, // ._8bpp_8_A_alpha,
            AY8 = DDSFileFormats.A1R5G5B5_16_bit, // ._16bpp_1555_ARGB_Unsigned,
            A8Y8 = DDSFileFormats.AlphaLuminance_16_bit, // ._16bpp_88_AL_AlphaLuminance,
            R5G6B5 = DDSFileFormats.R5G6B5_16_bit, // _16bpp_565_RGB_Unsigned,
            A1R5G5B5 = DDSFileFormats.A1R5G5B5_16_bit, // ._16bpp_1555_ARGB_Unsigned,
            A4R4G4B4 = DDSFileFormats.A4R4G4B4_16_bit, // ._16bpp_444_ARGB_Unsigned,
            X8R8G8B8 = DDSFileFormats.X8R8G8B8_32_bit, // ._32bpp_8888_XRGB_Unsigned,
            A8R8G8B8 = DDSFileFormats.A8R8G8B8_32_bit, // ._32bpp_8888_ARGB_Unsigned,
            DXT1 = DDSFileFormats.DXT1, // ._4bpp_DXT1_ARGB_1BitAlpha,
            DXT3 = DDSFileFormats.DXT3, // _8bpp_DXT3_ARGB_ExplicitAlpha,
            DXT5 = DDSFileFormats.DXT5, // _8bpp_DXT5_ARGB_InterpolatedAlpha,
            Lightmap = DDSFileFormats.BITM_FORMAT_LIGHTMAP,
            G8B8 = DDSFileFormats.AlphaLuminance_16_bit // _16bpp_88_AL_AlphaLuminance
        }
and

Code: Select all

            string[] formatDescriptions = new[]
                {
                    "DXT1       ARGB    4 bpp | 1 bit alpha",
                    "DXT3       ARGB    8 bpp | explicit alpha", 
                    "DXT5       ARGB    8 bpp | interpolated alpha",
                    "8             A    8 bpp | alpha", 
                    "8.8          AL   16 bpp | alpha/luminance", 
                    "4.4.4.4     RGB   16 bpp | unsigned", 
                    "1.5.5.5    ARGB   16 bpp | unsigned",
                    "5.6.5       RGB   16 bpp | unsigned", 
                    "4.4        ARGB   16 bpp | unsigned",
                    "X.8.8.8    XRGB   32 bpp | unsigned", 
                    "8.8.8.8    ARGB   32 bpp | unsigned", 
                    "                         | lightmap"
                };
            switch (info.formatname)
            {
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_DXT1:
                    ddsff.Format = DDSFileFormats.DXT1;
                    temp += formatDescriptions[0];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_DXT2AND3:
                    ddsff.Format = DDSFileFormats.DXT3;
                    temp += formatDescriptions[1];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_DXT4AND5:
                    ddsff.Format = DDSFileFormats.DXT5;
                    temp += formatDescriptions[2];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8:
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_P8:
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_Y8:
                    ddsff.Format = DDSFileFormats.Alpha_8_bit;
                    temp += formatDescriptions[3];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_G8B8:
                    ddsff.Format = DDSFileFormats.AlphaLuminance_16_bit;
                    temp += formatDescriptions[4];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A4R4G4B4:
                    ddsff.Format = DDSFileFormats.A4R4G4B4_16_bit;
                    temp += formatDescriptions[5];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A1R5G5B5:
                    ddsff.Format = DDSFileFormats.A1R5G5B5_16_bit;
                    temp += formatDescriptions[6];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_R5G6B5:
                    ddsff.Format = DDSFileFormats.R5G6B5_16_bit;
                    temp += formatDescriptions[7];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8Y8:
                    ddsff.Format = DDSFileFormats.AlphaLuminance_16_bit;
                    temp += formatDescriptions[8];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_AY8:
                    ddsff.Format = DDSFileFormats.AlphaLuminance_16_bit;
                    temp += formatDescriptions[8];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_X8R8G8B8:
                    ddsff.Format = DDSFileFormats.X8R8G8B8_32_bit;
                    temp += formatDescriptions[9];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8R8G8B8:
                    ddsff.Format = DDSFileFormats.A8R8G8B8_32_bit;
                    temp += formatDescriptions[10];
                    break;
                case ParsedBitmap.BitmapFormat.BITM_FORMAT_LIGHTMAP:
                    ddsff.Format = DDSFileFormats.BITM_FORMAT_LIGHTMAP;
                    temp += formatDescriptions[11];
                    break;
            }
and also very important are the flags:

Code: Select all

                // For RGB formats dwFlags should include DDPF_ALPHAPIXELS if it contains an alpha channel.
                // For A8R8G8B8, this value would be 0xff000000.
                switch (b2.formatname)
                {
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A1R5G5B5:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A4R4G4B4:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8R8G8B8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_G8B8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8Y8:
                        Flags = Flags + (int)DDSEnum.DDPF_ALPHAPIXELS;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_P8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_Y8:
                        Flags = Flags + (int)DDSEnum.DDPF_ALPHA;
                        Flags = Flags - (int)DDSEnum.DDPF_RGB; // These formats are ALPHA ONLY, no RGB
                        break;
                }

                // For RGB formats, this contains the masks for the red, green, and blue channels. For A8R8G8B8, these
                // values would be 0x00ff0000, 0x0000ff00, and 0x000000ff respectively.
                switch (b2.formatname)
                {
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_G8B8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8Y8:
                        RGBAlphaBitMask = 0xFF00;
                        RBitMask = 0x00FF;
                        GBitMask = 0x0000;
                        BBitMask = 0x0000;
                        Flags -= (int)DDSEnum.DDPF_RGB; // This format doesn't use RGB
                        Flags += (int)DDSEnum.DDSD_MIPMAPCOUNT; // Mipmap Count
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_AY8:
                        RGBAlphaBitMask = 0x0000;
                        RBitMask = 0x000F;
                        GBitMask = 0x00F0;
                        BBitMask = 0x0000;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_P8:
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_Y8:
                        RGBAlphaBitMask = 0x00FF;
                        RBitMask = 0x0000;
                        GBitMask = 0x0000;
                        BBitMask = 0x0000;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_R5G6B5:
                        RGBAlphaBitMask = 0x0000;
                        RBitMask = 0xF800;
                        GBitMask = 0x07E0;
                        BBitMask = 0x001F;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A1R5G5B5:
                        RGBAlphaBitMask = 0x8000;
                        RBitMask = 0x7C00;
                        GBitMask = 0x03E0;
                        BBitMask = 0x001F;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A4R4G4B4:
                        RGBAlphaBitMask = 0xF000;
                        RBitMask = 0x0F00;
                        GBitMask = 0x00F0;
                        BBitMask = 0x000F;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_X8R8G8B8:
                        RGBAlphaBitMask = 0x00000000;
                        RBitMask = 0x00FF0000;
                        GBitMask = 0x0000FF00;
                        BBitMask = 0x000000FF;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_A8R8G8B8:
                        RGBAlphaBitMask = 0xFF000000;
                        RBitMask = 0x00FF0000;
                        GBitMask = 0x0000FF00;
                        BBitMask = 0x000000FF;
                        break;
                    case ParsedBitmap.BitmapFormat.BITM_FORMAT_LIGHTMAP:
                        RGBAlphaBitMask = 0x00000000;
                        RBitMask = 0x000000FF;
                        GBitMask = 0x000000FF;
                        BBitMask = 0x000000FF;
                        Flags -= (int)DDSEnum.DDPF_RGB; // This format doesn't use RGB
                        Flags += (int)DDSEnum.DDSD_MIPMAPCOUNT; // Mipmap Count
                        break;
                    default:
                        RGBAlphaBitMask = 0x0;
                        RBitMask = 0;
                        GBitMask = 0;
                        BBitMask = 0;
                        break;
                }
            }
You'll notice some files are saved in unexpected manners (ex. AY8 (8-bit) is saved as a 16-bit ARGB file with a mask that only uses 4 bits in R and 4 bits in G). This may seem weird, but when I was writing this I was saving files from photoshop into each of the formats to see how it ouput them and then wrote Entity to conform to this standard (as other programs could load photoshop DDS files)

Re: Entity 2.1.19

Posted: Wed Apr 23, 2014 8:38 am
by troymac1ure
One other interesting update that probably never got noticed was the 3D bitmap support (click on "rasterizer\plasma_shield_noise" [A8Y8] or "rasterizer\distance_attenuation" [AY8]) to see animated 3D bitmap in the preview box. DO NOT click on "rasterizer\default_3d" as it crashes Entity.

Also, "rasterizer\distance_attenuation" clearly shows that I still had decoding issues with AY8 files.

Never realized the bitm sequences before. Would have been easy to add animated bitmaps as well. Oh crap. I have the urge to just add that one small update, but I know how that would end up. lol

Re: Entity 2.1.19

Posted: Wed Apr 23, 2014 3:18 pm
by JacksonCougar
First a method, then your soul.

Re: Entity 2.1.19

Posted: Thu Apr 24, 2014 6:40 am
by troymac1ure
JacksonCougar wrote:First a method, then your soul.
^This. There must be another way though...

I guess you could say that there's a Method to our Madness ;)

Re: Entity 2.1.19

Posted: Thu Apr 24, 2014 2:50 pm
by CaptainPoopface
Is it a 3d bitmap that shows an outline of the chief or elite body with the orange or blue lightning when the shield takes damage in 3P? I thought that was a hidden shader function but could never find a way to leave it on all the time. Sure would be nice to more clearly show players on some of the darker lightmaps.

Re: Entity 2.1.19

Posted: Thu Apr 24, 2014 5:23 pm
by troymac1ure
Yes. The only two 3D ones are the two above I think (plasma_shield_noise & distance_attenuation).
There are numerous animated bitmaps though (seem very much the same as 3D bitmaps).

Re: Entity 2.1.19

Posted: Fri Apr 25, 2014 9:24 am
by troymac1ure
Well... :roll:
So a lot of the animated bitmaps look kinda dumb on their own, but fire_cloud_alpha looks good and the spinning shells are looking good (other than the low res images are stretched to fit the image box). Will hopefully post pics after I find the memory leak (I must be forgetting to dispose a picture or 300 since Entity is using 1.5GB of memory :shock: )

EDIT:
The memory leak wasn't new. I just never knew how to fix it before and when loading bitmaps for Animation, it stacks up quick. Anyways, this will resolve memory leaks in many area (Visual editor, mainmenueditor, etc).
Also, fixed the AY8 bitmap displays, so I think all bitmaps now display properly.
All the animated bitmaps now animate (with an option to disable as well).
So, for being away so long, this small section came back very naturally.

Re: Entity 2.1.19

Posted: Sat Apr 26, 2014 7:18 am
by troymac1ure
Entity 2.1.20 (w/ animated bitmap support and memory leak fixes).
(as well as fonts in mainmenueditor I think)

The newest version is available through the FTP server and update server. Source is on the FTP server as usual.

Keep a backup of your old copy (if anyone evens still touches this) as I don't know what I was doing when I stopped ages ago. There may be a major bug in one section for all I know. :roll:

Wow, it's been almost 1 1/2 years since last update.

Re: Entity 2.1.19

Posted: Sat Apr 26, 2014 11:34 am
by XZodia
I love seeing this updated =)

Re: Entity 2.1.19

Posted: Sat Apr 26, 2014 3:06 pm
by CaptainPoopface
Hot sauce! I want to see the animated bitmap stuff. Can someone remind me how to get to the FTP server?

Re: Entity 2.1.19

Posted: Sun Apr 27, 2014 4:13 am
by DoorM4n
Animated Bitmaps?! OMG, I can finally do proper warthog spinners!

Re: Entity 2.1.19

Posted: Mon Apr 28, 2014 12:28 am
by xXF3RcHoXx
Yay new entity, thanks a lot for taking the time to (still) work on it :D

Btw, just saying, the bsp viewer doesn't show all AI spawns, just a few ones