POV-Ray : Newsgroups : povray.general : Meshes/Normals and Shading Server Time
1 Nov 2024 12:25:29 EDT (-0400)
  Meshes/Normals and Shading (Message 1 to 3 of 3)  
From: Jason Miller
Subject: Meshes/Normals and Shading
Date: 17 Jul 2000 01:07:09
Message: <3972947d$1@news.povray.org>
Hello,
     I am working with a mesh object that a program I wrote outputs.  For
some reason, when rendered, the mesh appears not to be shaded at all.  Is
there something I should be doing here in order for this mesh to be shaded?
I realize that you need to use smooth triangle for them to be blended, but
still, the triangles should be shaded light/dark based upon its
angle/distance from light source.

Thanks!

Jason



background {rgb<.5,.5,.5>}
camera {
    location <0, 0, 50>

    look_at < 8.385956, 0.0, - 8.385956>
}

light_source {   // Spotlight Spotlight001
  <75, 75,00>
  color rgb <1.000, 1.000, 1.000>
  spotlight
    point_at  < 8.385956, 0.0, - 8.385956>
    falloff    3.000  // outer radius (in deg)
    radius     2.000  // inner radius
    tightness  1.000
  media_attenuation on
  scale <4.587608, 3.746319, 8.884018>
  translate  <1.452209, 0.0, 11.505967>
}


mesh {
triangle
{<24.9938812255859,-1.08854675292969,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<24.709716796875,3.24699401855469,-0.5989990234375>}
triangle
{<24.709716796875,3.24699401855469,-0.5989990234375>,<8.38595581054688,0,32.
6881103515625>,<23.3131103515625,7.36125183105469,-0.5989990234375>}
triangle
{<23.3131103515625,7.36125183105469,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<20.8992462158203,10.9738616943359,-0.5989990234375>}
triangle
{<20.8992462158203,10.9738616943359,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<17.6326141357422,13.8386077880859,-0.5989990234375>}
triangle
{<17.6326141357422,13.8386077880859,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<13.7358551025391,15.7602844238281,-0.5989990234375>}
triangle
{<13.7358551025391,15.7602844238281,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<9.47450256347656,16.6079254150391,-0.5989990234375>}
triangle
{<9.47450256347656,16.6079254150391,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<5.13896179199219,16.3237609863281,-0.5989990234375>}
triangle
{<5.13896179199219,16.3237609863281,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<1.02470397949219,14.9271545410156,-0.5989990234375>}
triangle
{<1.02470397949219,14.9271545410156,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<-2.58790588378906,12.5132904052734,-0.5989990234375>}
triangle
{<-2.58790588378906,12.5132904052734,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<-5.45265197753906,9.24665832519531,-0.5989990234375>}
triangle
{<-5.45265197753906,9.24665832519531,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<-7.37432861328125,5.34989929199219,-0.5989990234375>}
triangle
{<-7.37432861328125,5.34989929199219,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<-8.22196960449219,1.08854675292969,-0.5989990234375>}
triangle
{<-8.22196960449219,1.08854675292969,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<-7.93778991699219,-3.24699401855469,-0.5989990234375>}
triangle
{<-7.93778991699219,-3.24699401855469,-0.5989990234375>,<8.38595581054688,0,
32.6881103515625>,<-6.54119873046875,-7.36125183105469,-0.5989990234375>}
triangle
{<-6.54119873046875,-7.36125183105469,-0.5989990234375>,<8.38595581054688,0,
32.6881103515625>,<-4.12733459472656,-10.9738616943359,-0.5989990234375>}
triangle
{<-4.12733459472656,-10.9738616943359,-0.5989990234375>,<8.38595581054688,0,
32.6881103515625>,<-0.860702514648438,-13.8386077880859,-0.5989990234375>}
triangle
{<-0.860702514648438,-13.8386077880859,-0.5989990234375>,<8.38595581054688,0
,32.6881103515625>,<3.03605651855469,-15.7602844238281,-0.5989990234375>}
triangle
{<3.03605651855469,-15.7602844238281,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<7.29740905761719,-16.6079254150391,-0.5989990234375>}
triangle
{<7.29740905761719,-16.6079254150391,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<11.6329498291016,-16.3237609863281,-0.5989990234375>}
triangle
{<11.6329498291016,-16.3237609863281,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<15.7472076416016,-14.9271545410156,-0.5989990234375>}
triangle
{<15.7472076416016,-14.9271545410156,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<19.3598175048828,-12.5132904052734,-0.5989990234375>}
triangle
{<19.3598175048828,-12.5132904052734,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<22.2245635986328,-9.24665832519531,-0.5989990234375>}
triangle
{<22.2245635986328,-9.24665832519531,-0.5989990234375>,<8.38595581054688,0,3
2.6881103515625>,<24.146240234375,-5.34989929199219,-0.5989990234375>}
triangle
{<24.146240234375,-5.34989929199219,-0.5989990234375>,<8.38595581054688,0,32
.6881103515625>,<24.9938812255859,-1.08854675292969,-0.5989990234375>}
texture {
        pigment { color rgb<0,0,255>}
       finish  {
            ambient 0.1
            phong 1.0
            phong_size 100.0
            reflection 0.4
         }
      }

translate <8.38595581054688,0,-0.5989990234375>
scale <1.0,1.0,1.0>
}


Post a reply to this message

From: Warp
Subject: Re: Meshes/Normals and Shading
Date: 17 Jul 2000 09:35:05
Message: <39730b89@news.povray.org>
Jason Miller <jas### [at] pinheirotcimetnet> wrote:
:         pigment { color rgb<0,0,255>}

  Color component values range (usually) from 0 to 1. The value 255 has no
special meaning in the world of povray.
  Your problem is that your color is extremely strong. Try:

  pigment { color rgb<0,0,1>}


  Also your light source is not located in an optimal location to see shading.
Try this:

light_source {   // Spotlight Spotlight001
  <-100,100,200>



-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Jason Miller
Subject: Re: Meshes/Normals and Shading
Date: 17 Jul 2000 13:18:15
Message: <39733fd7@news.povray.org>
Warp,
    Thankyou very much.  I cannot believe that I made that mistake. :)
Jason

"Warp" <war### [at] tagpovrayorg> wrote in message
news:39730b89@news.povray.org...
> Jason Miller <jas### [at] pinheirotcimetnet> wrote:
> :         pigment { color rgb<0,0,255>}
>
>   Color component values range (usually) from 0 to 1. The value 255 has no
> special meaning in the world of povray.
>   Your problem is that your color is extremely strong. Try:
>
>   pigment { color rgb<0,0,1>}
>
>
>   Also your light source is not located in an optimal location to see
shading.
> Try this:
>
> light_source {   // Spotlight Spotlight001
>   <-100,100,200>


Post a reply to this message

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