POV-Ray : Newsgroups : povray.newusers : Returning user - Simple ? question Server Time
21 Dec 2024 13:23:30 EST (-0500)
  Returning user - Simple ? question (Message 1 to 10 of 10)  
From: AQ
Subject: Returning user - Simple ? question
Date: 27 Sep 2015 09:47:29
Message: <ftrf0blauc12ias0fg98mau9hsc9137d6b@4ax.com>
Hi

I have not used POVray for about 10 years since i retired and it
appears I have forgotn much that I thought I used to know.

Wood turning is a main hobby and I want to use POV as a virtual
protype.

I have one question that I am finding frustrating.  

I have a virtual block made of several wood that I want use a sphere
to cut a depression onto to make it into a bowl.  When I try it the
pigment of the sphere shown on the surface hiding the laminations.  I
am sure in the past I could get this to work.  Any advice would be
appreciated.


Post a reply to this message

From: clipka
Subject: Re: Returning user - Simple ? question
Date: 27 Sep 2015 14:24:00
Message: <56083440$1@news.povray.org>
Am 27.09.2015 um 15:47 schrieb AQ:

> I have a virtual block made of several wood that I want use a sphere
> to cut a depression onto to make it into a bowl.  When I try it the
> pigment of the sphere shown on the surface hiding the laminations.  I
> am sure in the past I could get this to work.  Any advice would be
> appreciated.

My spontaneous thought is that simply using an untextured sphere should
do the trick.


Post a reply to this message

From: Le Forgeron
Subject: Re: Returning user - Simple ? question
Date: 28 Sep 2015 13:47:22
Message: <56097d2a$1@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 27/09/2015 20:23, clipka a écrit :
> Am 27.09.2015 um 15:47 schrieb AQ:
> 
>> I have a virtual block made of several wood that I want use a
>> sphere to cut a depression onto to make it into a bowl.  When I
>> try it the pigment of the sphere shown on the surface hiding the
>> laminations.  I am sure in the past I could get this to work.
>> Any advice would be appreciated.
> 
> My spontaneous thought is that simply using an untextured sphere
> should do the trick.
> 
My second thought would be to look at cutaway_textures

> http://wiki.povray.org/content/Reference:Cutaway_Textures

But beware of the killing note:

POV-Ray will determine which texture(s) to use by doing insidedness
tests on the objects in the difference or intersection. If the
intersection point is inside an object, that object's texture will be
used (and evaluated at the interior point).
If the parent object is a CSG of objects with different textures, then
the textures on overlapping parts will be averaged together.

which means that your wood's parts should be clean (and not just
hidden by another part).

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlYJfSoACgkQhKAm8mTpkW38oQP/UEmqnrc1qz8wjHRxoUcuXF5z
rc8xJNJyIJvxjUk4jPmm7RkPZU0L//DbWXtmCVp8As+Y3TM4p7T68b6IkpZr+hzk
8oytAKSHIxgJQOnoHnGunGO/fvt7BlWMDT/vrFPJmy8QtFHLlQRqs62cLvya1OqK
wTkDQMptjjQ+sdHC4w0=
=Dy6h
-----END PGP SIGNATURE-----


Post a reply to this message

From: AQ
Subject: Re: Returning user - Simple ? question
Date: 30 Sep 2015 17:18:05
Message: <6ako0bdmrts7ob3v5odf4kftha72020m1c@4ax.com>
On Mon, 28 Sep 2015 19:47:22 +0200, Le_Forgeron <jgr### [at] freefr>
wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>

>> Am 27.09.2015 um 15:47 schrieb AQ:
>> 
>>> I have a virtual block made of several wood that I want use a
>>> sphere to cut a depression onto to make it into a bowl.  When I
>>> try it the pigment of the sphere shown on the surface hiding the
>>> laminations.  I am sure in the past I could get this to work.
>>> Any advice would be appreciated.
>> 
>> My spontaneous thought is that simply using an untextured sphere
>> should do the trick.
>> 
>My second thought would be to look at cutaway_textures
>
>> http://wiki.povray.org/content/Reference:Cutaway_Textures
>
>But beware of the killing note:
>
>POV-Ray will determine which texture(s) to use by doing insidedness
>tests on the objects in the difference or intersection. If the
>intersection point is inside an object, that object's texture will be
>used (and evaluated at the interior point).
>If the parent object is a CSG of objects with different textures, then
>the textures on overlapping parts will be averaged together.
>
>which means that your wood's parts should be clean (and not just
>hidden by another part).
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v2
>
>iJwEAQEIAAYFAlYJfSoACgkQhKAm8mTpkW38oQP/UEmqnrc1qz8wjHRxoUcuXF5z
>rc8xJNJyIJvxjUk4jPmm7RkPZU0L//DbWXtmCVp8As+Y3TM4p7T68b6IkpZr+hzk
>8oytAKSHIxgJQOnoHnGunGO/fvt7BlWMDT/vrFPJmy8QtFHLlQRqs62cLvya1OqK
>wTkDQMptjjQ+sdHC4w0=
>=Dy6h
>-----END PGP SIGNATURE-----

