Home | Webstore
Latest News: OOTP 26 Available - FHM 12 Available - OOTP Go! Available

Out of the Park Baseball 26 Buy Now!

  

Go Back   OOTP Developments Forums > Prior Versions of Our Games > Earlier versions of Out of the Park Baseball > Earlier versions of OOTP: Mods

 
 
Thread Tools
Old 04-30-2006, 04:29 AM   #1
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Possible Mass Face Generation Procedure Discovered

Okay, I may have discovered a method of doing mass face generation. I was able to create 999 unique faces in about an hour using this method, although attaching them to uniform templates will take more time. (Also, the ones I generate were of poor image quality, so I will have to go back tomorrow and do it again on a higher quality setting.)

What you need:
The FaceGen Demo
Photoshop or the GIMP (or whatever graphics program you use to add uniforms, logos, etc.)
IrfanView
An automatic screen caputring program (I'm using Gadwin)

If you've never used IrfanView, it's a wonderful little program that is free to use and has all sorts of great features (I highly recommend it for almost everything.) One of these features is a "batch file conversion" feature that allows you to apply the same transformation to a set of images (in particular, cropping and resizing, which we shall use here.)

Step 1:
Using the FaceGen Demo, create a face. I use the "Generate Face" option, with some of the values "rand-locked" so that they don't change (eg age, because I don't want 60 year old ballplayers in my league.)

Step 2:
Position the face as you need it for your template and go to the "genetic" tab. This tab will create 8 faces based on the current one with some variations. Setting the varition coefficient to 0.60 or greater will generate faces that aren't especially alike most of the time (ie, you have 9 unique faces.)

Step 3:
Screen capture that screen on a high quality setting (I did a batch of 999 faces in around an hour, but I only discovered afterward that my image quality setting on Gadwin was too low, and the images were a little fuzzy. I'm going to do it again in a couple of days [when my exams are over] on a higher quality setting.)

Step 4:
Repeat as necessary. For now, we don't care about getting the actual heads, we just want the screenshots. Use different settings each time to avoid monotony.

Step 5:
When you've got enough screen captures (by my calculations 333 screens gives you enough faces for every player in a 30-team league down to Single-A... that sounds like a lot, but it only took me an hour to do 111 screens and 999 players,) open up IrfanView and open 1 of the screens. Take note of the X-Y position of the top-left corner of each of the 9 pictures (I should have mentioned earlier, do not move or resize the FaceGen windo at any point during this procedure, or else it will not work. The whole thing rests on the 9 photos being in exactly the same part of the screen canvas at all times.)

Take note also of the height and width of these 9 images (on my screen, they were 128x128 pixels, but that may be different depending ono your resolutoin.

Step 6:
In IrfanView, go to "Batch File Conversion." Add all of your screen shots to the list of files to convert. Select and output directory and file format. Tick "Use Advanced Options", and then open the advanced options tab.

Tick "Crop" and enter the coordinates and size of the top-left face. If you are using a uniform template, you can also resize the images so that they will fit perfectly into it. When you're finished with the cropping options, click ok.

Step 7:
Make sure that y"Batch Conversion - Rename Results" is selected. Call the output files something like "topleft###".

Step 8: Run. This will crop the top left photo out of each screen.

Step 9: Repeat the steps 6-8 using the coordinates of the other photos (ie top-centre, top-right, mid-left, mid-centre, mid-right...)

You now have (# of screens) * 9 unique faces. Congratulations. Use them in your templates and enjoy. At some point when I have time I may write a utility that will automatically take of these photos and put them in a generic uniform template and then name them sequentially (ie. allowing all players in the league to have a photo, including new draftees, automatically.)

Some additional points of discussion:
1) Using the Demo Version, the letters "SI" will appear on the players' foreheads. Make sure that your template is such that the players hat covers this up, or else your league will look like a scifi movie.

2) In some file formats, you have the option to "save transparent colour". If you select this, then as each file is generated in the batch conversion, it will be displayed on your screen asking you to pick the transparent colour. If you're only doing 100 or so heads, this isn't so bad, but watch out if you're doing more.

3) It is very difficult to balance the level of randomness in FaceGen. Set it too low, all your players look alike. See it too high, a lot of them look like zombies. I found that 0.6 worked for me, but use your best judgment.

4) I'm going to post a zip with some examples of the faces that I created while testing this. Please note that a) I was still playing around with the balance thing mentioned above, so they aren't done as well as they could be; b) As mentioned earlier, you need to set the output quality of the screenshot program to a high value. I did not, and as a result these images are not of good enough quality to actually use.

I will post the images in moment.
Layton is my Homeboy is offline  
Old 04-30-2006, 04:38 AM   #2
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Ok, so here are some samples They are in PNG format, 128x128 pixels, with black set as the transparent colour. Because of the poor image quality, the backgrounds are not fully transparent, because they are not perfectly black.

I made 111 of them, although I could in principle make up to 999 with the screens that I have, and it would only take me a little bit longer, but again, the quality is not good enough.

Once I have made a useable set (not going to happen soon, as I am finishing exams and then going back to work full-time.. but as soon as I can,) I will of course share my work with the community.
Attached Images
Image Image Image Image Image 
Layton is my Homeboy is offline  
Old 04-30-2006, 04:40 AM   #3
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
more samples:
Attached Images
Image Image Image Image Image 
Layton is my Homeboy is offline  
Old 04-30-2006, 04:43 AM   #4
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Again, as soon as I've worked out the kinks w/r/t the image quality issues I plan on making a couple thousand for my own use with possilby also making a utility to automatically put them into a template. I am happy to share them if there is someone willing to host some gigantic rar files for me
Layton is my Homeboy is offline  
Old 04-30-2006, 01:38 PM   #5
gocubsgo
All Star Starter
 
gocubsgo's Avatar
 
Join Date: Mar 2003
Location: Illinois
Posts: 1,556
Wow those are very cool. I will be very interested in seeing what you can come up with.
gocubsgo is offline  
Old 04-30-2006, 02:26 PM   #6
OakDragon
Hall Of Famer
 
OakDragon's Avatar
 
Join Date: Feb 2006
Location: San Jose, CA USA
Posts: 3,494
Cool! I love how they come pre-branded for use in an SI game! lol
OakDragon is offline  
Old 04-30-2006, 02:47 PM   #7
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Quote:
Originally Posted by OakDragon
Cool! I love how they come pre-branded for use in an SI game! lol
Ya, Marc will love it!

So, I've been doing some more thinking about how my utility will work once completed.

My idea is that you feed it a set of faces produced as above and resized to fit one of a set of pose templates.

