• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

HTML How to randomly generate NPC's (3d/2d)

ShinCore

Active Member
May 19, 2020
614
665
I've been banging my head on a particular problem. I would love to see a slave themed game that graphically generates random slaves. There are a few games out there, all text based though. It seems that no one has figured out a way to get this don graphically with a few, not great exceptions. Cost of Survival/90 Second Slave, Lab Rats 2 and Free Cities. All 3 have issues.

I've been volunteering on a NSFW game, which I really love, but its missing the randomly generated slaves. Textwise, its not a problem. One can make a text based generator fairly easily.. It's generating the images/renders, whether its 2d or 3d that is the hurdle. and thats not even getting into allowing clothing to fit each body type. The game ive been volunteering is twine/sugarcube/html based.

Anyone have any ideas on how to clear this hurdle?
 

shark_inna_hat

Active Member
Game Developer
Dec 25, 2018
695
2,660
Check out how NFT scammers do it.
Make 5 head shapes.
Make 5 eye types.
Make 5 nose types.
Make 5 lips types.
Make 5 body types.
5x5x5x5x5 = 3125 unique character.

If it's 3d make every variation a morph target (shape key), but unless you're using realtime 3d you probably need to render out thousands of images.
If it's 2d make every variation a layer and just stack it (eyes on top of head, head on top of body and so on...)
 
  • Like
Reactions: papel

ShinCore

Active Member
May 19, 2020
614
665
ugh, the game is already being rendered in Daz3D. that sounds like a huge pain.
 

ShinCore

Active Member
May 19, 2020
614
665
unless... the renders could be like 2d static images??? argh this is why its tough for solo developers. one person cant do everything.
 

quarzo

Active Member
Aug 25, 2017
888
762
well i work in java, but i think the concept can be the same. as shark_inna_hat says you only need gather it in specific collections and call it.

for example,in my game for males need a colection of heads (a,b,c,d,e), all with diferent shapes.

my randomize char method just take a random head from these collection, then if choose the b, the b have their own collections of customs like hair, bears, skin colors and just build it like a normal npc of the game.


i really dont know your engine limitations, so iguess can be posible instead of have a a render of each full body variation, split the body in parts with their variations.

like body white/tan/dark, face var ugly/normal/atractive, each of these have a white/tan/dark variation for fit whit the body color, later a colection of hairs for fit in each head etc etc .... then render it at runtime in the game like the all others cut out animations.
 
  • Like
Reactions: FromOtherSpace

PTSdev

Member
Oct 21, 2019
101
285
Check this out:

The main issue with randomizing characters is how it looks in the end. Rule of thumb: The more stylized the faces are, the easier it gets. If you want realistic faces to be randomized, you're in for a tough ride.
 

Rafster

Bear chaser
Game Developer
Mar 23, 2019
1,997
3,902
Hornstown tried something with the NPCs at the Extreme circumstances club, but at the end it was a rather large number of NPCs (20 or so) rotated randomly. I think the paperdoll technique is the way to go to achieve this.

On 3D, Lifeplay generates random NPCs but I have no idea how the hell they do this.
 

ShinCore

Active Member
May 19, 2020
614
665
well i work in java, but i think the concept can be the same. as shark_inna_hat says you only need gather it in specific collections and call it.

for example,in my game for males need a colection of heads (a,b,c,d,e), all with diferent shapes.

my randomize char method just take a random head from these collection, then if choose the b, the b have their own collections of customs like hair, bears, skin colors and just build it like a normal npc of the game.


i really dont know your engine limitations, so iguess can be posible instead of have a a render of each full body variation, split the body in parts with their variations.

like body white/tan/dark, face var ugly/normal/atractive, each of these have a white/tan/dark variation for fit whit the body color, later a colection of hairs for fit in each head etc etc .... then render it at runtime in the game like the all others cut out animations.
right now the game im volunteering is twine/sugarcube/html. trying to get this working for that.
 

ShinCore

Active Member
May 19, 2020
614
665
Check this out:

The main issue with randomizing characters is how it looks in the end. Rule of thumb: The more stylized the faces are, the easier it gets. If you want realistic faces to be randomized, you're in for a tough ride.
I did see that from HiEV. problem is the game is already using realistic renders from Daz3D. the artstyle is not stylized. that seems like it would be a major mismatch.
 

ShinCore

Active Member
May 19, 2020
614
665
Hornstown tried something with the NPCs at the Extreme circumstances club, but at the end it was a rather large number of NPCs (20 or so) rotated randomly. I think the paperdoll technique is the way to go to achieve this.

On 3D, Lifeplay generates random NPCs but I have no idea how the hell they do this.
yah, i know that Lifeplay does. its a great game, but the models are... hard to look at.
 

Saki_Sliz

Well-Known Member
May 3, 2018
1,403
997
It was mentioned by the first reply about breaking the assets into parts and combining them, such as head and body type, skin type, etc. something else if you want a bit more power is, rather than just static images, apply the textures and layers (body, cloths, makeup) on a mesh, and animate the mesh in the game to allow shape changing. The issue is that its a lot of work, as you mentioned, most of the assets for the project are already finished in daz, the issue is, you're not going to get what you want without a lot of prep work.
 

papel

Member
Game Developer
Sep 2, 2018
293
416
I did see that from HiEV. problem is the game is already using realistic renders from Daz3D. the artstyle is not stylized. that seems like it would be a major mismatch.
Your problem is in using renders. Having a set of customization options and changing between them in real time is easy, just look at all the commercial games that offer character customization. It's why it works with Lifeplay.
For renders, it's more problematic because you're dealing with static images. Let's say you're working with 3 poses and 3 hairstyles. To make it work, you'd have to render each hair by itself (human model hidden) for each pose, so we're talking 9 renders. After that, you'll have to figure which part of the hair goes under or over the head, either by separating it in layers (front/back) or by manually editing the render and making some parts transparent
The amount of work with drawn art wouldn't be as high because you can animate in real time. With 1 art for arm, you can mirror it for the opposite side, pose it holding the hip, facepalming, put it in a praying position, make a punch movement, etc. It's not the same thing as a proper drawing in that position, but it is good enough in many cases. You can do that with a collection of pre-rendered pieces, but since the animation is purely 2D with not-quite-3D assets, it'll look awkward and weird, at the very least.

TLDR renders are a terrible option for character customization
 
  • Like
Reactions: PTSdev and quarzo