Thank you I will have to think about what that means

John


Post a reply to this message

From: AQ
Subject: Re: Returning user - Simple ? question
Date: 30 Sep 2015 18:01:29
Message: <4pmo0btug9qvgbl7kqtqq5bc9cne7mgo84@4ax.com>
On Mon, 28 Sep 2015 19:47:22 +0200, Le_Forgeron <jgr### [at] freefr>
wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>

>> Am 27.09.2015 um 15:47 schrieb AQ:
>> 
>>> I have a virtual block made of several wood that I want use a
>>> sphere to cut a depression onto to make it into a bowl.  When I
>>> try it the pigment of the sphere shown on the surface hiding the
>>> laminations.  I am sure in the past I could get this to work.
>>> Any advice would be appreciated.
>> 
>> My spontaneous thought is that simply using an untextured sphere
>> should do the trick.
>> 
>My second thought would be to look at cutaway_textures
>
>> http://wiki.povray.org/content/Reference:Cutaway_Textures
>
>But beware of the killing note:
>
>POV-Ray will determine which texture(s) to use by doing insidedness
>tests on the objects in the difference or intersection. If the
>intersection point is inside an object, that object's texture will be
>used (and evaluated at the interior point).
>If the parent object is a CSG of objects with different textures, then
>the textures on overlapping parts will be averaged together.
>
>which means that your wood's parts should be clean (and not just
>hidden by another part).
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v2
>
>iJwEAQEIAAYFAlYJfSoACgkQhKAm8mTpkW38oQP/UEmqnrc1qz8wjHRxoUcuXF5z
>rc8xJNJyIJvxjUk4jPmm7RkPZU0L//DbWXtmCVp8As+Y3TM4p7T68b6IkpZr+hzk
>8oytAKSHIxgJQOnoHnGunGO/fvt7BlWMDT/vrFPJmy8QtFHLlQRqs62cLvya1OqK
>wTkDQMptjjQ+sdHC4w0=
>=Dy6h
>-----END PGP SIGNATURE-----

Thank you that cutaway_textures keyword was new to me but it solved
all the problems.


Post a reply to this message

From: Alain
Subject: Re: Returning user - Simple ? question
Date: 30 Sep 2015 19:58:10
Message: <560c7712@news.povray.org>

> Hi
>
> I have not used POVray for about 10 years since i retired and it
> appears I have forgotn much that I thought I used to know.
>
> Wood turning is a main hobby and I want to use POV as a virtual
> protype.
>
> I have one question that I am finding frustrating.
>
> I have a virtual block made of several wood that I want use a sphere
> to cut a depression onto to make it into a bowl.  When I try it the
> pigment of the sphere shown on the surface hiding the laminations.  I
> am sure in the past I could get this to work.  Any advice would be
> appreciated.
>

My may:
Model the untextured outside of your bowl.
Use an untextured sphere to cut the depression.
Finaly, apply the texture to the whole object.

Generic sample:
difference{
  object{Bowl_Outside}// No texture here
  sphere{Depression_Center, Depression_Radius}//Also no texture here
  texture{My_Wood}
}


Alain


Post a reply to this message

From: Leroy
Subject: Re: Returning user - Simple ? question
Date: 2 Oct 2015 12:55:08
Message: <560eb6ec@news.povray.org>
AQ wrote:
> Hi
>
> I have not used POVray for about 10 years since i retired and it
> appears I have forgotn much that I thought I used to know.
>
> Wood turning is a main hobby and I want to use POV as a virtual
> protype.
>
I like wood work too. The others have answered your question about 
textures. I like to talk about the bowl. I would use POV's lathe to make 
my bowls. I know it can be hard to learn how to write the lathe code by 
hand. There are several programs out there that can help.
  My own is at http://leroywhetstone.s5.com/Pages/Win_Programs.html
POV's lathe can produce almost anything that can be made on a real 
lathe. I've seen on PBS where a guy made cowboy hats.
POV's sor can produce dales, pickets, anything that doesn't have an 
interior cut.
Have fun!


Post a reply to this message

From: Kenneth
Subject: Re: Returning user - Simple ? question
Date: 17 Oct 2015 05:50:01
Message: <web.56221655826cb05833c457550@news.povray.org>
AQ <AQ### [at] worldcom> wrote:

