POV-Ray : Newsgroups : povray.newusers : Difference isn't working for me : Re: Difference isn't working for me Server Time
29 Jul 2024 10:29:54 EDT (-0400)
  Re: Difference isn't working for me  
From: Merrin Cullen
Date: 20 Feb 2006 12:15:42
Message: <43f9f93e@news.povray.org>
Prodan,

Actually, difference is working just fine. Here are some problems you are
wrestling with.

1. The light is not in a position to light up the holes you are creating.
Move one of your lights to the same position as your camera & you will be
able to see the holes you are creating.
2. When in the process of developing an object, I frequently temporarily
change the color of the hole to one that contrasts with the objects color.
This helps me to see the the effects of the CSG operation.
3. When using CSG to create a hole, the shape used to create the hole must
extend past the surface of the original object. If the shape does not extend
past the surface of the original object, you have only created a hole inside
the original object that can not be seen unless it is exposed by other
holes.
4. Avoid coincident surfaces. For instance the shape box { <0, 0, 0>, <6,
53, 36> }and the shape box { <0, 0, 34>, <6, 51, 36> }both share common
sides on every side except in the +y  and +z directions. POV Ray will become
confused when mulitple shapes share a surface, this becomes more apparent
when the shapes have different pigments or textures. How to avoid coincicent
surfaces? Make sure one shape is slightly smaller or larger thatn the other
shape. (See #1 above)
5. Your camera is not in the best position to see many of the holes you are
trying to create.

I have attached a rendering of your image with the one of the lights
relocated to your camera position. Notice taht you can now see that some
material has been removed by your difference CSG. You can also see speckled
artifacts on some interior surfaces. These are caused by the coincidence
surfaces.

These are the same types of issues I faced when I first started with POV
Ray. Welcome to the learning curve!

Tim


Post a reply to this message


Attachments:
Download 'diff_test.jpg' (13 KB)

Preview of image 'diff_test.jpg'
diff_test.jpg


 

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