POV-Ray : Newsgroups : povray.general : HF not lighting properly? Server Time
5 Aug 2024 22:20:25 EDT (-0400)
  HF not lighting properly? (Message 7 to 16 of 16)  
<<< Previous 6 Messages Goto Initial 10 Messages
From: Ron Parker
Subject: Re: HF not lighting properly?
Date: 7 Aug 2002 13:58:18
Message: <slrnal2nu1.7l5.ron.parker@fwi.com>
On Wed, 07 Aug 2002 20:03:58 +0300, Peter Popov wrote:
> On Wed,  7 Aug 2002 10:55:38 EDT, "D. Stark"
><dir### [at] GODHOWIHATESPAMlemongeckoorg> wrote:
> 
>>I also intersected the height field with a cube to "fill-in"
>>the back side (now it's not hollow).
> 
> I think this shows your problems - height fields don't always work
> with CSG because they were never meant to. I had the exact same

That's not true.  You just have to understand the insideness rules.

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

From: Warp
Subject: Re: HF not lighting properly?
Date: 7 Aug 2002 15:08:14
Message: <3d51701e@news.povray.org>
D. Stark <dir### [at] godhowihatespamlemongeckoorg> wrote:
> Would an image or two
> posted to a web server help describe what I'm seeing?

  It's possible.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Peter Popov
Subject: Re: HF not lighting properly?
Date: 7 Aug 2002 16:07:57
Message: <c6v2lu0mjq5fm64on4iekjgovvi4gbdfsa@4ax.com>
On 7 Aug 2002 13:58:18 -0400, Ron Parker <ron### [at] povrayorg>
wrote:

>> I think this shows your problems - height fields don't always work
>> with CSG because they were never meant to. I had the exact same

>That's not true.  You just have to understand the insideness rules.

I do, unless it has it has changed from "everything below goes in" or
unless I've become really stupid since I taught this very trick in the
groups.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Ron Parker
Subject: Re: HF not lighting properly?
Date: 7 Aug 2002 16:15:11
Message: <slrnal2vul.7ne.ron.parker@fwi.com>
On Wed, 07 Aug 2002 23:07:56 +0300, Peter Popov wrote:
> On 7 Aug 2002 13:58:18 -0400, Ron Parker <ron### [at] povrayorg>
> wrote:
> 
>>> I think this shows your problems - height fields don't always work
>>> with CSG because they were never meant to. I had the exact same
> 
>>That's not true.  You just have to understand the insideness rules.
> 
> I do, unless it has it has changed from "everything below goes in" or
> unless I've become really stupid since I taught this very trick in the
> groups.

I'm afraid we can't rule out the second possibility...

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

From: Peter Popov
Subject: Re: HF not lighting properly?
Date: 7 Aug 2002 17:28:43
Message: <s143luoe74ghhsirnfbt7f578b6987g27b@4ax.com>
On 7 Aug 2002 16:15:11 -0400, Ron Parker <ron### [at] povrayorg>
wrote:

>> I do, unless it has it has changed from "everything below goes in" or
>> unless I've become really stupid since I taught this very trick in the
>> groups.

>I'm afraid we can't rule out the second possibility...

That's fine with me, as long as we do something about it - can you
give me a hint about what I am doing wrong (maybe take a look at the
"Isosurface trouble" thread first)? I'll appreciate the lesson.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Charles Fusner
Subject: Re: HF not lighting properly?
Date: 8 Aug 2002 20:38:01
Message: <3D530F07.9060609@enter.net>
Tom Melly wrote:
> Odd - take out the "smooth" and everything is okay, but double_illuminate has no
> effect, wherever you place it.

Hard to say without knowing what "logo.png" looks like, but this is
probably due to having too sharp a drop off on the actual heightfield.
I designed a plateaued cliff once that had bizarre, unnatural
shading with smooth that vanished without smooth. Trouble turned out
to be that my first attempt had a near 90 degree falloff at the
plateau's edges, and...

> Hmm, is smooth a "real" effect or just an illusion (like a normal). If it's just
> an illusion, maybe the whole concept is a-about-face (like expecting a diff. of
> an object with a heavy normal to follow the contour of the normal).

... Yup, you got it. It's a trick of the normals, not a physical
displacement of the resulting mesh. Trying to use "smooth" on a
90 degree (or near 90 degree) falloff caused the anamolous
shadows. I solved my problem by running the source image thru
a smoothing filter so the edges weren't so sharp. If that doesn't
work for what you're trying to achieve, the only solution might
be learning to live without the smooth on the heightfield...
perhaps by making a higher resolution source if necessary.

 > I dunno. Looks like a bug. Anyone got a magnifying glass and
 > some sunshine? Lets kill it.

Not a bug, really. Just a mathematical limitation of normal
manipulation. Dontcha hate the immutability of mathematics?
:)

