POV-Ray : Newsgroups : povray.general : shading model Server Time
7 Nov 2024 13:41:33 EST (-0500)
  shading model (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: John Bradshaw
Subject: shading model
Date: 19 Feb 2002 00:45:27
Message: <3c71e677$1@news.povray.org>
Is there a way to modify the povray shading model without digging into the
source code (which I don't have for 3.5 anyway)?

I want to modify amount of lighting based on the angle between the camera
incidence ray and the normal vector of points in the mesh. My goal is to
create a scanning electron microscope look: bright edges (where the angle
between viewing ray and normal vector is larger) and a duller center (where
the angle is smaller).

I have tried using scattering media and backlighting the image, which works
well for simple objects (spheres), but breaks down when I try it on more
complex geometry. I have also checked out the documents for imformation
about trace(), which looked like it would work, but I never got it to work
for me.

Any ideas?

John


Post a reply to this message

From: John Bradshaw
Subject: Re: shading model
Date: 19 Feb 2002 00:53:45
Message: <3c71e869$1@news.povray.org>
I have put an image of my scattering media attempt. It had the look I
wanted, but only because I did it on a sphere.


Post a reply to this message

From: Christopher James Huff
Subject: Re: shading model
Date: 19 Feb 2002 01:44:09
Message: <chrishuff-4FAD0A.01435419022002@netplex.aussie.org>
In article <3c71e677$1@news.povray.org>,
 "John Bradshaw" <joh### [at] nospamhotmailcom> wrote:

> Is there a way to modify the povray shading model without digging into the
> source code (which I don't have for 3.5 anyway)?

Not really. You could possibly do it with functions: make separate red, 
green, and blue functions, and use them as patterns for pigments in an 
average pigment:
pigment {average
    pigment_map {
        [1 redFn color_map {[0 rgb 0][1 red 3]}]
        [1 greenFn color_map {[0 rgb 0][1 green 3]}]
        [1 blueFn color_map {[0 rgb 0][1 blue 3]}]
    }
}
Use a finish with diffuse 0 and ambient 1, and do all your calculations 
in those functions...very awkward for complex stuff though, especially 
since you only have the intersection point available, you have to figure 
out the other information yourself.


> I want to modify amount of lighting based on the angle between the camera
> incidence ray and the normal vector of points in the mesh. My goal is to
> create a scanning electron microscope look: bright edges (where the angle
> between viewing ray and normal vector is larger) and a duller center (where
> the angle is smaller).

Put a light with negative intensity at the camera position, and give a 
bright ambient to the texture. You might need to mess around with the 
brilliance to fine-tune it.

#declare CamPos = < 0, 0,-5>;

camera {
    location CamPos
}

light_source {CamPos, color rgb -0.9}

sphere {< 0, 0, 0>, 1
    texture {
        pigment {color rgb 1}
        finish {ambient 1 brilliance 2}
    }
}

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Kari Kivisalo
Subject: Re: shading model
Date: 19 Feb 2002 01:59:30
Message: <3C71F81B.A88E331D@engineer.com>
John Bradshaw wrote:
>
> I want to modify amount of lighting based on the angle between the camera
> incidence ray and the normal vector of points in the mesh. My goal is to
> create a scanning electron microscope look: bright edges (where the angle
> between viewing ray and normal vector is larger) and a duller center (where
> the angle is smaller).


http://www.pp.htv.fi/kkivisal/em.jpg

 pigment {
    slope {cam_lookat-cam_location,0,0.5}
    color_map{
      [0 rgb 0]
      [0.5 rgb 0.3]
      [1 rgb 1]
    }
  }

_____________
Kari Kivisalo


Post a reply to this message

From: Greg M  Johnson
Subject: Re: shading model
Date: 19 Feb 2002 08:21:44
Message: <3c725168$1@news.povray.org>
My HDD at work is full of about a Gb of SEM images. I've often wanted to
make such a texture.  Ever seen SEM's of solder paste?


Post a reply to this message

From: Ken
Subject: Re: shading model
Date: 19 Feb 2002 08:33:00
Message: <3C725402.EC4959F0@pacbell.net>
"Greg M. Johnson" wrote:
> 
> Ever seen SEM's of solder paste?

Yep. Have no idea how to model it though. Hmmm... maybe the old Suds
utility along with an isosurface...

-- 
Ken Tyler


Post a reply to this message

From: John Bradshaw
Subject: Re: shading model
Date: 19 Feb 2002 10:23:24
Message: <3c726dec$1@news.povray.org>
> http://www.pp.htv.fi/kkivisal/em.jpg
>
>  pigment {
>     slope {cam_lookat-cam_location,0,0.5}
>     color_map{
>       [0 rgb 0]
>       [0.5 rgb 0.3]
>       [1 rgb 1]
>     }
>   }
>

Slope was a great idea, thanks Kari. I tweaked it a bit and came up with a
look that I really like. I'll post an image in bin.images.

John


Post a reply to this message

From: Slime
Subject: Re: shading model
Date: 19 Feb 2002 11:03:19
Message: <3c727747$1@news.povray.org>
Use a negative brilliance.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From: Greg M  Johnson
Subject: Re: shading model
Date: 19 Feb 2002 11:50:23
Message: <3c72824f$1@news.povray.org>
This image has a few problems.

The neck under the teapot lid handle and the rim around the bottom of the
pot & cup are exactly wrong: these areas should be darker, as it would be
harder for a secondary electron emitted from these kinds of surfaces to make
it back to the detector.

The top rim of the teacup should be bright instead of dark.

An SEM has a detector sitting of to the side. This gives secondary electrons
emitted from surfaces facing the detector a greater chance of being detected
than those from surfaces facing the other way, almost as if there were a
light source over there.

Or so says my SEM mentor........

So perhaps a fix is either a combination of slope pigs OR a single
light_source off to the side.


Post a reply to this message

From: Jan Walzer
Subject: Re: shading model
Date: 19 Feb 2002 14:31:18
Message: <3c72a806@news.povray.org>
I tried this a way ago, too ...

What I did, was to create the object as an isosurface ...

one complete black object with threshold 0
and anotherone with threshold 0.01 and emitting media

what I neded to do was also to increase the accuracy of iso and
a lot of time ...

You may look want to look at
http://news.povray.org/3b9d44fb%40news.povray.org

The thing is, that the iso gives you more flexibility for design...


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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