POV-Ray : Newsgroups : povray.advanced-users : Height field bug? Server Time
26 Nov 2024 13:25:55 EST (-0500)
  Height field bug? (Message 1 to 10 of 10)  
From: Sigmund Kyrre Aas
Subject: Height field bug?
Date: 28 Apr 2000 17:00:47
Message: <3909FBFE.AC2E2AC6@stud.ntnu.no>
I didn't get any response in the images group.. 

The hf with smooth set seems to be transmitting light. I'm using a pattern{} to
keep the scene all text. The same can be reproduced with a regular hf in the
official version. Is this a known bug?

sig.

---
#version unofficial MegaPov 0.4;
#declare Lys= light_source { 0, .85 
    looks_like { sphere { 0, .1 pigment { rgb 1 } finish { ambient 1 } } }
}
object { Lys translate <1,-3,1> }
object { Lys translate <-1,-3,1> }

#default {finish {ambient 0 specular .1 roughness .05 specular 1.1 diffuse .6}}
background { rgb .1 }

disc {0,y,10 pigment {rgb 1} translate -3.1*y}

camera { location  <0, 1 ,-5> look_at 0 }

#declare Pig= pigment { color rgb <.4,.2,0>}

height_field {
    pattern 100,100 {
        hf_gray_16
        cylindrical color_map { [0 rgb 0] [1 rgb 1] }
        translate 1
        scale .3
    }
    //smooth
    pigment {Pig}
    clipped_by {plane {-y,-.05}}
    scale <5,2,5>
}
height_field {
    pattern 100,100 {
        hf_gray_16
        cylindrical color_map { [0 rgb 0] [1 rgb 1] }
        translate 1
        scale .3
    }
    smooth
    pigment {Pig}
    clipped_by {plane {-y,-.05}}
    scale <5,2,5>
    translate -x*3
}
sphere {0,.15 
    pigment {rgb x} 
    translate <-1,-.2,.3>

}
sphere {0,.15 
    pigment {rgb x} 
    translate <1,-.2,.3>
}


Post a reply to this message

From: Peter Popov
Subject: Re: Height field bug?
Date: 28 Apr 2000 18:56:52
Message: <755kgss9fjb4cc4dat67s96oan4f8qul48@4ax.com>
On Fri, 28 Apr 2000 23:00:46 +0200, Sigmund Kyrre Aas
<as### [at] studntnuno> wrote:

>I didn't get any response in the images group.. 
>
>The hf with smooth set seems to be transmitting light. I'm using a pattern{} to
>keep the scene all text. The same can be reproduced with a regular hf in the
>official version. Is this a known bug?

If it were a bicubic_patch I'd call it double_illuminate trouble, but
I don't think hf's have this problem. I'm at a loss too.


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


Post a reply to this message

From: Sigmund Kyrre Aas
Subject: Re: Height field bug?
Date: 30 Apr 2000 07:11:15
Message: <390C14D3.322D8F0D@stud.ntnu.no>
Peter Popov wrote:
 
> If it were a bicubic_patch I'd call it double_illuminate trouble, but
> I don't think hf's have this problem. I'm at a loss too.

Well, it seems to have that. While setting up a bug-report scene I ran 
into another bug. It chrashes in 3.1e but not in MegaPov 0.4. Both return
"Illegal grid value in dda_traversal()" during trace. Changing the 
rotation of the height fields to something else than 90*x or changing the 
camera position fixes this.

My most recent official version is unable to run (Linux is down). Could 
someone with the latest official version confirm this bug? 

Note that the appearance of hf.gif is not relevant. Just use whatever you
have at hand.

---
#version 3.1;

// lights above plane:
light_source { <1,1,10>, .85 }
light_source { <-1,1,10>, .85 }

// the first camera statement causes the error 
// "Illegal grid value in dda_traversal()" and eventually crashes.
#declare ChrashCam =1;
#if (ChrashCam)
    camera { location  <0,0,-3> look_at 0 }
    plane {y,0 pigment {rgb 0}} 
#else
    plane { y,0.01 pigment {rgb 0}} 
    camera { location  <0.01,0.01,-3> look_at 0 }
#end

//lights below plane:
light_source { <1,-1,-10>, .85 }
light_source { <-1,-1,-10>, .85 }

background { rgb .1 }

#declare Pig= pigment { color rgb <.4,.2,0>}
#declare Rot=90*x;    // <-- changing this to 90.1*x makes it run with ChrashCam=1

// lit from behind:
height_field {  // top left
    gif "hf.gif"
    smooth              //  <-- commenting out this makes it appear black as it should
    translate -.5
    rotate Rot
    pigment {Pig}
    translate <-.6,.6,0>
}
height_field {  // top right
    gif "hf.gif"
    //smooth
    translate -.5
    rotate Rot
    pigment {Pig}
    translate <.6,.6,0>
}

// lit from front:
height_field {  // bottom left
    gif "hf.gif"
    smooth
    translate -.5
    rotate Rot
    pigment {Pig}
    translate <-.6,-.6,0>
}
height_field {  // bottom right
    gif "hf.gif"
    //smooth
    translate -.5
    rotate Rot
    pigment {Pig}
    translate <.6,-.6,0>
}