-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com
"You may sing to my cat if you like..."


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: HF not lighting properly?
Date: 8 Aug 2002 21:12:15
Message: <Xns92651FF9FCCF8raf256com@204.213.191.226>
"D. Stark" <dir### [at] GODHOWIHATESPAMlemongeckoorg> wrote in
news:web.3d5134ea37bb2ad9746942040@news.povray.org 

email entire scene to me - mailto:pov### [at] raf256com

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Charles Fusner
Subject: Re: HF not lighting properly?
Date: 8 Aug 2002 21:14:23
Message: <3D53178E.2090603@enter.net>
Peter Popov wrote:
> That's fine with me, as long as we do something about it - can you
> give me a hint about what I am doing wrong (maybe take a look at the
> "Isosurface trouble" thread first)? I'll appreciate the lesson.

Does this not give the effect you're looking for? (Excepting the
hokey, uninspired texture, of course ;) ). Or is this not working
with some heightfields source images?

intersection {
     height_field { png "plasma2.png" }
     box { <0.0001,0.0001,0.0001>,<.9999,1.001,.9999> }

     //apply overall object transforms here...

     pigment { rgb .75 }
     finish { ambient .3 }

     //or here... just so long as they don't
     //separately affect the box/hf combo}
}

A similar effect could be done with a cylindrical intersection
as long as the radius of the cylinder was slightly less than
1.000, the height slightly greater, and the center was translated
to the dead middle of the heightfield. Never understood why the
sample file "hfclip.pov" in the /scenes directory went about
this same effect the (extremely) hard way. (shrug) Seems to
work.

-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com
"You may sing to my cat if you like..."


Post a reply to this message

From: Ron Parker
Subject: Re: HF not lighting properly?
Date: 9 Aug 2002 09:13:15
Message: <slrnal7fvc.deg.ron.parker@fwi.com>
On Thu, 08 Aug 2002 21:14:54 -0400, Charles Fusner wrote:
> to the dead middle of the heightfield. Never understood why the
> sample file "hfclip.pov" in the /scenes directory went about
> this same effect the (extremely) hard way. (shrug) Seems to
> work.

That's because hfclip.pov dates from a time when heightfields were
not suitable for CSG.

-- 
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Charles Fusner
Subject: Re: HF not lighting properly?
Date: 9 Aug 2002 21:03:22
Message: <3D54667A.3030503@enter.net>
Ron Parker wrote:
> On Thu, 08 Aug 2002 21:14:54 -0400, Charles Fusner wrote:
> 
>>to the dead middle of the heightfield. Never understood why the
>>sample file "hfclip.pov" in the /scenes directory went about
>>this same effect the (extremely) hard way. (shrug) Seems to
>>work.
> 
> 
> That's because hfclip.pov dates from a time when heightfields were
> not suitable for CSG.
> 

Ah, that would explain it. It probably also explains why it uses
a quadic cylinder instead of the cylinder primitive. Must be from
Age of Legends. :)  How about that? POV-Ray comes with its own
archeology dig! ("I say! Look here, old man. What a fascinating
relic of Pre-Cylindrical Era POV. Shall we have it coding dated,
or crate it straight back to the museum?"). <g>

-- 
@C[$F];
The Silver Tome ::  http://www.silvertome.com
"You may sing to my cat if you like..."


Post a reply to this message

<<< Previous 6 Messages Goto Initial 10 Messages

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