|
Okay - I added a button on the advanced vis form that allows the user to select any of the available weapons as his default. That way, when he clicks the simple button, he'll get the current default, and that will also be the default weapon shown in the advanced form when he opens it (unless another one has already been chosen but not made the default).
It will be made available this evening.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
modified 5-Oct-11 8:28am.
|
|
|
|
|
I added two more camo patterns as well. It might be a day or two before the next update.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
John Simmons / outlaw programmer wrote: I added two more camo patterns as well. It might be a day or two before the next update.
I will go over the app some more this weekend when I have free time away from work.
Just along for the ride.
"the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011) "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)
|
|
|
|
|
Very cool, downloaded it, messed around with it and I like it
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
A new (better) version is now available.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I was going to respond to your reply to the "It's Hard" thread in the lounge), but you deleted it.
Creating new weapons is goes something like this:
0) Weapon templates require two files - a mask file, and an overlay file.
1) Each of those files must 1500x720 pixels and 96 DPI.
2) Each of the images must be a PNG file with alpha channel transparency (you can create these with Photoshop, Paintshop Pro, paint.Net, Gimp, etc).
3) The filenames must be like this:
MyWeapon_mask.png
MyWeapon_overlay.png
("MyWeapon is the base filename, and BOTH files must be the same in this regard.)
4) The _mask file uses magenta as the mask color to indicate all areas on the combined image that are NOT the weapon. This is important. If you don't use magenta, CamoPicker won't make the correct areas transparent.
5) After you've created your files, you have to manually edit the CamoPickerData.xml file, and add a new item to the CamoObjects section. It should be fairly obvious how that goes if you use the existing entries as n example.
I don't use feathered edges on the overlay file because CamoPicker isn't doing alpha blending when combining the various files into a single image. Look at any of the existing overlay files to see what I mean.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
John Simmons / outlaw programmer wrote: Creating new weapons is goes something like this
Meaning that you could get these patterns on any other polygon? Like a t-shirt?
Bastard Programmer from Hell
|
|
|
|
|
I included the ford logo as an example that as long as you adhere to the specified rules, you can camo anything you want.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Thanks for the info on creating weapon templates.
John Simmons / outlaw programmer wrote: your reply to the "It's Hard" thread in the lounge), but you deleted it
If I recall, and my recall tends to be fuzzy these days, I deleted it and reposted it here in this thread where it belonged.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
If anyone is interested, you can get it here:
http://www.paddedwall.org/guns/downloads/camopicker.zip[^]
It's a 2.7MB download. Unzip it to a folder of your choice. The ZIP file contains:
CamoPicker.EXE
CamoPickerData.XML
...as well as four sub-folders:
Weapons (contains weapon templates)
Patterns (contains camo pattern templates)
ColorData (contains paint system data)
TestLandscapes (contains several landscape photos)
I'm curious to see how everyone does without any supporting documentation (which I'm currently working on), and to see if anything weird happens.
The About box contains several links. The only one that doesn't have anything meaningful is the "Download latest version" link at the top of the form (I'm working on the documentation and associated web at this time. The rest of them *should* go somewhere useful.
Known Weirdness:
0) When moving, rotating, or scaling the visualized weapon on the landscape, it flashes - BAD.
1) When rotating the visualized weapon, the rotation origin is always in the same place - the upper-left corner of the overlaid weapon image.
If anyone looking at this has a lot of experience with GDI+ in .Net, I'd be interested in hearing from you regarding the two weirdness items above.
Thanks for looking.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Link seems broken, results in a 404
Bastard Programmer from Hell
|
|
|
|
|
Try it again.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Looks cool on Win7, just visualized the camouflage of a weapon
Bastard Programmer from Hell
|
|
|
|
|
I love it when a plan comes together.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
John Simmons / outlaw programmer wrote: 0) When moving, rotating, or scaling the visualized weapon on the landscape, it flashes - BAD.
Have you enabled double-buffering? There's a couple articles here on CP, but I'm loathe to reference any as I can't tell if they're actually any good.
Marc
|
|
|
|
|
The custom picture box itself is double buffered.
I actually know why the flashing is occurring (I'm redrawing the background image in order to clear the old overlaid image), but any attempt to address it caused MUCH bigger issues.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Then simply double buffer yourself by first rendering into a bitmap and then updating the image in the control.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
Well, I'm not really looking for an answer to that until aft the initial release.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Great. How did you get rid of the flickering? In WinForms I always found the double bbuffering to be hit and miss.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
New version available:
Download link is at the bottom of the page[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Hi JSOP
Nice app, but I just found a way to make it crash, due to an "Unhandled exception".
Steps used to reproduce the crash:
1) Select an image
(I just used one of the sample images in Windows 7)
2) Get colors
3) Select "Simple visualization"
4) Select "Advanced visualization..."
(Just close the dialog, clicking OK or Cancel)
5) Select "Simple visualization"
6) Select "Advanced visualization..."
(BOOM!!!)
|
|
|
|
|
Try and be helpfull, post the stacktrace that was included in the exception
Bastard Programmer from Hell
|
|
|
|
|
Good point
Here is the complete error description:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.get_Width()
at System.Drawing.Image.get_Size()
at System.Windows.Forms.PictureBox.ImageRectangleFromSizeMode(PictureBoxSizeMode mode)
at System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.237 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
CamoPicker
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Michael%20B.%20Jensen/Downloads/camopicker/CamoPicker/CamoPicker.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.236 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.233 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitdebugging="true">
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
|
|
|
|