jornadas sobre estrategias de generación de entornos...

37
1 1 Modelling Modelling natural natural scenes: a forest scenes: a forest Gustavo Gustavo Patow Patow Geometry Geometry and and Graphics Group (GGG) Graphics Group (GGG) Universitat Universitat de Girona ( de Girona ( UdG UdG) Jornadas sobre estrategias de generación de entornos colaborativos virtuales 2 Create a GRID op Create a GRID op

Upload: others

Post on 08-Jun-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

1

11

ModellingModelling natural natural scenes: a forestscenes: a forest

Gustavo Gustavo PatowPatowGeometryGeometry andand Graphics Group (GGG) Graphics Group (GGG)

UniversitatUniversitat de Girona (de Girona (UdGUdG))

Jornadas sobre estrategias de generación de entornos colaborativos virtuales

22

Create a GRID opCreate a GRID op

Page 2: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

2

33

Position the GRIDPosition the GRID

ManuallyManually

At origin by At origin by pressing pressing ENTERENTER

44

Create a BOXCreate a BOX

You can You can create it at create it at the origin the origin withwith

Page 3: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

3

55

Resize the BOXResize the BOX

66

Resize the BOXResize the BOX

Page 4: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

4

77

Nodes weNodes we’’ve createdve created

A Grid and a BoxA Grid and a Box Now, get sure you have the Box selectedNow, get sure you have the Box selected……

88

Create a COPY opCreate a COPY op

From the Modify menu, select COPYFrom the Modify menu, select COPY

Page 5: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

5

99

Select the gridSelect the grid……

Create a COPY opCreate a COPY op

1010

…… and press ENTERand press ENTER

Create a COPY opCreate a COPY op

Page 6: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

6

1111

Now we have a Box for every point on the Now we have a Box for every point on the Grid!Grid!

Create a COPY opCreate a COPY op

1212

Resulting NetworkResulting Network

This is the resulting networkThis is the resulting network–– All objects we had are now a All objects we had are now a singlesingle object object –– the single object has all the nodes for the the single object has all the nodes for the

operations so faroperations so far

Page 7: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

7

1313

We can modify any node in the history of We can modify any node in the history of the current objectthe current object–– E.g. use middle button to reE.g. use middle button to re--adjust box sizeadjust box size

Resulting NetworkResulting Network

1414

We can modify any node in the history of We can modify any node in the history of the current objectthe current object–– Or the grid total sizeOr the grid total size……

Resulting NetworkResulting Network

Page 8: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

8

1515

We can modify any node in the history of We can modify any node in the history of the current objectthe current object–– …… or its number of divisions!or its number of divisions!

Resulting NetworkResulting Network

1616

Change layoutChange layout

We want somethingWe want something–– More organicMore organic–– Not so regular!Not so regular!–– We can operate on the grid directly, not on We can operate on the grid directly, not on

the result!the result!

Page 9: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

9

1717

Add a Scatter nodeAdd a Scatter node

Click on the shelfClick on the shelf

1818

Scatter has created 5000 points!Scatter has created 5000 points!

Add a Scatter nodeAdd a Scatter node

Page 10: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

10

1919

LetLet’’s change it to 200 points!s change it to 200 points!

Add a Scatter nodeAdd a Scatter node

2020

Select the node and Select the node and ““view pointsview points”” to see to see what Scatter does!what Scatter does!

Add a Scatter nodeAdd a Scatter node

Page 11: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

11

2121

Mountain nodeMountain node

Select the Grid nodeSelect the Grid node And create a And create a ““MountainMountain”” nodenode

2222

This deforms the surface along the Y axisThis deforms the surface along the Y axis

Mountain nodeMountain node

Page 12: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

12

2323

We can increase randomness in YWe can increase randomness in Y……

Mountain nodeMountain node

2424

And still play with all the other values as And still play with all the other values as before!before!

Mountain nodeMountain node

Page 13: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

13

2525

Select the Mountain nodeSelect the Mountain node And press TabAnd press Tab To access some more functionalityTo access some more functionality

Mountain nodeMountain node

2626

In particular, we want to add an attribute In particular, we want to add an attribute the the thethe pointspoints……

For that, letFor that, let’’s create an s create an AttribCreateAttribCreate nodenode

AttribCreateAttribCreate nodenode

Page 14: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

14

2727

LetLet’’s create a new attributes create a new attribute And call it And call it pscalepscale..

AttribCreateAttribCreate nodenode

2828

This is a global parameter that is helping This is a global parameter that is helping the the CopyCopy nodenode……

AttribCreateAttribCreate nodenode

Page 15: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

15

2929

The copy node uses The copy node uses pscalepscale to control to control particle sizesparticle sizes

AttribCreateAttribCreate nodenode

3030

Click on the output of the Click on the output of the AttribCreateAttribCreate And select/type PaintAnd select/type Paint……

Paint nodePaint node

Page 16: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

16

3131

It allows us to It allows us to paintpaint attributes in a more attributes in a more ““organicorganic”” way!way!

Paint nodePaint node

3232

Select Select ““Override ColorOverride Color”” And select And select pscalepscale

Paint nodePaint node

Page 17: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

17

3333

And change And change ““radiusradius”” to 1to 1

Paint nodePaint node

3434

Change value of Foreground Color (FC) to Change value of Foreground Color (FC) to 5 5 55 5 5

Paint nodePaint node

Page 18: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

18

3535

Change Change ““OpacityOpacity”” to 0.01to 0.01

Paint nodePaint node

3636

Now, we can Now, we can ““paintpaint”” our attribute with our our attribute with our left mouse button!left mouse button!

Paint nodePaint node

Page 19: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

19

3737

If we increase our FC to 10 If we increase our FC to 10 1010 1010 changes changes will be faster (but the affected area will be will be faster (but the affected area will be the same)the same)

Paint nodePaint node

3838

If you play with the number of particles in If you play with the number of particles in the Scatter node, distribution of big/small the Scatter node, distribution of big/small will remain correct!will remain correct!

Paint nodePaint node

Page 20: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

20

3939

All cubes are equally oriented (axis)All cubes are equally oriented (axis) LetLet’’s use an expression to break this!s use an expression to break this! Right click on the Box outputRight click on the Box output

Transform nodeTransform node

4040

Transform nodeTransform node

And create a Transform node!And create a Transform node! It permits rotation along YIt permits rotation along Y

Page 21: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

21

4141

And write there the expressionAnd write there the expression

stamp(stamp(““../copy1../copy1””, , rotateshaperotateshape, 0), 0)

Transform node Transform node -- StampStamp

4242

stamp(stamp(““../copy1../copy1””, , rotateshaperotateshape, 0), 0)

Here:Here:–– Stamp is the expression commandStamp is the expression command–– ““../copy1../copy1”” is the location of the copy nodeis the location of the copy node–– RotateshapeRotateshape is a variable we createis a variable we create–– 0 is the default value if that variable is not 0 is the default value if that variable is not

foundfound

Transform node Transform node -- StampStamp

Page 22: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

22

4343

Copy Copy -- StampStamp

Back at the Copy node, letBack at the Copy node, let’’s select s select ““StampStamp”” to create the variableto create the variable

And turn on And turn on ““Stamp InputsStamp Inputs””

4444

And create And create ““rotateshaperotateshape”” If you give a constant value (e.g. 10), all If you give a constant value (e.g. 10), all

points will be affected by the same points will be affected by the same rotationrotation

Copy Copy -- StampStamp

Page 23: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

23

4545

So, letSo, let’’s uses userand($PTrand($PT)*360)*360

To get random values between 0To get random values between 0 and 360and 360$PT is the unique point identifier$PT is the unique point identifier……

Copy Copy -- StampStamp

4646

And we get a random distribution of And we get a random distribution of rotated boxes!!rotated boxes!!

Copy Copy -- StampStamp

Page 24: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

24

4747

LL--System nodeSystem node

Now, letNow, let’’s create something more exciting!s create something more exciting! Thus, deselect any node, press TabThus, deselect any node, press Tab……

4848

LL--System nodeSystem node

And create an LAnd create an L--System nodeSystem node It is almost like a little treeIt is almost like a little tree

Page 25: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

25

4949

LL--System nodeSystem node

And feed it into the transform node!And feed it into the transform node!

5050

LL--System nodeSystem node

Page 26: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

26

5151

Creating a Creating a ““LoDLoD”” systemsystem

At the output of the LAt the output of the L--SystemSystem Create a Switch nodeCreate a Switch node And wire the box node too!And wire the box node too!

5252

““LoDLoD””

We can switch:We can switch:–– 0 for trees0 for trees–– 1 for boxes1 for boxes

Page 27: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

27

5353

We can switch the orderWe can switch the order And weAnd we’’ll have ll have

–– 0 for the boxes0 for the boxes–– 1 for the L1 for the L--System System

Creating a Creating a ““LoDLoD”” systemsystem

5454

We can change the boxes to be of sizeWe can change the boxes to be of size0.3 1 0.30.3 1 0.3

so they look like a lowso they look like a low--res version of the res version of the treestrees

Creating a Creating a ““LoDLoD”” systemsystem

Page 28: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

28

5555

HDAHDA

Houdini Digital AssetHoudini Digital Asset Allows easy sharing of systemsAllows easy sharing of systems Encapsulates behavior into higherEncapsulates behavior into higher--level level

unitsunits Behaves as any other Houdini nodeBehaves as any other Houdini node

–– Seamlessly increases available tools!Seamlessly increases available tools!

5656

Select all of our nodesSelect all of our nodes

And pressAnd press

To create a collapsed subnet nodeTo create a collapsed subnet node

HDA Creation: SubnetHDA Creation: Subnet

Page 29: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

29

5757

HDA CreationHDA Creation

LetLet’’s rename it to s rename it to ““forestforest””

Right click and select Right click and select ““Create Digital Create Digital AssetAsset””

Change to “forest”

PressAccept

5858

HDAHDA

Creation GUICreation GUI

Page 30: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

30

5959

User interface designUser interface design

We can choose a variety of parametersWe can choose a variety of parameters

6060

We can create new attributes ourselvesWe can create new attributes ourselves……

User interface designUser interface design

Page 31: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

31

6161

We can take them directly from our We can take them directly from our nodes!nodes!

User interface designUser interface design

6262

We do not want to change the parameter We do not want to change the parameter namesnames……

User interface designUser interface design

Page 32: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

32

6363

Just drag the parameter to the interface!Just drag the parameter to the interface! LetLet’’s select the s select the ““Select InputSelect Input”” of the Switchof the Switch

User interface designUser interface design

6464

We have added one parameter!!!We have added one parameter!!!

User interface designUser interface design

Page 33: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

33

6565

The The ““SizeSize”” of the Grid nodeof the Grid node……

User interface designUser interface design

6666

The The ““heightheight”” of the Mountainof the Mountain

User interface designUser interface design

Page 34: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

34

6767

The number of points from the ScatterThe number of points from the Scatter

User interface designUser interface design

6868

If you want, you can change any label!If you want, you can change any label! E.g. E.g. ““Number Of TreesNumber Of Trees””

User interface designUser interface design

Page 35: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

35

6969

Accept, and click one level upAccept, and click one level up……

User interface designUser interface design

7070

We can further editWe can further edit To add a default value to 0 to our To add a default value to 0 to our LoDLoD

selectorselector

User interface designUser interface design

Page 36: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

36

7171

Select Select ““MenuMenu”” tabtab Activate Activate ““Use MenuUse Menu”” AddAdd

–– 0 Boxes0 Boxes–– 1 Trees1 Trees

Delete this line!

User interface designUser interface design

7272

We have a new menu item to select We have a new menu item to select between boxes and trees!between boxes and trees!

User interface designUser interface design

Page 37: Jornadas sobre estrategias de generación de entornos ...ima.udg.edu/~dagush/temp/OpenCobalt/01_Procedural Forest.pdf1 1 Modelling natural scenes: a forest Gustavo Patow Geometry and

37

7373

HDA in action!HDA in action!

7474

SummarySummary

Created a simple Grid and a cubeCreated a simple Grid and a cube Build a fairly complex systemBuild a fairly complex system Encapsulated into a new digital assetEncapsulated into a new digital asset

–– We can share this new node typeWe can share this new node type–– Being able to create a whole forest with Being able to create a whole forest with oneone

node!node!