|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I don`t seem to be able to get cutaway_textures to work the way I`m expecting
and I am hoping someone here could set me straight. The following is a snippit
of code and I would have expected the intersection to have left the texture of
wood.
#macro myWood()
union {
#local wPos = 0;
#while (wPos < wWood)
object {
board(lWood, tWood, wWood/3)
translate <0, 0, wPos>
}
#local wPos = wPos + wWood/3;
#end
translate 50*y
}
#end
intersection {
myWood()
object {
cylinder {<wWood/2, 0, lWood/2>,<wWood/2, 150, lWood/2>, lWood/4 }
texture { pigment { rgb <.1, .2, .8>}}
}
cutaway_textures
}
I end up with a cylinder with a wood grained top but blue sides.
Any suggestions?
Thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 14.12.2010 05:18, schrieb Solar Mike:
> Hi,
>
> I don`t seem to be able to get cutaway_textures to work the way I`m expecting
> and I am hoping someone here could set me straight. The following is a snippit
> of code and I would have expected the intersection to have left the texture of
> wood.
> intersection {
> myWood()
> object {
> cylinder {<wWood/2, 0, lWood/2>,<wWood/2, 150, lWood/2>, lWood/4 }
> texture { pigment { rgb<.1, .2, .8>}}
> }
> cutaway_textures
> }
>
> I end up with a cylinder with a wood grained top but blue sides.
Quote from the docs:
---------------------------------------
3.5.10 Cutaway Textures
Syntax:
difference | intersection {
OBJECT_1_WITH_TEXTURES
OBJECT_2_WITH_NO_TEXTURE
cutaway_textures
}
---------------------------------------
Mind the "_WITH_NO_TEXTURE": cutaway_textures only works if your
"cutting tool" has no explicit texture set.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 14.12.2010 05:18, schrieb Solar Mike:
>
> Quote from the docs:
>
> ---------------------------------------
> 3.5.10 Cutaway Textures
> Syntax:
>
> difference | intersection {
> OBJECT_1_WITH_TEXTURES
> OBJECT_2_WITH_NO_TEXTURE
> cutaway_textures
> }
> ---------------------------------------
>
> Mind the "_WITH_NO_TEXTURE": cutaway_textures only works if your
> "cutting tool" has no explicit texture set.
Thanks,
You are quite right. Unfortunately I did not have a texture with my original
problem. It seems to be more of a problem if I have a union. Is this expected
to work or am I again missing something? The problem occurs whether the union
is within an object or not.
intersection {
myWood()
object {
union {
cylinder {<lWood/2, 0, wWood/2>,<lWood/2, 150, wWood/2>, lWood/4 }
cylinder {<lWood/2, 0, wWood/3>,<lWood/2, 150, wWood/3>, lWood/4 }
}
}
cutaway_textures
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I am still having the texture problem - if it is working properly I have not
thought of a good way of working around it. Here is my test code and the
resulting output
#macro cutter()
union {
cylinder {<lWood/2, 0, wWood/3>,<lWood/2, 150, wWood/3>, lWood/4 }
cylinder {<lWood/2, 0, wWood*2/3>,<lWood/2, 150, wWood*2/3>, lWood/4 }
}
#end
difference {
myWood()
cutter()
cutaway_textures
translate (wWood+20)*z
}
intersection {
myWood()
cutter()
cutaway_textures
}
http://s1223.photobucket.com/albums/dd507/solarmike1/?action=view¤t=testIntersect.png
I would have expected the wood texture on both the difference and the
intersection. Any thoughts as to how I can re-work this?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 17.12.2010 05:17, schrieb Solar Mike:
>
http://s1223.photobucket.com/albums/dd507/solarmike1/?action=view¤t=testIntersect.png
>
> I would have expected the wood texture on both the difference and the
> intersection. Any thoughts as to how I can re-work this?
I'd expect the same as you do.
What happens when you add the "inverse" keyword to the cutter() union?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 17.12.2010 05:17, schrieb Solar Mike:
> >
http://s1223.photobucket.com/albums/dd507/solarmike1/?action=view¤t=testIntersect.png
> >
> > I would have expected the wood texture on both the difference and the
> > intersection. Any thoughts as to how I can re-work this?
>
> I'd expect the same as you do.
> What happens when you add the "inverse" keyword to the cutter() union?
I have tried playing around with that. If I use the inverse and then difference
I get the same result. I will also loose the texture if I only have a single
cylinder in the union. Removing the union from that will restore the texture
but I'm after a slightly more complicated "cutter."
I also tried adding an interior_texture without success.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 17.12.2010 15:53, schrieb Solar Mike:
> clipka<ano### [at] anonymousorg> wrote:
>> Am 17.12.2010 05:17, schrieb Solar Mike:
>>>
http://s1223.photobucket.com/albums/dd507/solarmike1/?action=view¤t=testIntersect.png
>>>
>>> I would have expected the wood texture on both the difference and the
>>> intersection. Any thoughts as to how I can re-work this?
>>
>> I'd expect the same as you do.
>> What happens when you add the "inverse" keyword to the cutter() union?
>
> I have tried playing around with that. If I use the inverse and then difference
> I get the same result. I will also loose the texture if I only have a single
> cylinder in the union. Removing the union from that will restore the texture
> but I'm after a slightly more complicated "cutter."
>
> I also tried adding an interior_texture without success.
What happens if you put "cutaway_textures" into the union?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 12/17/2010 09:18 PM, clipka wrote:
> Am 17.12.2010 15:53, schrieb Solar Mike:
>> clipka<ano### [at] anonymousorg> wrote:
>>> Am 17.12.2010 05:17, schrieb Solar Mike:
>>>>
http://s1223.photobucket.com/albums/dd507/solarmike1/?action=view¤t=testIntersect.png
>>>>
>>>>
>>>> I would have expected the wood texture on both the difference and the
>>>> intersection. Any thoughts as to how I can re-work this?
>>>
>>> I'd expect the same as you do.
>>> What happens when you add the "inverse" keyword to the cutter() union?
>>
>> I have tried playing around with that. If I use the inverse and then
>> difference
>> I get the same result. I will also loose the texture if I only have a
>> single
>> cylinder in the union. Removing the union from that will restore the
>> texture
>> but I'm after a slightly more complicated "cutter."
>>
>> I also tried adding an interior_texture without success.
>
> What happens if you put "cutaway_textures" into the union?
could this be the same behavior that was covered in this tag:
http://bugs.povray.org/task/115
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 18.12.2010 02:59, schrieb Jim Holsenback:
> could this be the same behavior that was covered in this tag:
> http://bugs.povray.org/task/115
No, it's actually just the opposite. Though they're closely related.
Gee, this cutaway thing is more complicated than I was just thinking.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 18.12.2010 02:59, schrieb Jim Holsenback:
>
> > could this be the same behavior that was covered in this tag:
> > http://bugs.povray.org/task/115
>
> No, it's actually just the opposite. Though they're closely related.
>
> Gee, this cutaway thing is more complicated than I was just thinking.
I had a look at task115 and I found that I could get correct rendering if I
moved the final application of orange to the difference only (the walls.) I
think that the orange may have been applied to the fillet since no texture was
explicitly applied to it and the orange was applied to the entire final union.
Interestingly, I would have expected the orange to override all the textures in
the final union but I guess that is not the case!
I'm still not sure how to work around the problem I am having. :/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |