Hi all,
For an OpenGL based export I need to sometimes repeat only the u or v dimension
of a texture.
I've been searching but it seems you can only disable repeat for both u and v
combined using the "once" keyword in the concerning image_map block.
Is there any way / work around to toggle the repeat for u or v separately?
I'm using this macro as a place holder
--------
#macro getPngMapType(idx)
//POV-Ray does not support u or v only repeat.
// for the time being use repeat for both in all cases.
#if (getPngNeedsURepeat(idx) | getPngNeedsVRepeat(idx))
map_type 0
#else
map_type 0 once
#end
#end

I think there ought to be a way.
Not sure if there's a more elegant way, but look at
a) making a texture that's the u&v repeat of the image_map
b) making a texture where there's a u-strip of texture a, and the rest is clear
I think b might be accomplished with a function based pigment where you'd use
select() and abs (x [or y]) to switch between the image part and the clear part.
That's the best I can do off the top of my head without POV-Ray in front of me.

I think I'm trying to pair up a u,v repeating image map with:
3.6.2.1.20 Planar Pattern
The planar pattern creates a horizontal stripe plus or minus one unit above and
below the X-Z plane. It is computed by: value =1.0- min(1, abs(Y)) It starts at
1.0 at the origin and decreases to a minimum value of 0.0 as the Y values
approaches a distance of 1 unit from the X-Z plane. It remains at 0.0 for all
areas beyond that distance. This pattern was originally created for use with
halo or media but it may be used anywhere any pattern may be used.
.... if that's any help

On 01/30/2018 02:45 PM, Roland Melkert wrote:
> > Is there any way / work around to toggle the repeat for u or v separately?> > I'm using this macro as a place holder> > --------> #macro getPngMapType(idx)> //POV-Ray does not support u or v only repeat.> // for the time being use repeat for both in all cases.> #if (getPngNeedsURepeat(idx) | getPngNeedsVRepeat(idx))> map_type 0> #else> map_type 0 once> #end> #end>
Perhaps something like:
#declare PigImgMap0 = pigment {
image_map { "mapUrpt.png" once map_type 0 interpolate 2 }
warp { repeat x }
}
will work for you?
Bill P.