Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 01:06:02 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignSo what can you procedurally generate?
Pages: 1 ... 3 4 [5] 6
Print
Author Topic: So what can you procedurally generate?  (Read 16969 times)
gouhadouken
Level 0
**



View Profile
« Reply #80 on: September 05, 2017, 04:01:12 PM »

Convincing skin tones! pseudo code:

float r = random.range(0.05f , 1.0f);

float g =  (r * 0.8f) + random.range(-0.05f , 0.05f);

float b = r * 0.5f;

Color skinTone = new color(r , g , b);

Logged
pelle
Level 2
**



View Profile WWW
« Reply #81 on: September 08, 2017, 11:21:09 PM »

Convincing skin tones! pseudo code:

float r = random.range(0.05f , 1.0f);

float g =  (r * 0.8f) + random.range(-0.05f , 0.05f);

float b = r * 0.5f;

Color skinTone = new color(r , g , b);



I turned it into a python script while drinking my morning coffee and it looks good, except I think (on this monitor anyway) some of the darker tones have a bit much green and/or blue in them (although my knowledge of the full range of human skintones might be lacking?). I do not know the reasoning behind the exact values used, but maybe the range for g (and b?) need to be scaled to decrease more for smaller values of r?

Code:
import random
import sys

nrtones = int(sys.argv[1])

print "GIMP Palette"
print "Name: gouhadouken skintones from tigsource"
print "#"

for n in range(nrtones):
    rf = random.uniform(0.05, 1.0)
    gf = (rf * 0.8) + random.uniform(-0.05, 0.05)
    bf = rf * 0.5
    r = int(255 * rf)
    g = int(255 * gf)
    b = int(255 * bf)
print "%d %d %d\t#%02x%02x%02x" % (r, g, b, r, g, b)
« Last Edit: September 08, 2017, 11:26:13 PM by pelle » Logged
BomberTREE
Level 9
****



View Profile
« Reply #82 on: September 10, 2017, 06:38:25 PM »

@Prinsessa
I enjoyed playing your game, your little generated worlds are fun and the audio is  Hand Thumbs Up Right

Could you guys post an image of the skintones?
Logged
Zireael
Level 4
****


View Profile
« Reply #83 on: September 11, 2017, 01:41:46 AM »

I can procedurally generate a car (the one at the side) and some wheels, and the road, and the nameplate and the label. The buildings are just procedurally placed, not generated yet. All the things I mentioned are procedurally generated in engine, not imported from Blender or w/e.

Logged
oahda
Level 10
*****



View Profile
« Reply #84 on: September 11, 2017, 02:58:13 AM »

@Prinsessa
I enjoyed playing your game, your little generated worlds are fun and the audio is  Hand Thumbs Up Right
Thanks from both of us! <3
Logged

gouhadouken
Level 0
**



View Profile
« Reply #85 on: September 11, 2017, 09:10:37 AM »

@BomberTREE

W/o rng:



W/ rng:

Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #86 on: September 11, 2017, 11:49:44 AM »

@BomberTREE
W/o rng:
Industry standard practice
Quote
W/ rng:
Cutting edge algorithm


Black skin a bit greenish though

Remind me of this:
http://www.mediainstitute.edu/media-schools-blog/2013/12/the-vector-scope-lessons-of-the-flesh-tone-line/
http://www.lafcpug.org/tutorials/basic_fleshscope.html
« Last Edit: September 11, 2017, 12:26:14 PM by gimymblert » Logged

Artsicle
Guest
« Reply #87 on: September 11, 2017, 12:16:17 PM »

Try doing a bigger sample size.
If you get these results again and again maybe add a higher chance for white
Logged
gouhadouken
Level 0
**



View Profile
« Reply #88 on: September 11, 2017, 01:02:46 PM »

Try doing a bigger sample size.
If you get these results again and again maybe add a higher chance for white

just based on what I've seen so far, the euro look only comes when the red channel rolls > like 85 - 90%, so there's that. There's defs room for tuning in the gen as well as the distribution of results. This basically just came about from me color picking fleshy tones in PS and eyeballing the rgb sliders.

Also, @BomberTREE those links are mad useful and your comments made me lol
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #89 on: September 11, 2017, 01:24:52 PM »


Also, @BomberTREE those links are mad useful and your comments made me lol

Wait are sure it's bombertree? I was the one posting links lol
Logged

jgrams
Level 3
***



View Profile
« Reply #90 on: September 11, 2017, 04:05:00 PM »

Yeah, those links are neat.  I never realized that.  Here's a try with HSV: hue from about 14-25 degrees, saturation from 0.4 to 0.55, value from 0.5 to 1.0.

skin-tones.love

It's interesting how much natural variation in hue there is within the face: these all look kind of flat and unnatural because they don't get more and less red with the angle of the light.

Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #91 on: September 11, 2017, 04:44:30 PM »

Documenting surface variation of the melanin is the most difficult part of my current research, at least for black people ... everybody want me to make black cheek "reder", even though I show photo of people where it's turning toward orange, and pointing to all sort of subtle variation they straight up don't see (subsurface don't seem to behave the same). Then there is stuff I perceive but don't see ... and there is reference material where people are covered with make up, so bad reference ... Skin is complex.

If some of you want to dig deep into this I recommend at least those paper:

A Spectral BSSRDF for Shading Human Skin by Craig Donner and Henrik Wann Jensen
Which basically about generating base skin color accurately depending on the various parameter (blood oxygenation, melanin mix, etc) but using integration over the XYZ lighting model

A Layered, Heterogeneous Reflectance Model for Acquiring and Rendering Human Skin
Talk more in depth of the various layer and variation on the skin that vary colors like blood vessels etc ..
Logged

gouhadouken
Level 0
**



View Profile
« Reply #92 on: September 11, 2017, 07:01:16 PM »


Also, @BomberTREE those links are mad useful and your comments made me lol

Wait are sure it's bombertree? I was the one posting links lol

I'm a special boy :/
Logged
Josh Bossie
Level 3
***


Fly Safe, Pup


View Profile WWW
« Reply #93 on: September 14, 2017, 04:09:06 PM »

So, I'm trying to bring some concepts of procedural generation to my game, Village Monsters

It's a life sim game, and because I'm passionate about simulating systems I've included a lot of them - simulated time, weather, creature behavior, etc.

As I developed these systems, I realized that I wanted to do more than just randomly pick a weather type for a day, randomly spawn critters depending on the season, etc.

Eventually I came up with the idea of a simulation controller I'm calling the Director - in truth, this name (and concept!) is very much stolen from Left 4 Dead.

The idea is that the Director has access to all the simulated systems and uses this information to control when things are created, how often, and more.

The reason I'm going with Director for the name is that each (in-game) day he picks a personality and 'directs' the day based on it. Some days he might be feeling generous and decide to purposefully spawn bugs and fish and furniture the player hasn't found yet. Other days he might be feeling a lot less generous and give you very little.

The eventual goal is to allow the Director to create entire patterns to give days or weeks a certain 'feel'. For example, he might be feeling "gloomy" and decide to make the entire week full of rain storms, darker-than-usual lighting, and somber ambient music.

It's also very experimental still, but I'm having a lot of fun applying "procedural" concepts to something beyond terrain for once
Logged

pelle
Level 2
**



View Profile WWW
« Reply #94 on: September 18, 2017, 11:04:37 PM »

Chris Crawford describes something that sounds like that Director in his book about interactive storytelling. Used to keep an eye on the different subsystems and make sure that good stories are generated instead of just random randomness, but I do not remember what he called it. Also not sure if he ever managed to actually implement it or if it is all just theory, but it sounds like a good thing, and maybe can work at least for reasonably simple systems.
Logged
Pishtaco
Level 10
*****


View Profile WWW
« Reply #95 on: September 19, 2017, 04:24:07 AM »



I'm trying to generate some continents, one or two thousand km on a side, for a top-down flight sim. The current system generates a plausible original shape using perlin noise, adapted to give some discontinuities (faults and rifts) and some remains of old mountains. Then I run several million years of fluvial erosion and mountain growth.

You can try the current version: https://dood.al/test/surface_transport.html
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #96 on: September 19, 2017, 06:26:22 PM »

I hope someone found a way to have erosion like feature without simulation one day ...
Logged

Josh Bossie
Level 3
***


Fly Safe, Pup


View Profile WWW
« Reply #97 on: September 20, 2017, 05:50:13 PM »

Chris Crawford describes something that sounds like that Director in his book about interactive storytelling. Used to keep an eye on the different subsystems and make sure that good stories are generated instead of just random randomness, but I do not remember what he called it. Also not sure if he ever managed to actually implement it or if it is all just theory, but it sounds like a good thing, and maybe can work at least for reasonably simple systems.

I hadn't heard of this before, but I'll take a look - that's right up my alley. Thanks!
Logged

TonyLi
Level 0
***


View Profile
« Reply #98 on: September 22, 2017, 11:19:04 AM »

Has no one mentioned procedural quest generation yet? Bethesda dabbled in it with their Radiant Quest System. Privateer even implemented a basic but wholly fun mission generator back in the day; I could always hit up a terminal for something entertaining to do.

I'm not posting to promote the procedural quest generator I just released for the Unity Asset Store (you can read about it here if you want) but since the thread is moving away from map generation into narrative stuff like L4D's Director, I thought it might be interesting to share a bit of info. My main influences, apart from classical AI planning, were Till Reimer's Agent-based procedural quest generation for a role-playing game, Bryson & Grey's Procedural Quests paper, and a bunch - of - papers by Doran & Parberry. And a ton of feedback from folks on the Unity forum over the last 2 years.

One challenge was figuring out what info to annotate the game world with to give it a rich variety of possibilities without burdening the designer too much. In the end, I ended up with entities that have actions, and quest givers that are aware of entities in designated areas. To generate a quest, the quest giver chooses an entity that it deems urgent, and then it plans a sequence of actions to improve the game world from its point of view. It models factions and personality values, so different quest givers could come up with different quests. For example, say there's a sick villager entity. A doctor NPC might generate a quest to heal the villager, while a thief might generate a quest to rob the villager and split the loot.

There's quite a bit more to it, but I think procedural quest and narrative generation has so much untapped potential. There's an opportunity right now for indie devs to really stand out by generating this kind of content in an interesting way.
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #99 on: September 22, 2017, 04:06:12 PM »

Hi TonyLi welcome to Tigs Board, I'll soon buy and experiment with your asset and implement idea I had! Continue the good work!
Logged

Pages: 1 ... 3 4 [5] 6
Print
Jump to:  

Theme orange-lt created by panic