POV-Ray : Newsgroups : povray.newusers : My first scene Server Time
25 Dec 2024 23:24:57 EST (-0500)
  My first scene (Message 1 to 3 of 3)  
From: Frantisek Fuka
Subject: My first scene
Date: 1 Sep 2002 14:28:19
Message: <3d725c43@news.povray.org>
Following is my first ever 3d scene. Could someone please give me 
pointers what could be done better, more elegantly?

Thanks
------------------------------

#include "colors.inc"
#include "arrays.inc"
camera {
     location <9,7,10>
     look_at <0,-5,0>
}
light_source { <10,10,20> color White*.6}
light_source { <10,10,10> color White}

#declare R1 = seed(666);

#macro Face_Dots (Dot_Array, rot)
     #local i = 0;
     #local to = dimension_size(Dot_Array,1) - 1;
     #if (to>0)
         merge {
     #else
         object {
     #end
     #while (i<=to)
         sphere {
             <Dot_Array[i][0],0,Dot_Array[i][1]>,
             0.55
         }
         #local i=i+1;
     #end
     pigment {White}
     finish {diffuse 0.5}
     scale .5
     translate y*1.2
     rotate rot
         }

#end

#macro Die(Pigment)
difference {
     intersection {
         box {
                 <-1,-1,-1>,
                 <1,1,1>
             }
         sphere {
             <0,0,0>,
             1.4
             }
         pigment {Pigment}
         finish {diffuse 0.4}
     }
     Face_Dots (array[6][2] {{1,1}, {0,1}, {-1,1}, {1,-1}, {0,-1}, 
{-1,-1}}, <0,0,0>)
     Face_Dots (array[1][2] {{0,0}}, <180,0,0>)
     Face_Dots (array[2][2] {{-1,-1}, {1,1}},<90,0,0>)
     Face_Dots (array[5][2] {{-1,-1}, {1,1}, {1,-1}, {-1,1}, 
{0,0}},<-90,0,0>)
     Face_Dots (array[3][2] {{-1,-1}, {0,0}, {1,1}},<0,0,-90>)
     Face_Dots (array[4][2] {{-1,-1}, {-1,1}, {1,-1}, {1,1}},<0,0,90>)
}
#end

#macro Rot (Seed)
     Rand_Array_Item (array[4] {0,90,180,270}, Seed)
#end

#local Size=5;
#local Spacing=2.1;
#local i=-Size;
#while (i<=Size)
     #local j=-Size;
     #while (j<=Size)
         object {
             Die (rgb<rand(R1),rand(R1),rand(R1)>)
             rotate <Rot(R1),Rot(R1),Rot(R1)>
             translate <i*Spacing,1+rand(R1),j*Spacing>
         }
         #local j=j+1;
     #end
     #local i=i+1;
#end


Post a reply to this message

From: ingo
Subject: Re: My first scene
Date: 1 Sep 2002 15:07:29
Message: <Xns927CD79C5AFB6seed7@povray.org>
in news:3d725c43@news.povray.org Frantisek Fuka wrote:

> Following is my first ever 3d scene. Could someone please give me 
> pointers what could be done better, more elegantly?
> 

Good start!

One small comment on the code, always put "global_settings {assumed_gamma 
1.0}" in your scene when developing a new one. It will make shure that 
your scene will render to the same visual result anywhere.
Good use of arrays!

Regarding the image, now the difficult part begins, lighting and 
texturing.

Ingo


Post a reply to this message

From: krus
Subject: Re: My first scene
Date: 12 Sep 2002 15:50:07
Message: <web.3d80ef10461e3f7326f959360@news.povray.org>
ingo wrote:
>in news:3d725c43[at]news.povray.org Frantisek Fuka wrote:
>
>> Following is my first ever 3d scene. Could someone please give me
>> pointers what could be done better, more elegantly?
>>
>
>Good start!
>
>One small comment on the code, always put "global_settings {assumed_gamma
>1.0}" in your scene when developing a new one. It will make shure that
>your scene will render to the same visual result anywhere.
>Good use of arrays!
>
>Regarding the image, now the difficult part begins, lighting and
>texturing.
>
>Ingo
>

Hi
Im new to pov too and it is a nice scene u have made.
i know about fotografy though and theres a couple of things that u can do.
u use two lightsouses but both are pointlight. u dont get any lightdepth
add an arealight.
i then chamged the two light to be dim and colored -it adds a moode to the
scene. Some might think thats wrong. Its a question of taste.
Never flood the scene in light. Dim the light and use PoVs amaging different
lightforms.
I added a texture and made the color translusient.
I think taht both the wood texture and the brass texture give interesting
result. -But the brass texture made rendering longer
Below is my sugestions -Thats all they are.
//code:

#include "colors.inc"
#include "arrays.inc"
// various (mostly layered) wood textures
// T_Wood1 - T_Wood35
#include "woods.inc"
// several different gold colors, finishes and textures
#include "golds.inc"

// various metal colors, finishes and textures
// brass, copper, chrome, silver
#include "metals.inc"


camera {
     location <9,7,10>
     look_at <0,-5,0>
}

light_source { <-10,10,20> color Yellow*.3}
light_source { <10,10,10> color Red*.3}



  // An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.0*1.6       // light's color
  area_light
  <8, 0, 0> <0, 0, 8> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  circular            // make the shape of the light circular
  orient              // orient light
  translate <40, 80, -40>   // <x y z> position of light
}



#declare R1 = seed(666);

#macro Face_Dots (Dot_Array, rot)
     #local i = 0;
     #local to = dimension_size(Dot_Array,1) - 1;
     #if (to>0)
         merge {
     #else
         object {
     #end
     #while (i<=to)
         sphere {
             <Dot_Array[i][0],0,Dot_Array[i][1]>,
             0.55
         }
         #local i=i+1;
     #end
     pigment {White}
     finish {diffuse 0.5}
     scale .5
     translate y*1.2
     rotate rot
         }

#end

#macro Die(Pigment)
difference {
     intersection {
         box {
                 <-1,-1,-1>,
                 <1,1,1>
             }
         sphere {
             <0,0,0>,
             1.4
         }

         texture {
         T_Brass_3C //  T_Wood21 //wood gives a nice result to
         pigment {Pigment}
         }

         finish {diffuse 0.4 phong 1}
     }
     Face_Dots (array[6][2] {{1,1}, {0,1}, {-1,1}, {1,-1}, {0,-1},
{-1,-1}}, <0,0,0>)
     Face_Dots (array[1][2] {{0,0}}, <180,0,0>)
     Face_Dots (array[2][2] {{-1,-1}, {1,1}},<90,0,0>)
     Face_Dots (array[5][2] {{-1,-1}, {1,1}, {1,-1}, {-1,1},
{0,0}},<-90,0,0>)
     Face_Dots (array[3][2] {{-1,-1}, {0,0}, {1,1}},<0,0,-90>)
     Face_Dots (array[4][2] {{-1,-1}, {-1,1}, {1,-1}, {1,1}},<0,0,90>)
}
#end

#macro Rot (Seed)
     Rand_Array_Item (array[4] {0,90,180,270}, Seed)
#end

#local Size=5;
#local Spacing=2.1;
#local i=-Size;
#while (i<=Size)
     #local j=-Size;
     #while (j<=Size)
         object {
             Die (rgbt<rand(R1),rand(R1),rand(R1),0.7>)
             rotate <Rot(R1),Rot(R1),Rot(R1)>
             translate <i*Spacing,1+rand(R1),j*Spacing>
         }
         #local j=j+1;
     #end
     #local i=i+1;
#end
//codeEnd

regards krus


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.