![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thomas de Groot <tho### [at] degroot org> wrote:
>
> What you need is
> making sure that your pattern object (i.e. the torus) interects your
> primary object (i.e. the triangle) each time you invoke the texture. The
> torus does not move if you do not tell it to specifically. It does not
> move by a texture translate.
>
Yes, in the usual case of applying an 'object pattern' pigment to an object,
that's true: The pattern is 3D and created at a specific place in 3D space from
the object it is given; then the object it's applied to (the surface of that
object) needs to line up more or less with the pattern in the same space, to see
*some* effect of it. Both things can be translated individually to get the best
line-up, AFAIK.
But I sense that BE's idea is to actually REPEAT the 'object pattern' (or *any*
pattern) on each and every triangle of a mesh via uv-mapping, even if the mesh
is some kind of complex rounded form. If so, it's an intriguing idea; I wonder
if it's possible.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Kenneth" <kdw### [at] gmail com> wrote:
>
> But I sense that BE's idea is to actually REPEAT the 'object pattern' (or *any*
> pattern) on each and every triangle of a mesh via uv-mapping, even if the mesh
> is some kind of complex rounded form. If so, it's an intriguing idea; I wonder
> if it's possible.
Hmm. Looking again at Josh E's comment and image, he may be on to something. The
torus 'object pattern' IS repeated there (twice), although the spacing between
the two does not appear 'correct'(?)
(And I'm not sure where he put his uv stuff, from his short description.)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Op 24-3-2023 om 09:10 schreef Kenneth:
> Thomas de Groot <tho### [at] degroot org> wrote:
>>
>> What you need is
>> making sure that your pattern object (i.e. the torus) interects your
>> primary object (i.e. the triangle) each time you invoke the texture. The
>> torus does not move if you do not tell it to specifically. It does not
>> move by a texture translate.
>>
>
> Yes, in the usual case of applying an 'object pattern' pigment to an object,
> that's true: The pattern is 3D and created at a specific place in 3D space from
> the object it is given; then the object it's applied to (the surface of that
> object) needs to line up more or less with the pattern in the same space, to see
> *some* effect of it. Both things can be translated individually to get the best
> line-up, AFAIK.
>
> But I sense that BE's idea is to actually REPEAT the 'object pattern' (or *any*
> pattern) on each and every triangle of a mesh via uv-mapping, even if the mesh
> is some kind of complex rounded form. If so, it's an intriguing idea; I wonder
> if it's possible.
>
>
I agree. The idea is intriguing indeed and, when waking up in the middle
of the night, I thought: "Ah!" ;-)
I think that the biggest problem BE wants to solve is a contradiction
between two realities:
1- an object pattern (as embedded in a pigment or a texture) needs a
3D-intersection between two objects to take effect;
2- using an object pattern (again, as embedded in a pigment or a
texture) and then uv-mapping that pigment or texture on an object means
that the necessary 3rd dimension is lost(a). There is no way the texture
can "know" which switch it should use. uv-mapping is about "mapping" a
texture "over" a given surface and not intersecting with it.
Again, afaik. I guess we need a real specialist here. ;-)
(a) and in addition, any translation of the object within the pattern is
not performed.
https://wiki.povray.org/content/Reference:Object_Pattern
The much regretted Friedrich Lohmueller had a clear tutorial about the
use of object patterns. I used it gratefully last year to pattern my
Lohmueller truck, as I mentioned elsewhere:
https://news.povray.org/povray.general/message/%3C63f24b8e%40news.povray.org%3E/#%3C63f24b8e%40news.povray.org%3E
--
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Josh English <Jos### [at] joshuarenglish com> wrote:
> I added the uv_mapping keyword to the Test texture and got the following
> result.
>
> IS this what you're looking for?
It IS!
Thanks, Josh. That would have driven me crazy.
I'm not sure I would have ever found that, unless I resorted to blind "try
everything" mode. I normally associate uv_mapping with some sort of object
instantiation, as in "use uv_mapping to apply whatever texture, instead of the
normal mode". Instead, it looks like I'm having to use uv_mapping as the first
argument in the texture definition itself, before the pigment {} statement.
I honestly can't say that I've ever seen this before, or actually noticed this
for what it was. Great catch.
Kenneth and Thomas - the object pattern does not use the intersection of 2
objects. It partitions space between inside and outside of an object. So I can
make a texture appear in the shape of an object, or everywhere _but_ where the
object is, or texture the object's 3D space in one way, and the space around it
in another. Or layer that concept, as TdG and I have done in past scenes.
And you definitely are catching on to where I'm going with that. ;)
- BW
(Note, the clipping of the torus is due to it being placed for proper
positioning in the 1st and 3rd triangles, so it gets clipped in the middle one.)
Post a reply to this message
Attachments:
Download 'ternaryplot.png' (13 KB)
Preview of image 'ternaryplot.png'
![ternaryplot.png](/povray.general/attachment/%3Cweb.641d7d08eebe912c1f9dae3025979125%40news.povray.org%3E/ternaryplot.png?ttop=441664&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Op 24-3-2023 om 11:35 schreef Bald Eagle:
> Josh English <Jos### [at] joshuarenglish com> wrote:
>
>> I added the uv_mapping keyword to the Test texture and got the following
>> result.
>>
>> IS this what you're looking for?
>
> It IS!
>
Ahaaaa...!
> Thanks, Josh. That would have driven me crazy.
> I'm not sure I would have ever found that, unless I resorted to blind "try
> everything" mode. I normally associate uv_mapping with some sort of object
> instantiation, as in "use uv_mapping to apply whatever texture, instead of the
> normal mode". Instead, it looks like I'm having to use uv_mapping as the first
> argument in the texture definition itself, before the pigment {} statement.
>
> I honestly can't say that I've ever seen this before, or actually noticed this
> for what it was. Great catch.
>
Great! This is all new to me I confess. Learned something and am going
to note this down in my POV grimoire for later reference.
>
> Kenneth and Thomas - the object pattern does not use the intersection of 2
> objects. It partitions space between inside and outside of an object. So I can
> make a texture appear in the shape of an object, or everywhere _but_ where the
> object is, or texture the object's 3D space in one way, and the space around it
> in another. Or layer that concept, as TdG and I have done in past scenes.
>
And that is where I thought that the object's position was fixed...
> And you definitely are catching on to where I'm going with that. ;)
>
Eagerly awaiting further developments...
>
>
> (Note, the clipping of the torus is due to it being placed for proper
> positioning in the 1st and 3rd triangles, so it gets clipped in the middle one.)
>
Noted.
--
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Op 24-3-2023 om 13:25 schreef Thomas de Groot:
> Ahaaaa...!
>
Oh happy days! :-)
--
Thomas
Post a reply to this message
Attachments:
Download 'be_meshtest.png' (25 KB)
Preview of image 'be_meshtest.png'
![be_meshtest.png](/povray.general/attachment/%3C641d9da6%241%40news.povray.org%3E/be_meshtest.png?ttop=441664&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
So now I have encountered a secondary problem.
Once I define Test as my uv_mapped texture, it seems that I can't further modify
it with any transformations, say to make a scaled or rotated version.
So I'm assuming that I have to make a plain texture, do all the transformations
to make a second plain texture, and then define them both as special uv_mapped
textures in a separate step?
This just seems really weird, and I've never recalled having to do this to uv
map a mesh.
- BW
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 3/24/2023 3:35 AM, Bald Eagle wrote:
> Josh English <Jos### [at] joshuarenglish com> wrote:
>
>> I added the uv_mapping keyword to the Test texture and got the following
>> result.
>>
>> IS this what you're looking for?
>
> It IS!
>
> Thanks, Josh. That would have driven me crazy.
> I'm not sure I would have ever found that, unless I resorted to blind "try
> everything" mode. I normally associate uv_mapping with some sort of object
> instantiation, as in "use uv_mapping to apply whatever texture, instead of the
> normal mode". Instead, it looks like I'm having to use uv_mapping as the first
> argument in the texture definition itself, before the pigment {} statement.
>
> I honestly can't say that I've ever seen this before, or actually noticed this
> for what it was. Great catch.
>
>
> Kenneth and Thomas - the object pattern does not use the intersection of 2
> objects. It partitions space between inside and outside of an object. So I can
> make a texture appear in the shape of an object, or everywhere _but_ where the
> object is, or texture the object's 3D space in one way, and the space around it
> in another. Or layer that concept, as TdG and I have done in past scenes.
>
> And you definitely are catching on to where I'm going with that. ;)
>
> - BW
>
>
>
>
> (Note, the clipping of the torus is due to it being placed for proper
> positioning in the 1st and 3rd triangles, so it gets clipped in the middle one.)
>
Yup. uv_mapping needs to be triggered on the texture and the object to
work. I played with it a bit more and managed to get the torus onto each
triangle that has the Test texture
#declare TorusRadius = sqrt(3)/6;
#declare Torus = torus {TorusRadius-Line, Line rotate x*90 translate
<0.5, TorusRadius-Line, 0>}
#declare Test2 = texture {uv_mapping pigment {rgb 1 }}
#declare Test = texture {uv_mapping pigment {object {Torus rgbt 1, rgb 0}}}
#declare Zero = <0, 0>;
#declare Mid = <0.5, sqrt(3)/2>;
#declare X = <1, 0>;
#declare FZero = <0, sqrt(3)/2>;
#declare FMid = <0.5, 0>;
#declare FX = <1, sqrt(3)/2>;
#declare hx = x/2;
mesh {
triangle {
<0, 0, 0>, Mid, x
uv_vectors <0, 0>, Mid, <1, 0>
texture {Test}
}
triangle {
FZero+hx, FMid+hx, FX+hx
uv_vectors <0,0>, Mid, <1,0>
texture {Test2}
}
triangle {
<0, 0, 0>+x, x+x, Mid+x
uv_vectors <0, 0>, Mid, <1, 0>
texture {Test}
}
translate <-1, -1, 0>
}
That is, there's no reason not to use the same UV vectors on all the
triangles you want to highlight.
-- Josh
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 3/24/2023 10:42 AM, Bald Eagle wrote:
> So now I have encountered a secondary problem.
>
> Once I define Test as my uv_mapped texture, it seems that I can't further modify
> it with any transformations, say to make a scaled or rotated version.
>
> So I'm assuming that I have to make a plain texture, do all the transformations
> to make a second plain texture, and then define them both as special uv_mapped
> textures in a separate step?
>
>
> This just seems really weird, and I've never recalled having to do this to uv
> map a mesh.
>
> - BW
>
You should be able to modify it by selecting different UV Mapping
coordinates, unless you want a different shape than the torus.
If you use uv_vectors <0, 0>, Mid/2, <1, 0> on one triangle you get a
strange swoop in one triangle (image attached).
If you want multiple torii in the triangle, you either need to define it
that way or try warping the object texture, which I've never played with
so I can't say it would work.
-- Josh
Post a reply to this message
Attachments:
Download 'uv_test.png' (7 KB)
Preview of image 'uv_test.png'
![uv_test.png](/povray.general/attachment/%3C641e18c1%241%40news.povray.org%3E/uv_test.png?ttop=441664&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 3/24/2023 3:35 AM, Bald Eagle wrote:
>
> Kenneth and Thomas - the object pattern does not use the intersection of 2
> objects. It partitions space between inside and outside of an object. So I can
> make a texture appear in the shape of an object, or everywhere _but_ where the
> object is, or texture the object's 3D space in one way, and the space around it
> in another. Or layer that concept, as TdG and I have done in past scenes.
>
That's how I added doors and windows to the desert towers scene I posted
to p.b.i recently.
-- Josh
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |