POV-Ray : Newsgroups : povray.newusers : 1. photorealistic play-doh 2. round off at csg edges Server Time
27 Dec 2024 00:04:23 EST (-0500)
  1. photorealistic play-doh 2. round off at csg edges (Message 1 to 3 of 3)  
From: Toon
Subject: 1. photorealistic play-doh 2. round off at csg edges
Date: 24 Oct 2006 09:00:01
Message: <web.453e0e3fc2ea32ac109a9bf40@news.povray.org>
I'm a complete POVray newbie and I'd like some tips on the following:

I'm trying to render a photorealistic image of play-doh objects. So far,
I've had no luck in making a convincing picture. Can someone help me with:
1. Tips on texture/finish/lighting to create a photorealistic look of the
clay. ( See for example
http://www.hasbro.com/playdoh/default.cfm?page=freshideas&lvl=Intermediate&object=Car
)
2. How can I create rounded edges that look like two clay objects have been
pushed together? For example when I union two overlapping spheres, the edge
between the spheres is very sharp. I would like to round off these edges.
Not outwards like in a blob, but inwards (see the example). The objects I
would like to give a "play-doh look" are imported from another program and
consist of many csg's, so I think it will be difficult to manually adapt
all objects. I am kinda looking for a simple trick that adds an artificial
shadow or something to everywhere where there is an edge of two csg's in
the union and is not too rendering time expensive.
3. Some general tips on how to give the image a photorealistic look...


Post a reply to this message

From: Chris B
Subject: Re: 1. photorealistic play-doh 2. round off at csg edges
Date: 24 Oct 2006 14:57:13
Message: <453e6209@news.povray.org>
"Toon" <nomail@nomail> wrote in message 
news:web.453e0e3fc2ea32ac109a9bf40@news.povray.org...
> I'm a complete POVray newbie and I'd like some tips on the following:
>
> I'm trying to render a photorealistic image of play-doh objects. So far,
> I've had no luck in making a convincing picture. Can someone help me with:
> ... snip ...

> 2. How can I create rounded edges that look like two clay objects have 
> been
> pushed together? For example when I union two overlapping spheres, the 
> edge
> between the spheres is very sharp. I would like to round off these edges.
> Not outwards like in a blob, but inwards (see the example). The objects I
> would like to give a "play-doh look" are imported from another program and
> consist of many csg's, so I think it will be difficult to manually adapt
> all objects. I am kinda looking for a simple trick that adds an artificial
> shadow or something to everywhere where there is an edge of two csg's in
> the union and is not too rendering time expensive.
>

Hi Toon,

I can only think of a couple of ways of doing that sort of shape. 
Unfortunately neither of them start with imported CSGs.

One of them is blobs, (which can do 'inwards' components as well as 
'outwards' ones, by using negative strength values). You're right, it would 
be difficult to manually adapt all of your objects. I find blobs are a right 
pain to work with, but they do give you shapes that it's difficult to get 
otherwise natively in POV-Ray.

The other way is to use a modeler to generate a smoothed triangular mesh 
object. Many modelers allow you to start with objects like spheres and boxes 
and cut yourself an approximate mesh shape, then you gan pull a few points 
around to give it a more or less smooth profile.

Either way you can take a relatively smooth object and add a bumpy normal to 
the texture to make it look less regular than it actually is.

If you resort to using blobs then:
1. Be prepared to use more components in a blob than you thought you'd have 
to
2. Colour the component you're working on differently, otherwise it can be 
very difficult to see the effect it's having on the blob
3. Define each component at the origin then scale it and rotate it before 
translating it into position. Otherwise trying to work out where the hell 
it's going to end up can drive you crazy.

I've included a short example below that gives a shape a little like the 
body of the car in the picture you referenced.
I've coloured the dent for the windscreen red and applied a bozo normal to 
the whole thing.

Regards,
Chris B.

camera { location <-4,5,-4> look_at <0,0,0>}
light_source { <-10,10,-10>, rgb 1 }

// create a smooth blobby shape
blob {
  threshold 0.6
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,0,0>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,0,1>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,0,2>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,0,3>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,0,4>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,0,5>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,1,2>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,1,3>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,1,4>}
  sphere { 0,2, 1   scale <1.5,1,1> translate <0,1,5>}
  sphere { 0,3,-0.6 scale <1,0.5,4> translate <-3,0.5,5>}   // Flatten Sides
  sphere { 0,3,-0.6 scale <1,0.5,4> translate < 3,0.5,5>}   //
  sphere { 0,3,-0.6 scale <0.5,1,4> translate <0,3,5>}      // Flatten Top
  sphere { 0,3,-0.6 scale <0.5,1,4> translate <0,-1,5>}     // Flatten 
Bottom
  sphere { 0,2,-1   scale <1.5,1,1> translate <0,0,-2.5>}   // Flatten Front
  sphere { 0,0.8,-1 scale <3,1.4,1.5>
    translate <0,1.7,0.5>} // Indent Windscreen 1
  sphere { 0,0.8,-3 scale <2.5,1.2,0.9>
    translate <0,1.8,1.0> pigment {rgb <1,0,0>}} // Indent Windscreen 2
  sphere { 0,0.7,-1 scale <0.9,1,1> rotate  z*20
    translate < 0.8,0.2,-1.2>} // Left Headlight
  sphere { 0,0.7,-1 scale <0.8,1,1> rotate -z*25
    translate <-0.7,0.2,-1.2>} // Right Headlight
  pigment {color rgb <1,1,0>}
  normal {bozo 0.5 scale 0.2}
}


Post a reply to this message

From: Toon
Subject: Re: 1. photorealistic play-doh 2. round off at csg edges
Date: 25 Oct 2006 02:50:01
Message: <web.453f0826cb690680109a9bf40@news.povray.org>
Thanks, Chris! I think I can work out a solution using blobs, although it
may require some hard work. But hey, anything to get great results!


Post a reply to this message

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