The template files would be separate bitmaps (because it'll be an easier format for me to work with.) I'm thinking about 5 different poses, and maybe 10-15 generic uniforms with no logos or text. Some hair (a la Bobble's template), some accessories (eg bat, hand holding ball, glasses, black stripes under eyes, etc.) 10-15 generic backgrounds (ie ballparks), etc.

Each of these random settings would have customizable distribution.

The program layers first the background, then head, then uniform and hat, then accessories, and assembles them all into a BMP file.

Automated process for all available heads, then batch convert to PNG for use in the game.

Now, I've never actually done any programming that involves playing with graphics, but I from what I understand about the BMP format, it's basically just a pixel-by-pixel colour value (hence the large size of BMP files,) so I think I could figure it out, but it may take me a while.

Fed enough faces, this could probably generate enough photos for a league without too much monotony.

Attached is an image of the sort of thing I would do (I'm sorry, I forget who made the uniform template... apologies for not crediting the creator.)

I didn't have a good background to use, hence Talbot College at the University of Western Ontario, but I think I could generate photos similar to this en masse.
Attached Images
Image 
Layton is my Homeboy is offline  
Old 04-30-2006, 04:14 PM   #8
gocubsgo
All Star Starter
 
gocubsgo's Avatar
 
Join Date: Mar 2003
Location: Illinois
Posts: 1,556
Now lets say someone wanted to put a team logo on the uni and hat how hard would that be? Now understand that i am a total newbie to graphics or photo programs.
gocubsgo is offline  
Old 04-30-2006, 04:36 PM   #9
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Quote:
Originally Posted by gocubsgo
Now lets say someone wanted to put a team logo on the uni and hat how hard would that be? Now understand that i am a total newbie to graphics or photo programs.
That depends on what exactly you have in mind...

If you wanted to create a uniform template for your team and just do a couple of photos, then that's easy enough for some of the folks on these boards to do if you ask them nicely (I'm not one of them, as I have no artistic skill whatsoever. I am proposing to impose cold mechical efficiency and mass reproducibility onto the artistic creations of others.)

What I have in mind is a little different... My goal is to create a photo for every player in the league, minors included. This way, you can put the numerically numbered photos in your league folder and every time a new player is created, he's got a photo already attached to him. So, I'd use this method to create a few thousand photos at a time.

Now, if you wanted to throw logos into the mix, that would be easy enough to do (ie by replacing the generic uniform templates with your team's,) but most of the players that you generated would have uniforms that don't match the teams they actually play for in your league (because of the random distribution)

There are some workarounds for this, but they'd require a bit of work.

First, you could just use a single uniform template and run 25 photos through it. That would give you a team. Then you'd have to take those 25 generated photos, and manually rename them to the names of the players on your team. Then you'd go to the next team, create a template for them, run 25 new photos through it, etc., etc. It would be a lot of work with all the renaming, but it would certainly be doable. The next obstacle, though, is that when a player gets traded or signs with a new club, the uniform doesn't match. So then, you need to create a new photo for that player, but you would probably want to preserve the face, so it would require that you cut the face out of the existing photo and put in a template with the new team's uniform.

I'm just thinking out loud right now, because I haven't actually made the software to combine faces and templates yet. When it's done, I will release:
1) All of the faces that I generate, sans uniform, for those will skills to use in their custom templates
2) All of the photos that I generate, with generic uniform and backgrounds for anyone who just wants to drop some photos in the league folder for regens
3) The software itself, so that anyone following the screencapture method can use it however they wish (including using your own uniforms with logos, if you like)
4) The source code for the software, in case any enterprising programmers want to pick up where I leave off and make it better (I'll be developing it in Lazarus/FreePascal... should be Delphi-compatible.)

The reason I want to do the generic uniforms is so that you don't end up having a player with the logo of a team that you can see in his history that he's never played for. With a generic logo, you can just say it's a photo of the player in the minors/highschool/college, and leave it at that. There would be a variety of different uniforms and colours, just no text or logos in the ones that I generate.

Another option, (that I didn't consider until you brought it up,) is that you could try to do it with no uniforms at all. You could make it just a headshot with hair (no hat,) and a background. But I don't know what most people would prefer.
Layton is my Homeboy is offline  
Old 04-30-2006, 04:58 PM   #10
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Quote:
Originally Posted by gocubsgo
Now lets say someone wanted to put a team logo on the uni and hat how hard would that be? Now understand that i am a total newbie to graphics or photo programs.
Sorry that I keep posting a thousand times in a row. Now that I think about it, there may be a better way of doing everying, but it depends on what data can be gleaned from the game you're playing.

If there's an easy way to access a file that lists all of the players in the league, their team, and their place of origin, I might be able to write a utility that creates photos for every player in the league with an appropriate ethnicity and using a template specific to the team they play for. What's more, you could store the source files used to generate each photo, and re-generate with the same face and a new uniform each time the player changes teams. I could create an "update photos" option which will go through each player in the league and update the uniform if the player has changed teams and create a new photo for any new draftees.

Hmmm.... now I'm getting excited. If this works properly, we may end up with fictional leagues filled with players with appropriate uniforms, all at the click of a mouse!

Ok, I'd better not get too excited before I sit down to write the code and realize how impossible it is and give up...

Does anyone know what kind of output the game will provide? A text or csv file with all of the player data would be just about perfect!
Layton is my Homeboy is offline  
Old 04-30-2006, 04:59 PM   #11
gocubsgo
All Star Starter
 
gocubsgo's Avatar
 
Join Date: Mar 2003
Location: Illinois
Posts: 1,556
Ah gotcha that does make more sense then. Very good idea.
gocubsgo is offline  
Old 04-30-2006, 05:59 PM   #12
blueturf
All Star Reserve
 
blueturf's Avatar
 
Join Date: Dec 2001
Posts: 516
Quote:
Originally Posted by Layton is my Homeboy
Some additional points of discussion:
1) Using the Demo Version, the letters "SI" will appear on the players' foreheads. Make sure that your template is such that the players hat covers this up, or else your league will look like a scifi movie.
If you go into the Singular Inversions folder there are three .bmp images that you can edit. skin_lo, skin_med & skin_hi -- smudge out the SI logo and all save the files. All faces now generated with the demo will already have the SI logo removed.

A few of us on the board have been playing with the FaceGen product for a few years. You might do a search under FaceGen to find the different templates and tips that have been discovered.

I am looking forward to what you come up with. Most of what you are talking about can be done with scripts within Photoshop, but streamlining the process would be a huge lift.
blueturf is offline  
Old 04-30-2006, 09:13 PM   #13
gocubsgo
All Star Starter
 
gocubsgo's Avatar
 
Join Date: Mar 2003
Location: Illinois
Posts: 1,556
Wow that would be perfect and would definitely add a little more to fictional universes.
gocubsgo is offline  
Old 04-30-2006, 11:23 PM   #14
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Quote:
Originally Posted by blueturf
If you go into the Singular Inversions folder there are three .bmp images that you can edit. skin_lo, skin_med & skin_hi -- smudge out the SI logo and all save the files. All faces now generated with the demo will already have the SI logo removed.

A few of us on the board have been playing with the FaceGen product for a few years. You might do a search under FaceGen to find the different templates and tips that have been discovered.

I am looking forward to what you come up with. Most of what you are talking about can be done with scripts within Photoshop, but streamlining the process would be a huge lift.
Thanks for the tips, and I look forward to the finished product myself (although, this will take some time to develop.)

I've seen some of the templates floating around these boards, and definitely plan on using whatever anyone will let me use/send me. When I get closer to a finished product and can give some conrete specs, I will probably solicit submissions for accessories, hair, facial hair, backgrounds, etc.

I'm just hoping that I'm not in way over my head here.
Layton is my Homeboy is offline  
Old 05-16-2006, 01:41 AM   #15
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
OOTP Face Maker (Working Title): Progress Update

Well, after struggling a bit with the TBitmap class, I've figured out how to combine bitmaps, interpreting black as transparent. Attached is the first photo I made using the software. Clearly, I still need to work some technical issues out (ie the uniform is obviously not being handled correctly.) Nonetheless, I think this Alpha Version of the software has proved that it is in principle quite feasible to mass-generate fictional player photos using uniform templates.

Project Roadmap:
Version 0.1 [DONE]
Basic ability to combine bitmaps using a transparent colour

Version 0.2 [ETA: Next Couple Weeks]
Ability to generate mass photos from random templates and name them numerically (with about 100 or so photos just to get started)

Version 0.3 [ETA: Soon after I get my hands on an SQL dump]
Ability to read OOTP SQL data for names, clubs, place of origin, team colours, find team logo file; ability to auto-create a uniform template for each team using its colours and logo

Version 0.4 [ETA: Late June (would be earlier, but I write the LSAT June 12)]
Ability to create player photos for an entire major league, using auto-created uniform templates appropriate to the player's club, and ethnicity appropriate to the player's place of origin; ability to save created photos as player's name or as unique ID (user's preference)

Version 0.5 [ETA: Hard to say...]
Ability to "scan" a league for real photos (as in the case of an actual MLB setup,) and to red-flag those photos so that they do not get replaced by the program; ability to scan the league for players who have changed teams (ie by being traded, signed, drafted, whatever,) and update that player's photo by changing the uniform while preserving his face and hair.

Version 0.6
Ability to handle custom uniform templates, while using auto-created ones by default if no custom uniform is specified; ability to create photos for all players (incl minor leagues); ability to install custom uniforms, accessories, faces, etc.; a single-photo editing mode to tweak an existing photo; coming packed with 1,000 or so faces; user options for how to handle minor league uniforms (ie if no custom uniform is specified, do you use the major league affiliate's uniform or a generic one using the minor league club's colours)

Version 1.0
Archiving of past photos (ie, backup old photos each time a new one is created); ability to revert to a past photo and "lock" it from further updates (ie so that retired players can appear in the uniform of the team that they played the bulk of their career for, not just their last team [this is assuming that retired players have photos in the game]); multiple styles of auto-created uniforms; ability to assign team-specific backgrounds (ie press conference with the logo inthe background); possibly a similar utility for non-playing staff (coaches, scouts, etc.) (assuming they have photos in the game); coming packed with (hopefully) 10,000 faces, tons of accessories and hairstyles, backgrounds, an MLB uniform set, and any other goodies I or someone else makes; more user-defined settings (ie generate all players, or only major leagues, or only above AA, or only specific teams...); ability to handle multiple games; anything else that I can think of and reasonably accomplish between now and then

Beyond 1.0:
Open to suggestions and ideas. I had though of possibly having multiple poses, although this seems to get unreasonably complicated, as you need specific accessory, uniform, hair, background set for each pose. Another idea is an in-application uniform template designer (possibly using some code from an open-source image editing program). Other ideas? Let me know. Bear in mind that it will be a small miracle if I actually make it to version 1.0

Also, I will definitely be soliciting generic uniform, hat, accessory, and hair templates as I get closer to a stable release. I will let you all know about specs when I have made them up.
Attached Images
Image 
Layton is my Homeboy is offline  
Old 05-16-2006, 08:58 AM   #16
cephasjames
Hall Of Famer
 
Join Date: Jun 2004
Posts: 8,736
This sounds very interesting and I hope it works out how you want it to. It's technicality is far beyond me so I'll just keep following as the pictures get prettier and your excitement gets more noticable.

My thoughts: Will this be an easy thing for a tech-idiot to do? If I just want 1000s of faces with different nationalities but with plain uniforms and hats (so I don't have to change them every time they change teams) would be able to do that? And how easily?

I planned on staying away from player pics this version simply because there'll be so many and I don't have enough or the right kind (i.e. japanese, etc.). This gets me excited that I might be able to. So keep up the great work!
__________________
5000+ Generic Logos Free for the Taking
FREE: Uniforms and logos for 500+ teams spanning 1871-present
Great Lakes League: 10 Conferences, 100 Teams
Pre-OOTP 23 Custom Cap & Jersey Template v3.0 by Deft and NoPepper (with layers from other various artists) that I use: Caps, Jerseys
cephasjames is offline  
Old 05-16-2006, 10:51 AM   #17
Bobble
Hall Of Famer
 
Bobble's Avatar
 
Join Date: Jul 2004
Location: High and outside
Posts: 3,899
A great project. I can't wait to see the results.

Quote:
Originally Posted by Layton is my Homeboy
Project Roadmap:
Version 0.1 [DONE]
Basic ability to combine bitmaps using a transparent colour
Would it be easier to have GIMP or Photoshop automatically "magic wand" the background color with an action or script? That's what I do manually when I make them.

I'd also suggest that a lot of work has already been done for this pose -- a hair template, a lot of pre-made uniforms, etc. Rather than re-invent the wheel, you might go with that.
Attached Images
Image 
__________________




Bobble is offline  
Old 05-16-2006, 08:19 PM   #18
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Quote:
Originally Posted by Bobble
Would it be easier to have GIMP or Photoshop automatically "magic wand" the background color with an action or script? That's what I do manually when I make them.
If you're making just a couple pictures, definitely. And that's what I use when making a logos. What I'm looking to do though is to be able to create a couple thousand images with the click of a button. In order to do this, I need an extremely efficient way for the program to identify what is and isn't background. The easiest way to do it is something like the following (in pseudo-code):

For Each Pixel
If colour is RGB(0,0,0) then use pixel from background image
Else use pixel from foreground image
End for;

That way, you can create templates for each component that have black backgrounds so that they can be very easily mixed and matched en masse.

As far as existing templates, definitely I plan on using the existing hair, accessories that are out there, although with slight modifications due to the specs I need to work with in order to make everything work properly. As well, I'm hoping to add to that base set for greater variety.

At this point though, I'm still in the phase where I'm just getting the basic image combining down to a science. (As well, now that I have the SQL Dump, I'm going to start working on reading player/team/poe data.)

Quote:
Originally Posted by cephasjames
My thoughts: Will this be an easy thing for a tech-idiot to do? If I just want 1000s of faces with different nationalities but with plain uniforms and hats (so I don't have to change them every time they change teams) would be able to do that? And how easily?
My best answer: Unclear at this point. I will endeavour to make it as easy to use as possible. The biggest obstacle will be that you will probably have to create an SQL dump in OOTP every time you want to update photos. This is... not ideal, but not terrible. I am hoping that I'll be able to read in the SQL dump directly, without making you install MySQL.

When all is said and done, here is how I hope it will work:
  1. In OOTP, create an SQL Dump
  2. Close OOTP, and open my utility
  3. Click "Update League"
In addition, if you want to create custom uniform templates for your league, that would mean a bit of additional work to create them and then attach them to a specific team in the league. But hopefully that's all the work it should take.
Layton is my Homeboy is offline  
Old 05-16-2006, 10:59 PM   #19
Layton is my Homeboy
Major Leagues
 
Layton is my Homeboy's Avatar
 
Join Date: Apr 2006
Location: Winnipeg, Mb
Posts: 429
Okay, I've set up a development thread for what I'm calling "OOTP FaceTool"
http://www.ootpdevelopments.com/boar...d.php?t=118171
Layton is my Homeboy is offline  
Old 05-17-2006, 01:05 AM   #20
Deft
All Star Starter
 
Deft's Avatar
 
Join Date: Dec 2001
Posts: 1,112
OK, got my attention! Great work so far. This is exactly what I hoped someone would champion when a few of us started building these several years back.

I created the forward and side templates the Bobble mentioned. I can change templates back to the forward facing one but I never really flushed out the template because the more freedom with the jersey on the side pictures. If you want I can create a brand new template that is front facing with more jersey showing. I can also give you tips for postprocessing so they look more like this.

http://athl-online.com/stats/luis_kirkendall.bmp
__________________
ATHL Louisville Jockeys (2001-present)
2002, 2007, 2010, 2012, 2014, 2015, 2020 World Champions
Uniform Template 1.2
Deft is offline  
 

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 Off

Forum Jump


All times are GMT -4. The time now is 10:19 PM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Copyright © 2024 Out of the Park Developments