POV-Ray : Newsgroups : povray.advanced-users : tiles etc..... Server Time
26 Nov 2024 13:34:29 EST (-0500)
  tiles etc..... (Message 1 to 3 of 3)  
From: Paul Jones
Subject: tiles etc.....
Date: 24 Mar 2000 08:40:13
Message: <38DB703D.AAD57708@psu.edu>
Hi.

I am having a little problem that i hope you all could help me with.

I am trying to make a tiled floor with cracked or partially dissolved
tiles. I have set up a nested #while loop which takes care of placing
each tile based on the dimensions supplied by the user. The tiles are
superellipsoids. Now here comes the problem... to eat away from the
tiles I can either difference each tile with a height-field (inside the
#while loop), or difference the whole, completed floor (all tiles are
unioned) with one huge height-field. The problem is the parsing time,
using the former approach, parsing times of 2-4 hours are not uncommon,
the latter parses much quicker, but I have less control (and to a
certain extent, quality). I want to stay away from normal modifiers
because I want a true 3-D decayed floor. Any suggestions?


-Paul


Post a reply to this message

From: Chris Huff
Subject: Re: tiles etc.....
Date: 24 Mar 2000 11:52:36
Message: <chrishuff_99-7732BC.11544624032000@news.povray.org>
In article <38DB703D.AAD57708@psu.edu>, Paul Jones <pdj### [at] psuedu> 
wrote:

> I am trying to make a tiled floor with cracked or partially dissolved
> tiles. I have set up a nested #while loop which takes care of placing
> each tile based on the dimensions supplied by the user. The tiles are
> superellipsoids. Now here comes the problem... to eat away from the
> tiles I can either difference each tile with a height-field (inside the
> #while loop), or difference the whole, completed floor (all tiles are
> unioned) with one huge height-field. The problem is the parsing time,
> using the former approach, parsing times of 2-4 hours are not uncommon,
> the latter parses much quicker, but I have less control (and to a
> certain extent, quality). I want to stay away from normal modifiers
> because I want a true 3-D decayed floor. Any suggestions?

You could use isosurfaces. Even if you only use them for individual 
tiles, you can get a speed improvement(isosurface superellipsoids are 
often faster than the superellipsoid primitive). You could also make a 
bunch of tiles out of one isosurface, if you design the function 
properly. Something like this will work for that:
isosurface {
    function {abs(sin(x*pi))*abs(sin(z*pi))*abs(y)}
    threshold 0.05
    sign -1
    eval
    accuracy 0.01
    contained_by {box {<-2,-1,-2>, < 2, 0, 2>}}
    texture {
        pigment {color rgb < 0.8, 0.5, 1>}
        finish {brilliance 3}
    }
    scale < 1, 0.2, 1>
}

This parses and renders fast, and you can use difference or intersection 
to get cracks and gaps. You can also use pigments to modify the surface, 
slower rendering but potentially great results:

#declare CrackFn = function {
    pigment {crackle ramp_wave
        color_map {[0 color rgb <0,0,0>][1 color rgb <1,1,1>]}
        turbulence 0.1
    }
}

isosurface {
    function {(1-abs(sin(x*pi))*abs(sin(z*pi))*abs(y))*1.05
        &(1-CrackFn(x,y/5,z))*1.1
    }
    threshold 1
    eval
    accuracy 0.01
    contained_by {box {<-2,-1,-2>, < 2, 0, 2>}}
    texture {
        pigment {color rgb < 0.8, 0.5, 1>}
        finish {brilliance 3}
    }
    scale < 1, 0.2, 1>
}

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Warp
Subject: Re: tiles etc.....
Date: 24 Mar 2000 11:54:24
Message: <38db9dbf@news.povray.org>
Using a proper normal modifier can give a very good result with a lot
faster parse/render time. Unless you want to look to the floor very closely.

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