>
> I have a virtual block made of several wood that I want use a sphere
> to cut a depression onto to make it into a bowl.  When I try it the
> pigment of the sphere shown on the surface hiding the laminations.  I
> am sure in the past I could get this to work.  Any advice would be
> appreciated.

As Clipka said, the cutaway-textures feature has an *averaging* behavior-- but
that only occurs when you have *overlapping* textured objects (like concentric
solid spheres within spheres.) If you want to see the 'pure' textures of your
various pieces of wood when you carve your bowl, the way to do it is to build
your initial 'block' of laminated wood (prior to CSG) out of separate,
NON-overlapping pieces, each textured individually. It
appears that you have already done this.  ;-)  Then, use NON-textured spheres
as the cutaway objects, as has already been mentioned.

Here's some example code that I threw together (based on the POV-Ray features in
v3.6.2.) The separate wood 'layers' have very tiny gaps between them, to avoid
overlaps and any coincident-surface problems.

(Side note: The code uses the 'inverse' keyword for one of the cutaway spheres;
you might want to add an additional bounded_by object to the final CSG, for
efficiency.)

#declare Thin_Wood_Layer =
box{<0,0,0>,<2,.14999,2> // not quite .15000 in thickness
 // no texture yet
 }

#declare Total_Wood_Block=  // prior to CSG
union{
object{Thin_Wood_Layer
 texture{Wood_Texture_1}
 }
object{Thin_Wood_Layer
 texture{Wood_Texture_2}
 translate .15*y
 }
object{Thin_Wood_Layer
 texture{Wood_Texture_3}
 translate .3*y
 }
object{Thin_Wood_Layer
 texture{Wood_Texture_4}
 translate .45*y
 }
object{Thin_Wood_Layer
 texture{Wood_Texture_5}
 translate .6*y
 }
object{Thin_Wood_Layer
 texture{Wood_Texture_6}
 translate .75*y
 }
}

//----- the CSG and the cutaway ------

difference{
object{Total_Wood_Block translate <-1,0,-1>}
// to center it on origin in x and z, for ease of CSG.
// Block is <2,.9,2> in size (minus .00001 in y, actually}

sphere{0,.9 // to carve away the inside of the bowl
 // no texture
 scale <1,.7,1>
 translate .75*y
 }
sphere{0,.99 // to carve away the outside of the bowl
 // no texture
 inverse
 scale <1,.7,1>
 translate .72*y
 }
 cutaway_textures
 rotate -60*x
 rotate -30*y
 translate 1.2*y
}


Post a reply to this message

From: Alain
Subject: Re: Returning user - Simple ? question
Date: 18 Oct 2015 14:42:34
Message: <5623e81a@news.povray.org>

> AQ <AQ### [at] worldcom> wrote:
>
>>
>> I have a virtual block made of several wood that I want use a sphere
>> to cut a depression onto to make it into a bowl.  When I try it the
>> pigment of the sphere shown on the surface hiding the laminations.  I
>> am sure in the past I could get this to work.  Any advice would be
>> appreciated.
>
> As Clipka said, the cutaway-textures feature has an *averaging* behavior-- but
> that only occurs when you have *overlapping* textured objects (like concentric
> solid spheres within spheres.) If you want to see the 'pure' textures of your
> various pieces of wood when you carve your bowl, the way to do it is to build
> your initial 'block' of laminated wood (prior to CSG) out of separate,
> NON-overlapping pieces, each textured individually. It
> appears that you have already done this.  ;-)  Then, use NON-textured spheres
> as the cutaway objects, as has already been mentioned.
>
> Here's some example code that I threw together (based on the POV-Ray features in
> v3.6.2.) The separate wood 'layers' have very tiny gaps between them, to avoid
> overlaps and any coincident-surface problems.
>

Another way would be to use a gradient pattern with a texture_map 
containing the various wood, or any other, textures to be used.

Advantage: Faster rendering as the object will be much simpler as it can 
now be a single base object.

Disadvantage: You must carefully scale the gradient and apply an oposite 
scaling to the individual textures.


Post a reply to this message

From: Kenneth
Subject: Re: Returning user - Simple ? question
Date: 20 Oct 2015 03:50:01
Message: <web.5625f201826cb05833c457550@news.povray.org>
Alain <kua### [at] videotronca> wrote:


>
> Another way would be to use a gradient pattern with a texture_map
> containing the various wood, or any other, textures to be used.
>

You're right, that's a very good alternate way of doing it. I didn't think of
that.

As always, there are multiple ways of solving any POV-Ray problem. :-)


Post a reply to this message

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