A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »HUD 512x512 sprites

Author Topic: HUD 512x512 sprites (9 messages, Page 1 of 1)
Moderators: Dennis

NeX
Joined: Apr 11, 2013


Posted: May 16, 2015 07:33 PM    Msg. 1 of 9       
I'm referencing the TSC:E carbine weapon_hud_interface, and am trying to create a beam rifle scope of my own, using that method of scope-masking.

I noticed that CMT's carbine_scope_details is a bitmap that is a 512x512 sprite (2 of them)....I created one for the beam rifle, it's correct in all the "has blue border, each section within is exactly 512x512", so it's basically the same template that is used for TSC:E, but it won't compile with that same error,

"one or more sprites do not fit within the requested page size".

What gives? They ARE 512x512, they have the sprite plate, the sprite budget is set to 2 at 512x512 apiece...

Is there some funky way I should be compiling these other than with tool? It doesn't seem like tool is capable of spitting out a 512x512 sprite bitmap at this point. I haven't gotten so desperate as to try tool++, but now I'm posing this question at CMT directly (or anyone else who knows): How the hell did you do it? Tool isn't cooperating...


For shets and geggles I put them as 256 budget and shrunk the original tif, and it works like a charm that way. Up the resolution to the original, and it refuses to work. I even tried saving the pre-existing carbine_scope_details.bitmap file as a different tag, and compiling into that one, thinking maybe a setting was off in the one I had made from scratch, but it still gives me the error.

What gives, yo?

P.S. I also bumped the thread in the technical forum, but that place is a ghost town comparatively.


Kinnet
Joined: Dec 27, 2013

FeelsGoodMan


Posted: May 16, 2015 08:30 PM    Msg. 2 of 9       
maybe these are designed for OS only


not giraffe
Joined: Jul 17, 2014


Posted: May 16, 2015 08:43 PM    Msg. 3 of 9       
Do as Moses says.
Edited by raffgie on May 16, 2015 at 09:19 PM


MosesofEgypt
Joined: Apr 3, 2013


Posted: May 16, 2015 09:05 PM    Msg. 4 of 9       
Your issue is that tool does something called "padding" where it makes sure there are exactly a certain number of pixels between each of your sprites. This is to prevent the sprites from bleeding colors from one to the others(and vice versa) when it generates mipmaps.

It calculates this padding into the size of the bitmap as well, even if it only has 1 sprite. That means when tool sees your 512x512 bitmap, it adds 2 pixels on the left, top, right, and bottom sides, making it a 516x516 overall.

To fix this, make your bitmap 508x508 pixels.

You can see for yourself that this is the original size of the bitmap. Go into the sprites section of the bitmap and you'll see it says that the "top" and "right" are 0.992188. That's the right edge of the sprite. 512*0.992188 = 508.000256 (tool rounds to 508)

Tool gets kinda strange with the padding when multiple sprites are included and seems to increase the padding to 4 or 5 sometimes. The "sprite spacing" is supposed to control this, but tool ignores it and always resets it to 4. Even stranger, tool doesnt seem to include this padding for sequences, only sprites
Edited by MosesofEgypt on May 16, 2015 at 09:06 PM


NeX
Joined: Apr 11, 2013


Posted: May 16, 2015 09:19 PM    Msg. 5 of 9       
Quote: --- Original message by: raffgie

You could try compiling them as interfaced bitmaps instead of sprites. If the tif you have is set up correct (one bitmap above the other, not side by side) then you should have 2 sequences at the bottom of the bitmap tag. Set first bitmap index and bitmap count of each sequence to 0. You then can try manually adding the sprites. You'll need to add one sprite per sequence. Set right and bottom to 1, and x and y to 0.5 for each sprite. The second sequence's sprite you should also have the bitmap index set to 1. If none of this works, you can also try unchecking linear and checking power of two dimensions for each bitmap, setting the bitmap type to sprites and saving. If none of this helps, sorry for wasting your time.
Edited by raffgie on May 16, 2015 at 08:51 PM



Like the last time I tried just changing it to sprites after compiling as interface, tool spits out an angry message about "power of two bit checked" or somesuch. I was hoping adding the sprites manually would work, but no go.

Here's some interesting information though: for two stacked 512 sprites, the overall .tif file's dimensions should be 514x1028, to allot for 1 pixel of blue on each side, plus 2 pixels of blue between the individual sprites.

The CMT sprite .bitmap though, has an original .tif size of 512x1023....furthering the mystery. What the actual frukus.


not giraffe
Joined: Jul 17, 2014


Posted: May 16, 2015 09:20 PM    Msg. 6 of 9       
Try what Moses said.


NeX
Joined: Apr 11, 2013


Posted: May 16, 2015 09:20 PM    Msg. 7 of 9       
EDIT:


OH MY GOD. Mystery solved. I just resized the original .TIF to the 512x1023 size - keeping the blue pixels and such - and it...just...worked. What the heck man, tool is the weirdest goddam program...


Well.

Thanks moses, at least that clears up the why behind the oddity!

Definitely good info to have, one of those crazy things.
Edited by NeX on May 16, 2015 at 09:22 PM


Choclate Thunda
Joined: Aug 2, 2010

My BS meter agrees... -Hud Artist/Creator-


Posted: May 17, 2015 10:59 PM    Msg. 8 of 9       
Hi, I made all the sprites for the hud and stuff. The method I used is similar to what your solution is. For some reason tool wants you to do a full size 512 x 512 for sprites, but not when its 2 or more. What I usually do is make every bitmap 514 x 514 where the border is exactly 1 pixel wide, so the black space is 512 x 512. Then with multiple sprites I make them still have 1 pixel between each sprite bitmap. That's why 512 x 1023 works. also i learned from experience, power of 2 doesn't mean width and height have to be the same power of 2. you can have different h x w as long as those dimensions are power of 2. EX: 256 x 512, 64 x 128, etc. If you have any more questions you can pm me


NeX
Joined: Apr 11, 2013


Posted: May 18, 2015 08:43 AM    Msg. 9 of 9       
Quote: --- Original message by: Choclate Thunda
If you have any more questions you can pm me


Thanks man will do

 

 
Previous Older Thread    Next newer Thread







Time: Sun July 12, 2020 6:36 PM 203 ms.
A Halo Maps Website