Post a reply to this message

From: Ken
Subject: Re: Height field bug?
Date: 30 Apr 2000 11:33:53
Message: <390C4F7C.2D243296@pacbell.net>
Sigmund Kyrre Aas wrote:

> Note that the appearance of hf.gif is not relevant. Just use whatever you
> have at hand.

Without us having hf.gif to work with it would be impossible for us
to recreate your problem. The dda_traversal problem is one that is
well documented and there is no real fix for it. It is covered in
the VFAQ at Warps site -

http://www.students.tut.fi/~warp/povVFAQ/miscVFAQ.html#ddatraversal


-- 
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Sigmund Kyrre Aas
Subject: Re: Height field bug?
Date: 30 Apr 2000 12:22:08
Message: <390C5DAF.CB82F32D@stud.ntnu.no>
hf.gif posted to p.b.i


Post a reply to this message

From: Chris Colefax
Subject: Re: Height field bug?
Date: 30 Apr 2000 20:30:27
Message: <390cd023@news.povray.org>
Sigmund Kyrre Aas as### [at] studntnuno> wrote:
>I didn't get any response in the images group..
>
>The hf with smooth set seems to be transmitting light. I'm using a
pattern{} to
>keep the scene all text. The same can be reproduced with a regular hf in
the
>official version. Is this a known bug?

Peter Popov <pet### [at] usanet> replied:
> If it were a bicubic_patch I'd call it double_illuminate trouble, but
> I don't think hf's have this problem. I'm at a loss too.

But aren't the smooth height field and the bicubic patch essentially the
same?  i.e. they are both internally subdivided into meshes of smooth
triangles.  This means that, in official POV at least, they both use double
illumination, which is why you get the translucent effect.


Post a reply to this message

From: Peter Popov
Subject: Re: Height field bug?
Date: 1 May 2000 15:32:22
Message: <mcmrgss7uja9ptc62r9vbqgrv6auss8od4@4ax.com>
On Mon, 1 May 2000 10:26:52 +1000, "Chris Colefax"
<chr### [at] tagpovrayorg> wrote:

>But aren't the smooth height field and the bicubic patch essentially the
>same?  i.e. they are both internally subdivided into meshes of smooth
>triangles.  This means that, in official POV at least, they both use double
>illumination, which is why you get the translucent effect.

I know, it's just that I don't recall anyone reporting double
illumination troubles with a height field. Internally the only
difference between a hf and a bicubic patch is the bounding scheme of
the hf, but afaik it's not related to illumination at all.


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


Post a reply to this message

From: Chris Colefax
Subject: Re: Height field bug?
Date: 2 May 2000 19:23:40
Message: <390f637c@news.povray.org>
I wrote:
>But aren't the smooth height field and the bicubic patch essentially the
>same?  i.e. they are both internally subdivided into meshes of smooth
>triangles.  This means that, in official POV at least, they both use double
>illumination, which is why you get the translucent effect.

to which Peter Popov <pet### [at] usanet> replied:
> I know, it's just that I don't recall anyone reporting double
> illumination troubles with a height field. Internally the only
> difference between a hf and a bicubic patch is the bounding scheme of
> the hf, but afaik it's not related to illumination at all.

A very quick test (solid colour height map, height field translated to fill
camera view, zero ambient, light source behind height field) reveals that
smooth height fields are indeed doubly illuminated.  I guess in the most
common usages of height fields this isn't ever an issue, as the camera only
sees the "top" surface of the field, lit as expected.


Post a reply to this message

From: SamuelT 
Subject: Re: Height field bug?
Date: 2 May 2000 22:56:03
Message: <390F95AF.C21F8967@aol.com>
All povray objects have to potential to double_illuminate. Just try to give a
clipped sphere a surface normal and you will find out.

Peter Popov wrote:

> On Fri, 28 Apr 2000 23:00:46 +0200, Sigmund Kyrre Aas
> <as### [at] studntnuno> wrote:
>
> >I didn't get any response in the images group..
> >
> >The hf with smooth set seems to be transmitting light. I'm using a pattern{} to
> >keep the scene all text. The same can be reproduced with a regular hf in the
> >official version. Is this a known bug?
>
> If it were a bicubic_patch I'd call it double_illuminate trouble, but
> I don't think hf's have this problem. I'm at a loss too.
>
> Peter Popov ICQ : 15002700
> Personal e-mail : pet### [at] usanet
> TAG      e-mail : pet### [at] tagpovrayorg

--
Samuel Benge

E-Mail: STB### [at] aolcom

Visit the still unfinished isosurface tutorial: http://members.aol.com/stbenge


Post a reply to this message

From: Warp
Subject: Re: Height field bug?
Date: 3 May 2000 05:42:31
Message: <390ff487@news.povray.org>
Chris Colefax <chr### [at] tagpovrayorg> wrote:
: But aren't the smooth height field and the bicubic patch essentially the
: same?

  AFAIK the heightfield routine uses a specialized algorithm while the
bpatch routine uses a more general triangle mesh algorithm. This makes
a HF faster to raytrace.
  I don't know if it affects the double-illumination thing.

-- 
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

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