|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I need to make a sponge. The kitchen kind, not the cool mathematical surface.
I've tried making it using an isosurface with f_noise3d. It looked almost, but
not quite, entirely unlike a sponge. The second thing I tried was making a
script to show a huge number of spheres clipped by each other and the rectangle
that contained them. That one was recognizable as a sponge, but barely. It's
going to be the main part of the picture, so I can't just use a spongy texture.
All I can think of is essentially using an actual picture of one. Any ideas?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Archpawn wrote:
> I need to make a sponge. The kitchen kind, not the cool mathematical surface.
> I've tried making it using an isosurface with f_noise3d. It looked almost, but
> not quite, entirely unlike a sponge. The second thing I tried was making a
> script to show a huge number of spheres clipped by each other and the rectangle
> that contained them. That one was recognizable as a sponge, but barely. It's
> going to be the main part of the picture, so I can't just use a spongy texture.
> All I can think of is essentially using an actual picture of one. Any ideas?
>
>
Have you tried a pigment function for your isosurface?
I'm thinking granite might look good.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Leroy <lrw### [at] joplincom> wrote:
> Archpawn wrote:
> > I need to make a sponge. The kitchen kind, not the cool mathematical surface.
> > I've tried making it using an isosurface with f_noise3d. It looked almost, but
> > not quite, entirely unlike a sponge. The second thing I tried was making a
> > script to show a huge number of spheres clipped by each other and the rectangle
> > that contained them. That one was recognizable as a sponge, but barely. It's
> > going to be the main part of the picture, so I can't just use a spongy texture.
> > All I can think of is essentially using an actual picture of one. Any ideas?
> >
> >
>
> Have you tried a pigment function for your isosurface?
> I'm thinking granite might look good.
If you are looking for a sponge-like pattern for an isosurface, you essentially
need little spheres subtracted from another shape. For the little spheres, try
the crackle pattern with "form <1,0,0>" and combine it with your main sponge
shape. You will likely need to play with the threshold value and scaling. I
haven't tried this yet, but I have used it for other things which need random
circular shapes like raindrop ripples such as in
[http://barberofcivil.deviantart.com/art/BuoyOBuoy-v2-CGSphere-49226103]
-tgq
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Archpawn wrote:
> I need to make a sponge. The kitchen kind, not the cool mathematical surface.
> I've tried making it using an isosurface with f_noise3d. It looked almost, but
> not quite, entirely unlike a sponge. The second thing I tried was making a
> script to show a huge number of spheres clipped by each other and the rectangle
> that contained them. That one was recognizable as a sponge, but barely. It's
> going to be the main part of the picture, so I can't just use a spongy texture.
> All I can think of is essentially using an actual picture of one. Any ideas?
>
>
I'm thinking that, if the isosurface looked *almost* like a sponge, it
might just be a matter of "tweaking" the texture or the function
parameters. Could you post a bit of sample code for us to play with?
--Sherry Shaw
--
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}// TenMoons
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sherry Shaw <ten### [at] aolcom> wrote:
> I'm thinking that, if the isosurface looked *almost* like a sponge, it
> might just be a matter of "tweaking" the texture or the function
> parameters. Could you post a bit of sample code for us to play with?
I said almost, but not quite, entirely *un*like a sponge. That is to say, it
looked nothing like one. I was referencing the Nutrimatic Drink Dispenser from
The Hitch Hiker's Guide to the Galaxy, which is described as producing a
substance almost, but not quite, entirely unlike tea.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Archpawn wrote:
> Sherry Shaw <ten### [at] aolcom> wrote:
>> I'm thinking that, if the isosurface looked *almost* like a sponge, it
>> might just be a matter of "tweaking" the texture or the function
>> parameters. Could you post a bit of sample code for us to play with?
>
> I said almost, but not quite, entirely *un*like a sponge. That is to say, it
> looked nothing like one. I was referencing the Nutrimatic Drink Dispenser from
> The Hitch Hiker's Guide to the Galaxy, which is described as producing a
> substance almost, but not quite, entirely unlike tea.
>
>
Ah, I see.
Might I ask whether you're going for an actual, natural sponge or a foam
rubber spongelike object? (Which would probably make the difference
between (a) an isosurface modeling a rather crinkly thingy and (b) a
block of utterly unnatural stuff with holes in it, and possibly a layer
of Brillo-like stuff attached to the bottom...)
Either one will, of course, get your dishes clean, but with a totally
different esthetic.
Bear in mind that, whichever you choose, a good granite normal will hide
a multitude of sins... ;)
--Sherry Shaw
--
#macro T(E,N)sphere{x,.4rotate z*E*60translate y*N pigment{wrinkles scale
.3}finish{ambient 1}}#end#local I=0;#while(I<5)T(I,1)T(1-I,-1)#local I=I+
1;#end camera{location-5*z}plane{z,37 pigment{granite color_map{[.7rgb 0]
[1rgb 1]}}finish{ambient 2}}// TenMoons
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sherry Shaw <ten### [at] aolcom> wrote:
> ...
> Might I ask whether you're going for an actual, natural sponge or a foam
> rubber spongelike object? (Which would probably make the difference
> between (a) an isosurface modeling a rather crinkly thingy and (b) a
> block of utterly unnatural stuff with holes in it, and possibly a layer
> of Brillo-like stuff attached to the bottom...)
> ...
> Bear in mind that, whichever you choose, a good granite normal will hide
> a multitude of sins... ;)
> ...
I'm going for b. the unnatural stuff. I'm modeling it somewhat after the sponge
at
http://www.nortonprocleaning.com/Media/Documents/S0000000000000001051/Sponge%20Pads%20-%20Cellulose%20Sponge.jpg
I tried using a granite normal. It doesn't seem to work. What I'm considering
doing is using an isosurface for the bigger holes, and surface normals (or
another isosurface, if possible) for the smaller ones. The problem is, I can't
find a pattern that works. I might be able to make a function to do it, but it
wont seem to let me use rand() in them. Specifically, I'd use
rand(seed(floor(x)), or something to that extent.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Archpawn nous apporta ses lumieres en ce 2007/12/22 16:19:
> Sherry Shaw <ten### [at] aolcom> wrote:
>> ...
>> Might I ask whether you're going for an actual, natural sponge or a foam
>> rubber spongelike object? (Which would probably make the difference
>> between (a) an isosurface modeling a rather crinkly thingy and (b) a
>> block of utterly unnatural stuff with holes in it, and possibly a layer
>> of Brillo-like stuff attached to the bottom...)
>> ...
>> Bear in mind that, whichever you choose, a good granite normal will hide
>> a multitude of sins... ;)
>> ...
> I'm going for b. the unnatural stuff. I'm modeling it somewhat after the sponge
> at
>
http://www.nortonprocleaning.com/Media/Documents/S0000000000000001051/Sponge%20Pads%20-%20Cellulose%20Sponge.jpg
> I tried using a granite normal. It doesn't seem to work. What I'm considering
> doing is using an isosurface for the bigger holes, and surface normals (or
> another isosurface, if possible) for the smaller ones. The problem is, I can't
> find a pattern that works. I might be able to make a function to do it, but it
> wont seem to let me use rand() in them. Specifically, I'd use
> rand(seed(floor(x)), or something to that extent.
>
>
You could also try to use a pattern with holes in it. It could be s granite
pattern scaled small with a color_map that have some transparency.
pigment{granite scale 0.02 color_map{[0.03 rgbt 1][0.03 rgb 1]}}
If you use surface normals, you need to scale it small relative to your holes
and give it a strong value.
normal granite 3 scale 0.01
--
Alain
-------------------------------------------------
Disc space -- the final frontier!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Archpawn" <nomail@nomail> wrote in message
news:web.476d7f72d68f7f9f9c37dbc40@news.povray.org...
> Sherry Shaw <ten### [at] aolcom> wrote:
>> ...
>> Might I ask whether you're going for an actual, natural sponge or a foam
>> rubber spongelike object? (Which would probably make the difference
>> between (a) an isosurface modeling a rather crinkly thingy and (b) a
>> block of utterly unnatural stuff with holes in it, and possibly a layer
>> of Brillo-like stuff attached to the bottom...)
>> ...
>> Bear in mind that, whichever you choose, a good granite normal will hide
>> a multitude of sins... ;)
>> ...
> I'm going for b. the unnatural stuff. I'm modeling it somewhat after the
> sponge
> at
>
http://www.nortonprocleaning.com/Media/Documents/S0000000000000001051/Sponge%20Pads%20-%20Cellulose%20Sponge.jpg
> I tried using a granite normal. It doesn't seem to work. What I'm
> considering
> doing is using an isosurface for the bigger holes, and surface normals (or
> another isosurface, if possible) for the smaller ones. The problem is, I
> can't
> find a pattern that works. I might be able to make a function to do it,
> but it
> wont seem to let me use rand() in them. Specifically, I'd use
> rand(seed(floor(x)), or something to that extent.
>
Hi Arch.,
I think you'll find it difficult to achieve this with a single isosurface.
You can combine isosurfaces, but you end up with little holes in the
surfaces of your larger holes, whereas the photo you linked to seems to have
relatively cleanly formed larger holes.
To get around that, the following example uses a rounded crackle function to
create an isosurface with large round holes (as suggested by Trevor), then
it cuts thin layers of smaller holes out of the surface. The hole cutting
objects (SpongePress2 and SpongePress3) are kept thin by slicing a slightly
scaled down version of the object out of them so that the smaller holes
don't penetrate too deeply into the sponge surface. This leaves the larger
holes looking fairly clean.
This renders reasonably quickly on my machine (a couple of minutes on a dual
2GHz machine).
Unfortunately, most of the crackly surface effect is attributable to errors
due to the small scale, with bits of the isosurface missing. Scaling up
produces a less broken (and IMO less convincing) effect and increases render
times horendously. Maybe someone who's good at isosurfaces could improve on
this.
I've also been playing with a macro to distribute different sized holes
across a surface (using CSG and rand() rather than isosurfaces). Some
results are looking ok, but I've also got some pretty bad render times with
that. The main advantage is that it can do different shapes (virtually any
shape you want) and you get a finer control over the proportion of
differently sized holes. I'll let you know if that throws up anything good.
Regards,
Chris B.
camera {location <-0.28, 0.44, -0.58> look_at <0.1,0.15,0> angle 40}
light_source {<-5,0.1,-4> color rgb 1}
light_source {<0.4,1,0> color rgb 0.5}
light_source {<0.5,1,0.1> color rgb 0.5}
light_source {<0,1,-0.005> color rgb 1}
#declare F=function{pigment{
crackle
form <1.5,0,0>
turbulence 0
color_map { [0 rgb 1] [0.9 rgb 0] [1 rgb 0] }
scale 0.035
scale 1+x*0.2
}
}
#declare F1=function{pigment{
crackle
form <1.5,0,0>
turbulence 0
color_map { [0 rgb 1] [0.4 rgb 1] [1 rgb 0] }
scale 0.006
scale 1+x*0.2
}
}
#declare F2=function{pigment{
granite
turbulence 0.2
color_map { [0 rgb 1] [0.2 rgb 1] [1 rgb 0] }
scale 0.01
}
}
#declare Transparency = 0;
#declare PrePressedSponge = isosurface {
function { F(x,y,z).red - 0.6}
threshold 0.01
max_gradient 50
max_trace 10
contained_by{box{0,<0.37,0.1,0.2>}}
}
#declare SpongePress2 = difference {
isosurface {
function { 0.5 - F1(x,y,z).red}
threshold 0.1
max_gradient 500
max_trace 10
contained_by{box{-0.001,<0.37,0.1,0.2>*1.001}}
}
box {0.003,<0.367,0.097,0.197>}
}
#declare SpongePress3 = difference {
isosurface {
function { F2(x,y,z).red - 0.6}
threshold 0.01
max_gradient 1800
max_trace 10
contained_by{box{-0.001,<0.37,0.1,0.2>*1.001}}
}
box {0.001,<0.369,0.099,0.199>}
}
#declare Sponge = difference {
object {PrePressedSponge}
object {SpongePress3}
}
difference {
object {PrePressedSponge}
object {SpongePress2}
object {SpongePress3}
texture {
pigment {
bozo
turbulence 0.5
omega 1
color_map {
[0 rgbt <169,115,051,255*Transparency>/255]
[0.1 rgbt <174,117,053,255*Transparency>/255]
[0.2 rgbt <179,123,056,255*Transparency>/255]
[0.3 rgbt <200,145,071,255*Transparency>/255]
[0.4 rgbt <218,173,104,255*Transparency>/255]
[0.5 rgbt <232,201,139,255*Transparency>/255]
[0.6 rgbt <246,221,157,255*Transparency>/255]
[0.7 rgbt <246,223,166,255*Transparency>/255]
[0.8 rgbt <199,149,078,255*Transparency>/255]
[0.9 rgbt <186,132,059,255*Transparency>/255]
[1 rgbt <174,128,067,255*Transparency>/255]
}
scale 0.006
}
finish {ambient 0.3}
}
}
plane {y,0 pigment {rgb 0.4}}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Chris B nous apporta ses lumieres en ce 2007/12/23 05:35:
>
> I've also been playing with a macro to distribute different sized holes
> across a surface (using CSG and rand() rather than isosurfaces). Some
> results are looking ok, but I've also got some pretty bad render times with
> that. The main advantage is that it can do different shapes (virtually any
> shape you want) and you get a finer control over the proportion of
> differently sized holes. I'll let you know if that throws up anything good.
>
> Regards,
> Chris B.
>
>
Using differences? You are experiencing the problem from multiple overlaping
bounding boxes. Try bundling your small bits in a blob that you difference from
the main object. It's usualy much faster, but you are limited to spheres and
round capped cylinders.
diference{
object{Your_Main_Object [Object_modifiers]}
blob{treshold 0.02
Your_Macro}
}
--
Alain
-------------------------------------------------
Hard work pays off in the future. Laziness pays off now.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|