|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi tracers!
After doing some other things for a while, I returned to my great
POVghanistan project, beginning to play around with Mark-Hendrik
Bremer's suggestions for mud brick wall isosurfaces...
But when I tried to use conventional CSG to cut a door and windows in
the main building block (the subtracted objects being isosurfaces
themselves), I got those strange results you see in the first picture.
Obviously, the rounded_box part of the house's back wall has
disappeared, while the irregular_bricks part still remains... bizarre!
Then I tried simulated CSG within the isosurface function:
isosurface
{
function { max(f_rounded_box( x, y-YDispl(x,y,z), z, 0.05, 5, 1.5,
2.5)-Brick_Fun_New(x, y/3, z)*0.3,
-f_rounded_box( x, y-YDispl(x,y,z), z+2.35, 0.05, 0.5, 1,
0.25)-Brick_Fun_New(x, y/3, z+2.35)*0.3) }
contained_by { box {-50, 50} }
max_gradient 5
translate <0, 1.4, 0>
texture { Afghan_Classic_Mud }
}
but then now subtractions at all show up (2nd image; for convenience, I
left out the inner hollow of the building and just tried to cut a door
from the front side). The main body is 10 by 3 by 5 meters, the door
subtraction body is 1 by 2 by 0.5 meters and
translated -2.35 meters along the z axis. I asked myself how to
implement that "+2.35" when using a multi-partite function like in this
example... only in the rounded_box part or also in the YDispl and
Brick_Fun_New parts?
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download 'khana_csg_problem2.jpg' (14 KB)
Download 'khana_csg_problem.jpg' (14 KB)
Preview of image 'khana_csg_problem2.jpg'
Preview of image 'khana_csg_problem.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wasn't it J?rg 'Yadgar' Bleimann who wrote:
>Hi tracers!
>
>After doing some other things for a while, I returned to my great
>POVghanistan project, beginning to play around with Mark-Hendrik
>Bremer's suggestions for mud brick wall isosurfaces...
>
>But when I tried to use conventional CSG to cut a door and windows in
>the main building block (the subtracted objects being isosurfaces
>themselves), I got those strange results you see in the first picture.
>Obviously, the rounded_box part of the house's back wall has
>disappeared, while the irregular_bricks part still remains... bizarre!
It sounds like you've not read the bit about max_trace in the docs:
Isosurfaces can be used in CSG shapes since they are solid finite
objects - if not finite by themselves, they are through the cross
section with the container.
By default POV-Ray searches only for the first surface which the ray
intersects. But when using an isosurface in CSG operations, the other
surfaces must also be found. Therefore, the keyword max_trace must be
added to the isosurface statement. It must be followed by an integer
value. To check for all surfaces, use the keyword all_intersections
instead.
With all_intersections POV-Ray keeps looking until all surfaces are
found. With a max_trace it only checks until that number is reached.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
| |
| |
|
|
From: Marc-Hendrik Bremer
Subject: Re: Isosurfaces CSG problems (2 x JPG 400x300, 14+14 KB)
Date: 2 Dec 2002 12:58:24
Message: <3deb9f40@news.povray.org>
|
|
|
| |
| |
|
|
news:3DE89EA8.8809C9DF@tiscalinet.de...
> Then I tried simulated CSG within the isosurface function:
>
> isosurface
> {
> function { max(f_rounded_box( x, y-YDispl(x,y,z), z, 0.05, 5, 1.5,
> 2.5)-Brick_Fun_New(x, y/3, z)*0.3,
> -f_rounded_box( x, y-YDispl(x,y,z), z+2.35, 0.05, 0.5, 1,
> 0.25)-Brick_Fun_New(x, y/3, z+2.35)*0.3) }
>
> contained_by { box {-50, 50} }
> max_gradient 5
> translate <0, 1.4, 0>
> texture { Afghan_Classic_Mud }
> }
>
> but then now subtractions at all show up (2nd image; for convenience, I
> left out the inner hollow of the building and just tried to cut a door
> from the front side). The main body is 10 by 3 by 5 meters, the door
> subtraction body is 1 by 2 by 0.5 meters and
> translated -2.35 meters along the z axis. I asked myself how to
> implement that "+2.35" when using a multi-partite function like in this
> example... only in the rounded_box part or also in the YDispl and
> Brick_Fun_New parts?
>
Hi!
If you want to use "normal" CSG, you have to use a higher max_trace as
allready suggested. If you want to construct the whole thing in one
Isosurface (which is the better soultion in my opinion), the easiest way is
to use Cristhoph Hormanns Iso-CSG-Library. Never used it myself, though.
If you would like to go the whole way by yourself (as I would do :-)), you
could try this (untested):
#declare shape_fun= function {max(f_rounded_box( x, y, z, 0.05, 5, 1.5,
2.5),
-f_rounded_box( x, y, z+2.35, 0.05, 0.5, 1, 0.25))}
isosurface
{
function { shape_fun(x, y-YDispl(x,y,z),z)-Brick_Fun_New(x, y/3, z)*0.3 }
contained_by { box {<-6,-1.6,-3>,<6,1.6,3>}
max_gradient 5
translate <0, 1.4, 0>
texture { Afghan_Classic_Mud }
}
Your container-box was much to large (if your dimensions are 1 meter= 1
Pov-Unit) this way you are wasting time (as the function has to be calculate
more often) and you have to use higher max_gradient values. Might be not
that important in this stage of your project but will be later on.
What did I do? First I calculated the shape of the house in the
extra-function "shape_fun". The resulting shape get's displaced by YDispl
and Brick_Fun_New. This way your doorway will get displaced, too and you
don't have to worry about straigth walls there (as you would have to if you
would use conventional CSG).
Regards,
Marc-Hendrik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
High!
Marc-Hendrik Bremer schrieb:
Your container-box was much to large (if your dimensions are 1 meter= 1
Pov-Unit) this way you are wasting time (as the function has to be calculate
more often) and you have to use higher max_gradient values. Might be not
that important in this stage of your project but will be later on.
I tried a tighter container box - but then strange coincident surfaces-like
effects showed up (first image) or the window
opening was almost completely filled (second image). I also played with
max_gradient and used 20 instead of 5, but nothing
changed...
See you in Khyberspace - http://home.arcor.de/yadgar/khyberspace/index-e.html
Afghanistan Chronicle: http://home.arcor.de/yadgar/index-e.htm
Yadgar
Now playing: 3-D (Extrabreit) - how appropriate! ;-)
Post a reply to this message
Attachments:
Download 'khana0005.jpg' (33 KB)
Download 'khana0006.jpg' (5 KB)
Preview of image 'khana0005.jpg'
Preview of image 'khana0006.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
High!
Mike Williams schrieb:
With all_intersections POV-Ray keeps looking until all surfaces are
found. With a max_trace it only checks until that number is reached.
I tried max_trace 3, max_trace 5 and even all_intersections, and below you
see what I got...
Obviously, the rounded_box part of the isosurface for the window holes has
been cut correctly from the wall, but the
irregular_bricks part remained and formed a kind of lattice...
Then I tried a view from inside the building through the western window,
this time not with an isosurface, but with a simple
box subtracted from the wall - the second image shows the result, so there
must be something wrong rather with the main
building block than with the window.
Read also my reply to Marc-Hendrik Bremer!
See you in Khyberspace -
http://home.arcor.de/yadgar/khyberspace/index-e.html
Afghanistan Chronicle: http://home.arcor.de/yadgar/index-e.htm
Yadgar
Post a reply to this message
Attachments:
Download 'khana0003.jpg' (16 KB)
Download 'khana0004.jpg' (24 KB)
Preview of image 'khana0003.jpg'
Preview of image 'khana0004.jpg'
|
|
| |
| |
|
|
From: Marc-Hendrik Bremer
Subject: Re: Isosurfaces CSG problems (2 x JPG 400x300, 33+5 KB)
Date: 3 Dec 2002 13:45:25
Message: <3decfbc5@news.povray.org>
|
|
|
| |
| |
|
|
news:3DECE053.9F189988@tiscalinet.de...
> High!
>
> Marc-Hendrik Bremer schrieb:
>
> Your container-box was much to large (if your dimensions are 1 meter= 1
> Pov-Unit) this way you are wasting time (as the function has to be
calculate
> more often) and you have to use higher max_gradient values. Might be not
> that important in this stage of your project but will be later on.
>
> I tried a tighter container box - but then strange coincident
surfaces-like
> effects showed up (first image) or the window
> opening was almost completely filled (second image). I also played with
> max_gradient and used 20 instead of 5, but nothing
> changed...
Well ... I think these are the correct results :-) By using the larger
container you increased the max_gradient (probabbly a lot) needed for a
correct result. What you get by your first try is an incorrect result.
I _think_ (still untested) that you will get correct results by increasing
the "+2.35" in the rounded_box (the door). Perhaps you will have to increase
z-dimension of the box, too.
What happens? Your building is bigger than you think. By subtracting the
Brick_Fun_New you move most of the surface further "out". This way, the
rounded_box doesn't cut through the whole thing. As your max_gradient is set
too low to represent the resulting function, you get that semi-transparent
look.
Sorry, for that incorrect code snipped, I was in a hurry :-)
Hope this will work,
Marc-Hendrik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|