[PROGRAM] Png2Srf

Note that alterations to the YSFlight .EXE is forbidden
Post Reply
User avatar
Flake
VFA-49
VFA-49
Posts: 4357
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 838 times
Been thanked: 1247 times
Contact:

[PROGRAM] Png2Srf

Post by Flake » Mon Jun 22, 2015 5:48 am

This program will convert a PNG Image (Portable Network Graphics) to a SRF file (Surf View) for use with YSFlight.

Image

It converts on a per pixel basis and it is not smart - it doesn't simplify your png's for you or the output SRF.

You will need to remove duplicate vertecies and unused vertecies yourself. Polygons will not merge into single polygons should the neighbouring poly be the same color.

Supports full RGB colors and alpha blending.

"Soft" limit of 128^128 pixels (16,384 pixels) in the base png to convert but this can be ignored at user preference.

Reccomended to only convert small pngs, say 80*50.

This program is designed to help you model SRF logo's - the results from this program need to be optimised for use!

https://www.mediafire.com/?uo16hb15g6738gg

Please note the program has been tested on a few PNG files, with and without alpha and it contains try/catch exception handling so it should not crash!

Requires .NET Framework 3.5 or higher (comes standard with Windows XP SP2 and newer.)

This program is a must have in your YSFlight modelling arsenell!
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3887
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1664 times
Been thanked: 1764 times
Contact:

[PROGRAM] Png2Srf

Post by Neocon » Mon Jun 22, 2015 6:19 am

That ought to be useful. :)

User avatar
Copperhead
Veteran
Veteran
Posts: 1149
Joined: Tue Jun 18, 2013 7:00 pm
Favorite Aircraft: YF-23A Black Widow II
Location: Alabama
OS: Windows 7
Has thanked: 374 times
Been thanked: 128 times
Contact:

[PROGRAM] Png2Srf

Post by Copperhead » Mon Jun 22, 2015 6:41 am

How well does the "Remove Doubles" function work?
Image

^The Murican^

"Well boys, I reckon this is it...nuclear combat toe to toe with the Ruskies." - Major Kong

NightRaven
Senior Veteran
Senior Veteran
Posts: 1848
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: .
OS: windoze 10 64-bit
Has thanked: 562 times
Been thanked: 614 times

[PROGRAM] Png2Srf

Post by NightRaven » Mon Jun 22, 2015 6:47 am

Depends on the tolerance you set it in Blender. Can remove vertices you never knew existed in the mesh but can also screw it up beyond recognition if you're not careful.

User avatar
Flake
VFA-49
VFA-49
Posts: 4357
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 838 times
Been thanked: 1247 times
Contact:

[PROGRAM] Png2Srf

Post by Flake » Mon Jun 22, 2015 6:59 am

You can clean the SRF in Gepolyo easily - edit, Remove Duplicate Vertcies and edit, Remove None Used Vertex.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
MD5Ray01
Veteran
Veteran
Posts: 707
Joined: Mon Mar 25, 2013 11:17 pm
Favorite Aircraft: A-10A Thunderbolt 2
Location: Skyway Air Base, home of the 345th TFW
OS: Windows 10
Has thanked: 306 times
Been thanked: 86 times
Contact:

[PROGRAM] Png2Srf

Post by MD5Ray01 » Mon Jun 22, 2015 5:32 pm

Thanks, Flake! This'll come in handy.
ImageImage
Image
"Everything's better when inverted" - me, 2015

User avatar
tigershark
Modding Team
Modding Team
Posts: 1442
Joined: Mon Feb 14, 2011 10:07 pm
Favorite Aircraft: uk & germany fighter
Location: gateshead/newcastle
Has thanked: 211 times
Been thanked: 559 times
Contact:

[PROGRAM] Png2Srf

Post by tigershark » Mon Jun 22, 2015 5:34 pm

yea it is handy but some picture take a lot of memory like this one
Image

User avatar
decaff_42
Staff
Staff
Posts: 3626
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 692 times
Been thanked: 1465 times
Contact:

[PROGRAM] Png2Srf

Post by decaff_42 » Tue Jun 23, 2015 1:19 am

NightRaven wrote:Depends on the tolerance you set it in Blender. Can remove vertices you never knew existed in the mesh but can also screw it up beyond recognition if you're not careful.
This.

I have wrecked sketchup model imports be doing this before scaling the models up to real size.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Server Flight Log
Addon Database Submit Addon To Database

User avatar
Dragon029
Veteran
Veteran
Posts: 601
Joined: Sun Feb 06, 2011 6:09 am
Favorite Aircraft: F-35A
Location: Australia
Has thanked: 42 times
Been thanked: 85 times
Contact:

[PROGRAM] Png2Srf

Post by Dragon029 » Tue Jun 23, 2015 1:30 am

Yep, always gotta be careful of the 1-sided double-polygons during the sketchup conversion process. I always just try to ensure that I paint my model in Sketchup before exporting it, allowing me to use the colour split script to get what I want off it; you can do the same thing in geopolyx, etc, but being able to soften edges and paint large amounts of polygons with a single click in Sketchup can make things easier.
Per Ardua Ad Astra
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)

User avatar
Flake
VFA-49
VFA-49
Posts: 4357
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 838 times
Been thanked: 1247 times
Contact:

[PROGRAM] Png2Srf

Post by Flake » Tue Jun 23, 2015 2:23 am

tigershark wrote:yea it is handy but some picture take a lot of memory like this one
Haha thats why i put the 128 px limit on! You were warned hahaha!
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest