- Joined
- Jan 28, 2011
- Messages
- 99,629
Wasteland 3 beta portraits:
Would I be wasting my time if I went and made some icons out pieces done by the D&D artists that weren't explicitly made for D&D?
hey Infinitron what are the limitations to posting a list of avatars (resolution, image number, game genre, if it can be a gif, etc...)?
Excellent job with these new portraits, they fit in infinitely better than the ones belonging to the expansion. HOMM2 didn't need portraits of Cyberlore devs.
In fact, HoMM2 + PoL portrait pool features three different styles, the one being "slightly improved Heroes 1" mainly used for earlier MM game reference characters, the other being actual new Heroes 2 portraits for Necromancer and Wizard factions plus some vacancies in already existing factions and campaign characters, and finally the third being PoL campaign-only heroes. There was a rumor that these PoL portraits were based over Cyberlore employees. Anyhow, the quality of graphics for portraits was varied for the whole portrait poo
Although they don't add anything to the game as such, there are eleven new characters in PoL. The character portraits aren't in quite the same style as the other heroes, which is a bit of a shame. They're very nicely painted, but are stylistically slightly different, which means that they don't fit in as well as they might. And why are there eleven of them? That seems a strange number, but I have my suspicions: in the credits in the manual, it appears that eleven main people were involved in creating the game, and the male/female ratio matches, too, so I rather suspect that the new heroes are modelled on real people. It would be interesting to know who's who...
My bad, here you go.
Upload a zip file.
This place is prestigious?How the hell did a place as prestigious as this have a folder for DoW2 Portraits before one for DoWI?
Wow these are actually amazing. Thanks for posting them.A bit late for May 4th, but here's a handful made from various concepts, covers and illustrations done by Ralph McQuarrie for Classic Star Wars.
Thanks man!Wow these are actually amazing. Thanks for posting them.A bit late for May 4th, but here's a handful made from various concepts, covers and illustrations done by Ralph McQuarrie for Classic Star Wars.
import cv2
import imutils
import os
SMALL_EXT = "_Portrait.png"
LARGE_EXT = ".png"
OUTPUT_EXT = ".png"
OUTPUT_DIR = "Output"
def match_portrait(small, large):
found = None
template = cv2.Canny(cv2.cvtColor(small, cv2.COLOR_BGR2GRAY), 50, 200)
for size in range(small.shape[1], large.shape[1] + 1):
image = cv2.Canny(imutils.resize(cv2.cvtColor(large, cv2.COLOR_BGR2GRAY), width = size), 50, 200)
result = cv2.matchTemplate(image, template, cv2.TM_CCOEFF)
_, maxVal, _, maxLoc = cv2.minMaxLoc(result)
if found is None or maxVal > found[0]:
r = large.shape[1] / image.shape[1]
found = (maxVal, round(maxLoc[0] * r), round(maxLoc[1] * r), round(small.shape[0] * r), round(small.shape[1] * r))
image = cv2.Canny(cv2.cvtColor(large, cv2.COLOR_BGR2GRAY), 50, 200)
for size in range(1, small.shape[1] + 1):
template = cv2.Canny(imutils.resize(cv2.cvtColor(small, cv2.COLOR_BGR2GRAY), width = size), 50, 200)
result = cv2.matchTemplate(image, template, cv2.TM_CCOEFF)
_, maxVal, _, maxLoc = cv2.minMaxLoc(result)
if found is None or maxVal > found[0]:
found = (maxVal, maxLoc[0], maxLoc[1], template.shape[0], template.shape[1])
return found[1:]
def expand_portrait(startX, endX, expand, maxWidth):
offset = min(startX, int(expand/2))
startX -= offset
expand -= offset
offset = min(maxWidth-endX, expand)
endX += offset
expand -= offset
startX -= min(startX, expand)
return startX, endX
if not os.path.exists(OUTPUT_DIR):
os.mkdir(OUTPUT_DIR)
names = [filename.rsplit(SMALL_EXT, 1)[0] for filename in os.listdir() if filename.endswith(SMALL_EXT)]
for name in [name for name in names if os.path.exists(name + LARGE_EXT)]:
small = cv2.imread(name + SMALL_EXT)
large = cv2.imread(name + LARGE_EXT)
startX, startY, height, width = match_portrait(small, large)
endX, endY = startX + width, startY + height
startX, endX = expand_portrait(startX, endX, height-width, large.shape[1])
result = large[startY:endY, startX:endX]
cv2.imwrite(OUTPUT_DIR + os.sep + name + OUTPUT_EXT, result)
Wow...Owlcat's Pathfinder games have three sizes of portraits. Small facial portraits, large full body portraits, and an intermediate size.
Trouble is, neither of these portrait types is square shaped. I could manually crop the small facial portraits one-by-one, but I realized there was a better way based on how I created the Icewind Dale II avatar gallery.
By using a template matching algorithm, one can automatically locate the facial portraits within the full body portraits, and then to make them square shaped, add the required number of pixels to the left and right. So for example: