当前位置:网站首页>Lecture notes a utility for everyone to generate PCG
Lecture notes a utility for everyone to generate PCG
2022-07-28 07:56:00 【Dark light trace】
General
Recently turned to 2017 year GDC A speech by ——Practical Procedural Generation for Everyone, The speaker is right PCG The technology is briefly introduced , It is more suitable for people who want to know PCG Technical people .
This article refers to her speeches and articles for a summary , Try to answer the following two questions :
- What is? PCG?
- PCG Common methods ?
Use PCG Example :
- 《 My world 》, Generate terrain ;
- 《 Unmanned deep space 》, Make planets 、 Animals and plants, etc ;
- 《 Dwarfs Fortress 》, Generate maps 、 history 、 Characters, etc ;
- 《Pippen Barr》, Generate a way to touch your beard when playing chess ;
- 《Mr. Darcy Dance Simulator》, Generate Darcy The way to insult you
- 《Ultima Ratio Regum》, Create strange museums ;
- 《Yavalath》, Generate game rules ;
- Produce fabric skirts and so on 、 Generate artwork ;
- Making music 、 poetry .
Discussed PCG Three things :
- What do you want to generate ;
- Move experts into the program ;
- The specific methods .
What do you want to generate
First confirm what you want to generate , The more specific, the better , For example, generate a simple multi-storey apartment model , The goal of producing an interesting novel is a little too vague .
Next, think about what is good for products , What is bad . The good part can be set as the property of the generator , The bad part provides constraints , and Attributes and constraints determine the product possibility space .
Another way , If you don't know what to generate , You can also improvise , Start with some loose parts , Determine what it wants to generate .
Move experts into the program
This step is best discussed by experts , Get an in-depth understanding of the thinking process of experts when making this thing , Try to move it into a computer program .
In the design 《 Spore 》 Editor for , Program 、 Planning and art work closely , To understand art ( Animator ) How to model and map creatures . At that time, they hired a Disney animator , Dig deep into how he drew shapes when he created creatures 、 How to express biological character
Try asking experts the following questions ( Ontology ):
- What questions did they ask during the production process ?
- How they make decisions ?
- How do they balance multiple choices ?
- What kind of problems have been kept in their mind ?
- How do they name the parts of the production , And the relationship between the various parts ?
Some field experts have written some controversial frameworks to describe their work . For example, jazz improvisation in music 、 Bach style 、 harmony 、 Pop music , There are heroic narratives in the story 、TV Tropes( Research film 、 Bridge segment in TV series ), There is a golden ratio in Art 、 Color harmony and composition rules . It should be noted that no framework is complete , And there is no guarantee that following them will make a good generator , Various frameworks can provide some guidance and inspiration .
The specific methods
From rules to generation methods
human beings , Good at estimating 、 Guess and synthesize a lot of knowledge about the past ;
Computer , Tell what to do , But good at a lot of calculation .
Especially suitable for building generators ( Generation method ) The following skills will be given to computers :
1. Encapsulate knowledge options ( Skill A)
2. Create some structures ( Skill B)
3. The conditional rules of coding and selecting knowledge (A2)
4. Add variability to the structure (B2)
5. Be able to ask yourself questions according to constraints ( Have I solved this problem ?)( Skill C)
6 Methods :
Method 1,Distribution, Random distribution method , random number 、 Reality is layered and aggregated .
This is the simplest generation method , You can spread a bunch of things in time and space .

