Functions | |
| def | Cube (width=1.0, height=1.0, depth=1.0) |
| Cube definition from Cube.py by Jon Macey (https://github.com/NCCA/Renderman/blob/master/Lecture1Intro/Cube.py). More... | |
| def | checkAndCompileShader (shader) |
| Load OSL shader definition is from scene.py by Jon Macey (https://github.com/NCCA/Renderman/blob/master/Lecture4Shaders/scene.py). More... | |
| def | convertColourValue (colourValue) |
| A funciton to convert a value of 0-255 to a value of 0-1. More... | |
| def | legsShader (legsColour, dirtValue, damage) |
| A function for the definiton of the shader to use on the legs. More... | |
| def | headShader (headColour, dirtValue) |
| A function for the definiton of the shader to use on the head. More... | |
| def | chestShader (chestType, chestBaseColour, chestDetailColour, dirtValue, damage) |
| A function for the definiton of the shader to use on the chest. More... | |
| def | tableShader () |
| A function for the definiton of the shader to use on the table. More... | |
| def | head (xScale, yScale, zScale) |
| A function for the definiton of the main head geometry (points generated in external modeling program). More... | |
| def | chest (xScale, yScale, zScale) |
| A function for the definiton of the chest gemoetry (points generated in external modeling program). More... | |
| def | loadColourCmd (cmdNum, cmdNumType, defaultColour) |
| A function for loading in a colour from the command line. More... | |
| def | drawScene (ri, chestType, chestBaseColour, chestDetailColour, headColour, legsColour, dirtValue, damage) |
| A function for the definiton of the scene to generate. More... | |
Variables | |
| bool | altAngle = False |
| The main function. More... | |
| string | outputType = "it" |
| The type of output to use, default is it. More... | |
| string | chestType = "blank" |
| Initalise the default values for the figure generation. More... | |
| list | chestBaseColour = [0.02,0.02,0.4] |
| Check for chest base colour command. More... | |
| list | chestDetailColour = [1,1,1] |
| Check for chest detail colour command. More... | |
| list | headColour = [convertColourValue(220),convertColourValue(150),convertColourValue(10)] |
| Check for head colour command. More... | |
| list | legsColour = [0.6,0,0] |
| Check for legs colour command. More... | |
| float | dirtValue = 0.3 |
| bool | customFileName = False |
| Check for alt angle command. More... | |
| int | damage = 3 |
| loadedNum = float(sys.argv[i+1]) | |
| Check for dirt value command. More... | |
| outputFilename = sys.argv[i+1] | |
| Set the filename based on angle. More... | |
| ri = prman.Ri() | |
| string | filename = outputFilename + ".rib" |
| def assignment.checkAndCompileShader | ( | shader | ) |
Load OSL shader definition is from scene.py by Jon Macey (https://github.com/NCCA/Renderman/blob/master/Lecture4Shaders/scene.py).
| shader | The shader to load. |
Definition at line 40 of file assignment.py.
| def assignment.chest | ( | xScale, | |
| yScale, | |||
| zScale | |||
| ) |
A function for the definiton of the chest gemoetry (points generated in external modeling program).
| xScale | The scale of the chest in the X direction. |
| yScale | The scale of the chest in the Y direction. |
| zScale | The scale of the chest in the Z direction. |
Definition at line 179 of file assignment.py.

| def assignment.chestShader | ( | chestType, | |
| chestBaseColour, | |||
| chestDetailColour, | |||
| dirtValue, | |||
| damage | |||
| ) |
A function for the definiton of the shader to use on the chest.
| chestType | The type of chest pattern to generate (blank, checked, perlin or camo). |
| chestBaseColour | The base colour for the chest. |
| chestDetailColour | The deatil colour for the chest. |
| dirtValue | The amount of dirt to add to the chest. |
| damage | The seed of the damage to add to the chest. |
Definition at line 109 of file assignment.py.

| def assignment.convertColourValue | ( | colourValue | ) |
A funciton to convert a value of 0-255 to a value of 0-1.
| colourValue | The colour value to convert. |
Definition at line 50 of file assignment.py.

| def assignment.Cube | ( | width = 1.0, |
|
height = 1.0, |
|||
depth = 1.0 |
|||
| ) |
Cube definition from Cube.py by Jon Macey (https://github.com/NCCA/Renderman/blob/master/Lecture1Intro/Cube.py).
| width | The width of the cube (Default value of 1.0). |
| height | The height of the cube (Default value of 1.0). |
| depth | The depth of the cube (Default value of 1.0). |
Definition at line 13 of file assignment.py.

| def assignment.drawScene | ( | ri, | |
| chestType, | |||
| chestBaseColour, | |||
| chestDetailColour, | |||
| headColour, | |||
| legsColour, | |||
| dirtValue, | |||
| damage | |||
| ) |
A function for the definiton of the scene to generate.
| ri | The Renderman instance. |
| chestType | The type of chest pattern to generate (blank, checked, perlin or camo). |
| chestBaseColour | The base colour for the chest. |
| chestDetailColour | The deatil colour for the chest. |
| headColour | The colour for the head. |
| legsColour | The colour for the legs. |
| dirtValue | The amount of dirt to add to the chest. |
| damage | The seed of the damage to add to the chest. |
Definition at line 239 of file assignment.py.

| def assignment.head | ( | xScale, | |
| yScale, | |||
| zScale | |||
| ) |
A function for the definiton of the main head geometry (points generated in external modeling program).
| xScale | The scale of the head in the X direction. |
| yScale | The scale of the head in the Y direction. |
| zScale | The scale of the head in the Z direction. |
Definition at line 156 of file assignment.py.

| def assignment.headShader | ( | headColour, | |
| dirtValue | |||
| ) |
A function for the definiton of the shader to use on the head.
| headColour | The colour for the head. |
| dirtValue | The amount of dirt to add to the head. |
Definition at line 87 of file assignment.py.

| def assignment.legsShader | ( | legsColour, | |
| dirtValue, | |||
| damage | |||
| ) |
A function for the definiton of the shader to use on the legs.
| legsColour | The colour for the legs. |
| dirtValue | The amount of dirt to add to the legs. |
| damage | The seed of the damage to add to the legs. |
Definition at line 57 of file assignment.py.

| def assignment.loadColourCmd | ( | cmdNum, | |
| cmdNumType, | |||
| defaultColour | |||
| ) |
A function for loading in a colour from the command line.
| cmdNum | The command for the number value. |
| cmdNumType | The command for the type of number value. |
| defaultColour | The default colour to use if the command is invalid. |
Definition at line 203 of file assignment.py.

| def assignment.tableShader | ( | ) |
A function for the definiton of the shader to use on the table.
Definition at line 139 of file assignment.py.

| bool assignment.altAngle = False |
The main function.
Check for alt angle command.
A boolean for the angle to generate.
Set the alt angle to be true.
Definition at line 377 of file assignment.py.
| def assignment.chestBaseColour = [0.02,0.02,0.4] |
Check for chest base colour command.
Load the colour from the command.
Definition at line 383 of file assignment.py.
| def assignment.chestDetailColour = [1,1,1] |
Check for chest detail colour command.
Load the colour from the command.
Definition at line 384 of file assignment.py.
| assignment.chestType = "blank" |
Initalise the default values for the figure generation.
Check command line inputs.
Check for chest type command. Check if valid chest type.
Definition at line 382 of file assignment.py.
| bool assignment.customFileName = False |
Check for alt angle command.
Set the code to use a custom filename.
Definition at line 388 of file assignment.py.
| assignment.damage = 3 |
Definition at line 389 of file assignment.py.
| assignment.dirtValue = 0.3 |
Definition at line 387 of file assignment.py.
| string assignment.filename = outputFilename + ".rib" |
Definition at line 491 of file assignment.py.
| def assignment.headColour = [convertColourValue(220),convertColourValue(150),convertColourValue(10)] |
Check for head colour command.
Load the colour from the command.
Definition at line 385 of file assignment.py.
| def assignment.legsColour = [0.6,0,0] |
Check for legs colour command.
Load the colour from the command.
Definition at line 386 of file assignment.py.
| assignment.loadedNum = float(sys.argv[i+1]) |
Check for dirt value command.
Check for damage value command.
Try to convert to numbers.
Definition at line 451 of file assignment.py.
| string assignment.outputFilename = sys.argv[i+1] |
Set the filename based on angle.
Definition at line 465 of file assignment.py.
| assignment.outputType = "it" |
The type of output to use, default is it.
Check for output command.
Check if valid output type.
Definition at line 379 of file assignment.py.
| assignment.ri = prman.Ri() |
Definition at line 482 of file assignment.py.