.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   WinSPMBT (http://forum.shrapnelgames.com/forumdisplay.php?f=78)
-   -   Next Generation SHP Viewer (http://forum.shrapnelgames.com/showthread.php?t=53129)

MarkSheppard October 29th, 2024 08:06 PM

Re: Next Generation SHP Viewer
 
1 Attachment(s)
Some more investigation...

At one specific zoom level; I get the flashing/cycling gray box where it should be transparent, but at all other zoom levels (I think) I have transparency:

https://i.imgur.com/r0ip4kL.png

Also, if you rotate the unit; the flashing area disappears:

https://i.imgur.com/INsft1v.png

Current code is attached (As always, password is SPCAMO)

DRG October 29th, 2024 09:41 PM

Re: Next Generation SHP Viewer
 
Interesting......... I did not check different zoom levels

DRG October 29th, 2024 09:53 PM

Re: Next Generation SHP Viewer
 
2 Attachment(s)
I have seen many odd things happen with this code in the last quarter century but the flashing zone around the gun barrel that only shows when the icon is 1:1 and facing to the right is probably the strangest one of all

Just totally bizarre


However, it more complicated than that

https://forum.shrapnelgames.com/atta...1&d=1730253634

That was reduced and enlarged in the game...
and its not just when it faces right

https://forum.shrapnelgames.com/atta...1&d=1730253821

DRG October 29th, 2024 10:11 PM

Re: Next Generation SHP Viewer
 
2 Attachment(s)
......and just to make it more interesting the problem is inconsistent and will manifest in different ways

https://forum.shrapnelgames.com/atta...1&d=1730254580


https://forum.shrapnelgames.com/atta...1&d=1730254280

A trifecta of PITA....

MarkSheppard October 29th, 2024 10:12 PM

Re: Next Generation SHP Viewer
 
I've been looking at the "buy menu" encyclopedia icon and the png file:

https://i.imgur.com/92DR6MC.png

I think what's happening is this:

My compression routine starts out correctly enciphering transparent areas of the SHP images (notice how the hull is mostly good?) and then somewhere things break.

I think what's happening is something causes the pixel variable being scanned to hang in memory and refuse to be updated; explaining how the hull on the first image works mostly fine, then the turret is flashing transparent.

Either that; or the true color to indexed color flattening code is bugging out somewhere; reading index 255 as a different index (one that happens to flash)

EDIT:
And I think the reason why other zoom levels work; but not the "Default" is because your zoom and rotate routines use interpolation.

So my program is probably outputting transparent pixels as something like index 254 or something (which is a known flashing color index); so it flashes in "normal" view.

But when you zoom in; the interpolation code moves it into pixel value 255; and it becomes transparent again.

MarkSheppard October 29th, 2024 10:57 PM

Re: Next Generation SHP Viewer
 
I think it's programming error on my part.

I never defined a way to pass through a palette to the SHP compression function; so it's somehow picking the first palette I defined (the full SPCAMO palette)

DRG October 30th, 2024 11:03 AM

Re: Next Generation SHP Viewer
 
Quote:

Originally Posted by MarkSheppard (Post 856984)
I think it's programming error on my part.

I never defined a way to pass through a palette to the SHP compression function; so it's somehow picking the first palette I defined (the full SPCAMO palette)


That could be why Fred added a " SP no flash" checkbox

DRG October 30th, 2024 11:42 AM

Re: Next Generation SHP Viewer
 
4 Attachment(s)
I tried an experiment

I took a Recompiled.SHP generated by v.83 and loaded it into SHPedit with the NO flash box checked
I added a new Icon hull and turret into the shp and saved

I then ran it through MOBHack then the game with a special unit made for the hybrid Icon I added as a test

All the icons that were in the Recompiled.SHP that I had added an icon with SHPEdit were normal in MOBHack

The images that were already in the Recompiled.SHP still exhibited the kruf as before when viewed in the game

https://forum.shrapnelgames.com/atta...1&d=1730302416


I changed the grey to fushia to make the areas it is in show more clearly.... it is not just the turret that has the problem. it is every pixel within the boundary of the X and Y of the image that does not have part of the icon in it that shows fushia same as if you drew a box with the max X and Y of the image then dropped the image on top of that..... any area of the background that was left unused by the image shows the grey flashing colour

The hybrid I added with SHPedit with the NO flash box checked was OK in MOBHack and the game

https://forum.shrapnelgames.com/atta...1&d=1730302536


https://forum.shrapnelgames.com/atta...1&d=1730302768


I think you are close to getting this solved and if it helps, Fred had some problems I help him sort out with his first version of SHPedit as well....... not quite as odd as this but there were issues that needed resolving and they were and you will too

The issue is that area within the max X and Y of the image that does not have Icon detail. Get that sorted and you are nearly there

FURTHER

I built this test to show it's the X-Y

https://forum.shrapnelgames.com/atta...1&d=1730305239

That is just four 4 pixel squares at the outer boundary with XXX in between for the hull and the same for the turret except that uses 2 XX
Don

MarkSheppard October 30th, 2024 07:39 PM

Re: Next Generation SHP Viewer
 
1 Attachment(s)
I ---THINK--- I have it sorted.

I had to reverse the order in which I was compressing the data:

i.e.

Do the loop that handles Transparent (skipped) pixels FIRST, rather than second.

https://i.imgur.com/AWSuubX.png
(Replaced SPW-60Bs in Icon0128.shp, slot 4948)

So now I need to archive this version as a known "ok" version and start refining it more and testing it more before I release another version.

I grabbed the old USA REMOD files from here

https://forum.shrapnelgames.com/show...t=49329&page=4

went in; loaded the SHP files in one of gooseman's last uploads; selected one of the weird turreted bradley things and chose to export it (see attached zip for exported version)

Chose to replace the SPW-60B icon using that exported zip file; it automagically replaced the files, enlarged the canvas, and set all the SP Header data from the CSV in the zip.

End result:

https://i.imgur.com/RsK7bQB.png

DRG October 30th, 2024 09:03 PM

Re: Next Generation SHP Viewer
 
The revised editor you used to get that result would have been nice but carry on until you are happy with it


All times are GMT -4. The time now is 08:26 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.