Heightfields don't match

Heightfields don't match

Post by Jürgen Hochwal » Mon, 28 Jul 2003 20:38:52



Hi

I plan a raytracing with a big heightfield. To reduce the memory usage and
parsing time I split the HF(image) into small pieces and generate some
small FH. Then I switch that HF on and off, which are currently needed
(visible).
The problem is, that the HF doesn't match at the connections. The uses image
is a 5000x5000 gif which I've splitted into parts of 1000x1000. The palette
is for all images the same.

Why does the HF not match, what can I do to supress the edges ?

---------------------------------

#include "shapes.inc"
#include "colors.inc"
#include "textures.inc"

#declare M31=height_field {
  gif "M31.gif"
  smooth
  pigment { White }
  translate <-.5, 0, -.5>

Quote:}

#declare M32=height_field {
  gif "M32.gif"
  smooth
  pigment { White }
  translate <-.5, 0, -.5>

Quote:}

#declare HF_Mat = union {
  object { M31 }
  object { M32 translate <0,0,1> }
  pigment { White }
  scale <20,-2,20>

Quote:}

object { HF_Mat }

#declare OverviewCam = camera {
  location <0,0,-15>
  direction <0.0, 0.0, 5.0>
  up <0.0, 1.0, 0.0>
  right <4/3, 0.0, 0.0>
  look_at <0.0, 0.0, 0.0>

  rotate <0,90,0>
  rotate <0,0,-10>
  translate <7,1,10>

Quote:}

camera { OverviewCam }

light_source {
  <1000.0, 1000.0, -5000.0>
  colour rgb <1.0, 1.0, 1.0>

Quote:}

-----------------------------------

An image ...
http://cfjh.no-ip.info/div/test.jpg    

--
Jrgen
www.cfjh.de

 
 
 

Heightfields don't match

Post by Warp » Mon, 28 Jul 2003 21:15:39



> Why does the HF not match, what can I do to supress the edges ?

  Firstly, the split HF parts should share their borders. That is,
for example the right border of one HF part should have the same pixels
as the left border of the HF part at its right.
  In other words, the split HF images should overlap by one pixel.

  Seconly, when calculating the normal vectors for the triangle vertices
(which is what 'smooth' does), POV-Ray can't know how the heightfield
should "continue" after the edge and thus creates just a heuristically
calculated normal vector for the edges of the HF.
  For example, if the larger heightfield raises abruptly at the other side
of the edge, POV-Ray can't know this and thus can't calculate the proper
normal vector.
  There's no easy solution to this, but it probably is often so unnoticeable
that it doesn't matter too much, although it may pose a problem sometimes.

--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -

 
 
 

1. Colors don't match! (Mac)

Mac color stylewriter 2500.
When I print something like a Web page, or a photograph, it prints
perfectly.  But when I print from an original drawing in MacDraw Pro or
ClarisWors, many of the colors are *way* off.  Any ideas?

Thanks.
Michael K.

2. Kai' Power Tools 2.0 --> 2.1

3. Help! - Colors don't match

4. How can I drive 2 graphic cards with OpenGL

5. Shadow maps don't match up to the objects

6. Medical Imaging

7. PageMaker 7.0 Colors Don't Match When PDFing

8. Looking for tutorials on 'painting' heightfields

9. Spherical heightfield tool for 15 bit heightfields?

10. 'closest match' colours

11. Why don't these Materials' colors match?