characteristic :
- There is not much overall structure (B);
- You may choose each option (A), Sometimes weighted random or deck shuffling is used ( List all options, choose from them and discard them after use );
- Conditions and rules (A2) It can also become very complex , Generally, fixed parameters are given for selection .
With RPG For example :
- Wandering monsters are distributed in the environment (A);
- Advanced monsters appear in higher-level areas , Water monsters appear in the water and so on (A2);
- Booty may be selected from a large number of booty (A);
- If you defeat advanced monsters, you may get more advanced trophies (A2).
Music and language use this method is not good , Because its structure is relatively heavy , Try a block based or grammar based approach , If its structure is very fixed , You can try parameterization .
Method 2,Parametric, Parameter method .
If you have a fairly perfect workpiece , And just need a little adjustment , It can be done by parameters . It is a very reliable and controllable method !
characteristic :
- Provide variability through fixed one-dimensional values (A);
- No structural variability at all (B2);
More complex parameter method forms :
- Use point based 、 Path based and graph based input , similar Photoshop;
- 《 Spore 》 Metaball used (Metaballs);
- Algorithm of filling space and path ,Voronoi Pattern 、Perlin/Simplex noise 、 Triangulation algorithm 、3D Squeeze or rotate , And the diamond square algorithm of fractal terrain .
Method 3,Tiles, Block based , civilization 、 Catan island 、 diablo 、 Tarot .
This method decomposes the problem into modular 、 Tiles of the same size .
characteristic :
- It is very suitable for small-scale structures (B);
- There is little flexibility (B2);
- The possible options are strictly encapsulated (A).
Method 4,Grammars, grammar ,Tracery( The author made his own language )、L-System、 Story builder .
characteristic :
- Can build very deep and complex structures (B);
- At the same time, it provides a lot of control (A);
- The disadvantage is that there is no way to deal with constraints ;
Method 5,Interpretive, Constraint solver , Process data into other data 、 Hand tracking to get the motion line 、 Berlin noise 、 Geometric algorithms 、metaballs、 Typing and Mathematics .
The simplest and oldest version is brute force cracking , Try to make every possibility , Until the content that conforms to the constraints is produced , Of course, the solution time can be shortened in some ways .
Method 6,Simulations, Proxy and simulation , Particle generator 、 Cellular automata 、 Proxy simulation 、 physical simulation 、 Genetic algorithm (ga) .
Many agents and simulations draw inspiration from nature , For example, birds 、 evolution 、 bacteria 、 Neurons and cities .
Reference resources
- 《GDC Practical Procedural Generation for Everyone》
https://www.youtube.com/watch?v=WumyfLEa6bU
- 《So you want to build a generator…》
https://galaxykate0.tumblr.com/post/139774965871/so-you-want-to-build-a-generator
边栏推荐
- “蔚来杯“2022牛客暑期多校训练营2补题记录(DGHJKL)
- 谈谈DOM0,DOM1,DOM2,DOM3
- 我们如何在mysql中运行批处理模式?
- 【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(八)
- 微信小程序隐藏滚动条的方法
- DNA修饰金属锇Os纳米颗粒OsNPS-DNA|DNA修饰金属铱纳米颗粒IrNPS-DNA
- 近红外二区AgzS量子点包裹脱氧核糖核酸DNA|DNA-AgzSQDs(齐岳)
- (daily question) - the longest substring without repeated characters
- 非关系型数据库之Redis【redis安装】
- [solution] visual full link log tracking - log tracking system
猜你喜欢

Opencv's practical learning of credit card recognition (4)
![[shaders realize negative anti color effect _shader effect Chapter 11]](/img/c5/70761374330eb4fb3915c335b7efb8.png)
[shaders realize negative anti color effect _shader effect Chapter 11]

Cdn.jsdelivr.net is not available, what should I do

ThreadLocal things

华为高级工程师---BGP路由过滤及社团属性

JUC atomic class: CAS, unsafe, CAS shortcomings, how to solve ABA problems in detail

快速搭建DMHS DM之间双向同步

Parse tree structure JS

GD32使用ST的HAL库和GD官方库的一些体会

Google and Stanford jointly issued a document: why do we have to use large models?
随机推荐
通过sed 修改conf文件
“蔚来杯“2022牛客暑期多校训练营2补题记录(DGHJKL)
These mobile security browsers are more than a little easy to use
Matplotlib绘图笔记基础直线、折线、曲线
Freezing and thawing of pytoch
快速搭建DMHS DM之间双向同步
【300+精选大厂面试题持续分享】大数据运维尖刀面试题专栏(八)
0727~ sorting out interview questions
Near infrared two region agzs quantum dots wrapped deoxyribonucleic acid dna|dna agzsqds (Qiyue)
Cdn.jsdelivr.net is not available, what should I do
滴滴SQL面试题之打车业务问题如何分析
EMC design strategy - clock
磁环选型攻略及EMC整改技巧
DNA修饰贵金属纳米颗粒|DNA脱氧核糖核酸修饰金属钯Pd纳米颗粒PdNPS-DNA
Protobuf basic grammar summary
Collector原理解析
Elaborate on common mode interference and differential mode interference
Adjust the array order so that odd numbers precede even numbers - two questions per day
leetcode 字符串类
[dry goods] 32 EMC standard circuits are shared!