Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Perlin noise
  • Loading branch information
vjeux committed Dec 28, 2011
1 parent 3c88520 commit b43912c
Show file tree
Hide file tree
Showing 5 changed files with 387 additions and 7 deletions.
134 changes: 134 additions & 0 deletions examples/perlin.rt
@@ -0,0 +1,134 @@
#####################
# Global parameters #
#####################

global
{
width 1024
height 768
l_color FFFFFF
l_intensity 40
highdef 0.5
}

###############
# Camera info #
###############

eye
{
coords -300 0 0
}

##############
# light list #
##############

light
{
color ffffff
coords -100 0 50
}

##############
# item list #
##############

### Left top
item
{
type sphere
color 404040
color2 b57118
radius 30
brightness 20
coords 0 100 50
pnoise 1
pnoise_octave 10
pnoise_freq 4
pnoise_pers 1
bump 100
}

# Center top
item
{
type sphere
radius 30
pnoise 3
pnoise_octave 10
pnoise_freq 2
pnoise_pers .9
coords 0 0 50
}

# Right top
item
{
type sphere
color FF0000
color2 bc7640
radius 30
coords 0 -100 50
brightness 20
pnoise 3
}

# Left bottom
item
{
type sphere
color 303090
color2 309090
radius 30
brightness 20
coords 0 100 -25
pnoise 3
pnoise_octave 10
pnoise_freq 5
pnoise_pers 5
bump 100
}

# Center bottom
item
{
type sphere
color 3b2b15
color2 776144
radius 30
coords 0 0 -25
pnoise 2
pnoise_octave 1
pnoise_freq 0.3
pnoise_pers 1
bump 150
}

# Right bottom
item
{
type sphere
color 303030
color2 FFAAAA
radius 30
coords 0 -100 -25
pnoise 3
pnoise_freq .9
pnoise_pers 0.9
pnoise_octave 5
}

# Floor
item
{
type plane
color 303030
color2 101010
coords 0 0 -60
pnoise 1
pnoise_freq .5
pnoise_pers .5
reflect 20
bump 100
}
46 changes: 46 additions & 0 deletions examples/test_perlin.rt
@@ -0,0 +1,46 @@
#####################
# Global parameters #
#####################

global
{
width 300
height 300
highdef 1
}

###############
# Camera info #
###############

eye
{
coords -300 0 0
}

item
{
type plane
color ffffff
color2 000000
coords 0 0 0
rot 0 -90 0
pnoise 1
pnoise_freq 1
pnoise_octave 8
pnoise_pers .3
}

item
{
type sphere
color ffffff
color2 000000
coords 0 0 0
radius 30
pnoise 1
pnoise_freq 1
pnoise_octave 8
pnoise_pers .3
}

94 changes: 94 additions & 0 deletions examples/texturing.rt
@@ -0,0 +1,94 @@
global
{
width 1024
height 768
}

eye
{
coords -300 0 0
}

light
{
coords -150 80 0
color ffffff
}

light
{
coords -150 -80 0
color 4242ff
}

item
{
type cylinder
color ffffff
opacity 50
tex tex/bebop_wall.png
tex_rep 1
radius 30
coords 100 -80 10
rot 20 10 0
}

item
{
type sphere
color ffffff
tex tex/bebop_wall.png
tex_rep 1
radius 30
coords 0 30 0
rot 0 0 -80
}

item
{
type plane
color ff4242
tex tex/marbre.png
tex_rep 1
reflect 50
coords 0 0 -50
}

item
{
type plane
color ffffff
tex tex/bebop_wall.png
tex_rep 1
coords 0 0 50
}

item
{
type plane
color ffffff
tex tex/bebop_wall.png
tex_rep 1
coords 0 -100 -50
rot -90 0 0
}

item
{
type plane
color ffffff
tex tex/bebop_wall.png
tex_rep 1
coords 0 100 -50
rot 90 0 0
}

item
{
type plane
color ffffff
tex tex/bebop_wall.png
tex_rep 1
coords 200 0 50
rot 0 -90 0
}
2 changes: 2 additions & 0 deletions trace.html
Expand Up @@ -11,6 +11,7 @@
<button id="save">Save Image</button>
</td><td valign="top" width="600">
<select>
<option>test_perlin.rt</option>
<optgroup label="Complex">
<option>reflect.rt</option>
<option>texturing.rt</option>
Expand All @@ -23,6 +24,7 @@
<option>ventil.rt</option>
<option>single_light.rt</option>
<option>light_3.rt</option>
<option>perlin.rt</option>
</option>
<optgroup label="Simple">
<option>example_1.rt</option>
Expand Down

0 comments on commit b43912c

Please sign in to comment.