:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat Aug 18, 2018 1:07 pm
All times are UTC + 0
 Forum index » Featured Tools » OS SHP Builder » Suggestions
Canvas optimizer
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 19, 2014 11:15 am    Post subject:  Canvas optimizer
Subject description: also batch conversion capable
Reply with quote

Since too big canvases need unnecessary amount of RAM during rendering ingame, it would be nice to have a tool that optimizes the canvas.

When using the tool, it should shrink the canvas to the smallest possible size, while every colored pixel on all frames are still kept visible.
During this it should of course keep the object centered.
e.g. shadows tend to go to the right side, while the left is empty. In this case the left can't be made smaller than the right or the object would be misaligned ingame.

It would be also nice if there is an option, to reduce the canvas size only to multiple of 48 (or 60 for RA2) as usual canvas sizes are
48x48
96x96
144x144 etc and combinations like 48x96


And then of course a batch conversion to do this on multiple files at once would be nice.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Thu Jun 19, 2014 11:35 am    Post subject: Reply with quote

It would be handy for sure but I am not sure on the memory allocation as basicly the game loads them into memory as files directly and then draws from them accordingly and it does use actual canvas limitation in actual stored frame to draw while I presumed basic logic that it uses the full dimension always but what point would there be to draw the blank area (outside of canvas cut stored frame), surely Westwood wasn't that dumb?

What I asked around, most seem to think its merely drawing the internal frame and does not allocate any more memory than what the SHP loaded took as file.

Actual multiples in size is not necessarily relevant (just tidy convention) as stored frame is always canvas cutted to weird dimensions of non multiples if you look up shp headers.

Admittedly I also preach doing this trimming while I am not sure it makes difference or not, actual filesizes are not affected given SHP has its internal canvas cut compression for the excess blank while internal canvas frame background blank is then handled by RLE (C3)

Plus I suggested to Banshee ages ago to do a frame trimmer tool but still nothing...

If shp has 50 frames and you want it halfed, it would delete every 2nd frame to smoothen potentially too slow animation.

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 19, 2014 12:08 pm    Post subject: Reply with quote

i heard from AlexB, Hyper (or another exe pro, don't know anymore), that the game renders/handles SHPs ingame as if they are BMPs, which means they need the space to store the complete canvas and not only for the visible part.

And thus the canvas optimization should help reducing needed RAM and maybe improve performance when lots of SHPs are rendered at the same time.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Thu Jun 19, 2014 12:13 pm    Post subject: Reply with quote

Back in 1999, this might have been a problem, but the games code is quite good at handling the SHP's once loaded, but not perfect.

Back to top
View user's profile Send private message
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Thu Jun 19, 2014 12:50 pm    Post subject: Reply with quote

Well, I would frankly like if someone of the 'exe pros' would finally conclusively put the issue at rest as any inside views so far from them are surfaceful...

Until then we're left assuming if its optimal or it isn't and doing things based on guess, maybe performance difference is minimal by today standards but nonetheless...

I've asked the same pros over the years and frankly it hasn't gone further than comment that it doesn't use more memory than what the RAM loaded shp as file took to draw it.

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jun 19, 2014 9:29 pm    Post subject: Reply with quote

Quote:
it would be nice to have a tool that optimizes the canvas.


When you save an SHP file with OS SHP Builder or even other programs like XCC Mixer, the program does optimize the canvas before storing its pixels in the file. I think it did that since version 1.0 of BS SHP Builder.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Jun 19, 2014 9:40 pm    Post subject: Reply with quote

What LKO means is that there should be a function to automatically make the canvas smaller when there's a lot of free space around the object in the center.
_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jun 19, 2014 9:47 pm    Post subject: Reply with quote

correct,

imagine a 800x600 pixel big SHP with only a tiny 1x1 building in the center. On such an SHP you could reduce the canvas from 800x600 down to only 48x48.

In the past i've seen quite a lot of SHPer to release SHPs right how they came out of their renderer. And usually they render the images in 320x240, 640x480 etc, the default settings in 3dsmax or other 3d programs.
_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jun 19, 2014 11:11 pm    Post subject: Reply with quote

I do understand what you mean, but I don't necessarily agree with it.

I know that it would be useful to automatically resize down the canvas size to whatever is useful in a image generated by a renderer. The problem is the automatic part of it. I can't simply suppose that any image that is imported by the program comes from a render, nor that the user shall not paint the currently unpainted pixels around it.

The frame trimmer tool seems to be viable. I just couldn't be bothered to code it yet and OS SHP Builder is not my priority at the moment, due to the bad situation of my thesis proposal.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Jun 20, 2014 6:14 am    Post subject: Reply with quote

No, not automatically always.
What i mean is a new option in the menu: "optimize canvas" which then makes the canvas as small as possible.
And another option "batch conversion" inside the "optimize canvas" menu, which allows to do this on multiple files.


SHPBuilderMenu.png
 Description:
 Filesize:  11.27 KB
 Viewed:  2176 Time(s)

SHPBuilderMenu.png



_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 20, 2014 1:29 pm    Post subject: Reply with quote

That sounds feasible. I'll do it whenever possible.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Aro
Alcohol Fueled


Joined: 10 Sep 2006
Location: Birmingham, United Kingdom

PostPosted: Fri Jun 20, 2014 1:36 pm    Post subject: Reply with quote

Yes please. I'd be grateful for this feature. Smile
_________________
I no longer work on Twisted Insurrection or take part in community discussions. Any messages directed towards myself will go unanswered.
Please direct any queries towards the other team members.

Back to top
View user's profile Send private message Visit poster's website
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyörgy, Hungary

PostPosted: Fri Jun 20, 2014 2:32 pm    Post subject: Reply with quote

Yea, it could come handy like how the Crop section works in VXLSE.
_________________



AS Discord server: https://discord.gg/7aM7Hm2

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
 Forum index » Featured Tools » OS SHP Builder » Suggestions
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only one of the following words: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1669s ][ Queries: 15 (0.0274s) ][ Debug on ]