POV-Ray : Newsgroups : povray.general : Trouble with coincident surface in a CSG merge : Re: Trouble with coincident surface in a CSG merge Server Time
29 Jul 2024 04:18:38 EDT (-0400)
  Re: Trouble with coincident surface in a CSG merge  
From: Sohcahtoa
Date: 4 Mar 2013 19:45:02
Message: <web.51353f096a8d59d38a3f983e0@news.povray.org>
"Sohcahtoa" <kil### [at] yahoocom> wrote:
> I'm currently working on a program that converts a Minecraft world into a
> POV-Ray scene, and I'm having real trouble with water.
>
> To make water blocks act like a solid object so that I don't see the sides of
> each block, I take all the water blocks in the world and put them into a CSG
> merge object, which in theory should make them solid.  Unfortunately, it isn't
> working out that way.
>
> If each block in the merge is exactly 1 unit wide, then I get lots of odd pixels
> where the water meets the land underwater.  This is understandable, since the
> water block edge is coincident with the land block.  So as a work-around, I
> tried making each water block slightly large (1.02 blocks wide), but this
> creates odd seams at the surface of the water.
>
> Example renders are at http://imgur.com/a/rCDCG
>
> A couple notes about my scene:
> - Vertical runs of the same block type are saved as a single tall box object to
> reduce the number of objects in the scene.
> - The hole in the world is from an optimization that stops looking for blocks
> below a certain y-coordinate, again, to reduce objects.
>
> Any ideas how to fix the coincident surface problem where the water meets land
> without create a coincident surface problem at the surface of the water without
> manually creating a mesh?

I created a work-around by translating every other box by 0.00001*y in a
checkerboard-like fashion.  The result can be seen at
http://i.imgur.com/NnOFZHh.jpg

While it seems to have worked (I can't see the vertical edges that get created),
its not a solution I'm happy with.  If the camera is in just the right spot in
the right resolution, it could create ugly edges.


Post a reply to this message

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