.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT
Notices


Reply
 
Thread Tools Display Modes
  #41  
Old October 29th, 2024, 08:06 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,376
Thanks: 101
Thanked 618 Times in 409 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

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:



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



Current code is attached (As always, password is SPCAMO)
Attached Files
File Type: zip SHPView_v0-83-5_29-OCT-24.zip (84.2 KB, 9 views)

Last edited by MarkSheppard; October 29th, 2024 at 08:17 PM..
Reply With Quote
  #42  
Old October 29th, 2024, 09:41 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,489
Thanks: 3,958
Thanked 5,693 Times in 2,812 Posts
DRG will become famous soon enough
Default Re: Next Generation SHP Viewer

Interesting......... I did not check different zoom levels
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc
Reply With Quote
  #43  
Old October 29th, 2024, 09:53 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,489
Thanks: 3,958
Thanked 5,693 Times in 2,812 Posts
DRG will become famous soon enough
Exclamation Re: Next Generation SHP Viewer

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



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

Attached Thumbnails
Click image for larger version

Name:	Imagess5.png
Views:	39
Size:	47.5 KB
ID:	17096   Click image for larger version

Name:	Image8.png
Views:	38
Size:	33.5 KB
ID:	17097  
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc

Last edited by DRG; October 29th, 2024 at 10:03 PM..
Reply With Quote
  #44  
Old October 29th, 2024, 10:11 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,489
Thanks: 3,958
Thanked 5,693 Times in 2,812 Posts
DRG will become famous soon enough
Default Re: Next Generation SHP Viewer

......and just to make it more interesting the problem is inconsistent and will manifest in different ways






A trifecta of PITA....
Attached Thumbnails
Click image for larger version

Name:	Image14.png
Views:	39
Size:	51.1 KB
ID:	17102   Click image for larger version

Name:	Image16.png
Views:	36
Size:	37.2 KB
ID:	17103  
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc
Reply With Quote
  #45  
Old October 29th, 2024, 10:12 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,376
Thanks: 101
Thanked 618 Times in 409 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

I've been looking at the "buy menu" encyclopedia icon and the png file:



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.

Last edited by MarkSheppard; October 29th, 2024 at 10:35 PM..
Reply With Quote
  #46  
Old October 29th, 2024, 10:57 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,376
Thanks: 101
Thanked 618 Times in 409 Posts
MarkSheppard is on a distinguished road
Default 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)
Reply With Quote
  #47  
Old October 30th, 2024, 11:03 AM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,489
Thanks: 3,958
Thanked 5,693 Times in 2,812 Posts
DRG will become famous soon enough
Default Re: Next Generation SHP Viewer

Quote:
Originally Posted by MarkSheppard View Post
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
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc
Reply With Quote
  #48  
Old October 30th, 2024, 11:42 AM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,489
Thanks: 3,958
Thanked 5,693 Times in 2,812 Posts
DRG will become famous soon enough
Exclamation Re: Next Generation SHP Viewer

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




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







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



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
Attached Thumbnails
Click image for larger version

Name:	Image2.png
Views:	28
Size:	2.4 KB
ID:	17104   Click image for larger version

Name:	Hybrid test.png
Views:	29
Size:	4.2 KB
ID:	17105   Click image for larger version

Name:	test.png
Views:	31
Size:	15.4 KB
ID:	17107   Click image for larger version

Name:	Image3.png
Views:	32
Size:	23.3 KB
ID:	17108  
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc

Last edited by DRG; October 30th, 2024 at 12:23 PM..
Reply With Quote
  #49  
Old October 30th, 2024, 07:39 PM
MarkSheppard's Avatar

MarkSheppard MarkSheppard is offline
Lieutenant Colonel
 
Join Date: Jun 2005
Posts: 1,376
Thanks: 101
Thanked 618 Times in 409 Posts
MarkSheppard is on a distinguished road
Default Re: Next Generation SHP Viewer

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.


(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:

Attached Files
File Type: zip ReModded_Thing.zip (3.5 KB, 5 views)

Last edited by MarkSheppard; October 30th, 2024 at 08:03 PM..
Reply With Quote
The Following User Says Thank You to MarkSheppard For This Useful Post:
  #50  
Old October 30th, 2024, 09:03 PM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,489
Thanks: 3,958
Thanked 5,693 Times in 2,812 Posts
DRG will become famous soon enough
Default 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
__________________


"You are never to old to rock and roll if you are too young to die".--- What do you expect to be doing when you are 80?


https://www.youtube.com/watch?v=8kWt8ELuDOc
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


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


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