|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
when I use this
function{pigment{image_map scale<-1,-1,1>}}
I get artifacts around the edges.
Why is this? Any one else come across this and have a work around?
Have Fun!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24-12-2018 4:49, Leroy wrote:
> when I use this
> function{pigment{image_map scale<-1,-1,1>}}
> I get artifacts around the edges.
> Why is this? Any one else come across this and have a work around?
>
> Have Fun!
>
>
Do you intend to use this function in a height_field? I do not know if
this is related, but I get artefacts around the edges of a image_map
function's height_field, independently of scale by the way. I solved it
by just intersecting away the height_field edges with a slightly smaller
box. Like this:
//start code
#declare F_hf =
function {
pigment {
image_map {
tga "My_image.tga" gamma 1.0
map_type 0
interpolate 2
}
//adding some warp
}
}
#local CuttingKnife = 0.994; //find minimum value experimentally
#local HF_res = 2000;
#declare HF_base =
intersection {
height_field {
function HF_res, HF_res {F_hf(x,y,z).hf}
smooth
translate <-0.5, 0, -0.5>
}
box {
<-0.5, -0.5, -0.5>, <0.5, 0.5, 0.5>
scale <CuttingKnife, 2, CuttingKnife>
}
scale <1/CuttingKnife, 1, 1/CuttingKnife>
scale SomeScale
rotate SomeAngle*y
}
//end code
However, I do not know /why/ the artefacts happen, nor if this should be
expected or not.
Hope this helps.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 24.12.2018 um 08:45 schrieb Thomas de Groot:
...
> #declare F_hf =
> function {
> pigment {
> image_map {
> tga "My_image.tga" gamma 1.0
> map_type 0
> interpolate 2
> }
> //adding some warp
> }
> }
...
> However, I do not know /why/ the artefacts happen, nor if this should be
> expected or not.
Interpolation I presume. Unless you specify the "once" keyword, at the
edges the image is interpolated with the opposite edge.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 24-12-2018 12:52, clipka wrote:
> Am 24.12.2018 um 08:45 schrieb Thomas de Groot:
> ...
>> #declare F_hf =
>> function {
>> pigment {
>> image_map {
>> tga "My_image.tga" gamma 1.0
>> map_type 0
>> interpolate 2
>> }
>> //adding some warp
>> }
>> }
> ...
>> However, I do not know /why/ the artefacts happen, nor if this should
>> be expected or not.
>
> Interpolation I presume. Unless you specify the "once" keyword, at the
> edges the image is interpolated with the opposite edge.
Ah! That is an interesting thought. Never thought of it but makes sense.
I shall investigate. I'll come back.
Thanks! and Merry Christmas!
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 25-12-2018 8:27, Thomas de Groot wrote:
> On 24-12-2018 12:52, clipka wrote:
>> Am 24.12.2018 um 08:45 schrieb Thomas de Groot:
>> ...
>>> #declare F_hf =
>>> function {
>>> pigment {
>>> image_map {
>>> tga "My_image.tga" gamma 1.0
>>> map_type 0
>>> interpolate 2
>>> }
>>> //adding some warp
>>> }
>>> }
>> ...
>>> However, I do not know /why/ the artefacts happen, nor if this should
>>> be expected or not.
>>
>> Interpolation I presume. Unless you specify the "once" keyword, at the
>> edges the image is interpolated with the opposite edge.
>
> Ah! That is an interesting thought. Never thought of it but makes sense.
> I shall investigate. I'll come back.
>
> Thanks! and Merry Christmas!
>
Back again. The answer is yes and no. Yes, because interpolation
definitely creates artefacts from the opposite side of the image_map /
height_field; no, because adding the "once" keyword only makes the
artefacts in the x-axis direction disappear, but /not/ in the z-axis
direction.
To illustrate this, I add a test file with image_map. Run with "once"
(at line 65) commented out or not to see the difference.
--
Thomas
Post a reply to this message
Attachments:
Download 'hf_image_map_test.7z.zip' (3673 KB)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 25/12/2018 07:27, Thomas de Groot wrote:
> Thanks! and Merry Christmas!
And Merry Christmas from me. :-D
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 24-12-2018 4:49, Leroy wrote:
> > when I use this
> > function{pigment{image_map scale<-1,-1,1>}}
> > I get artifacts around the edges.
> > Why is this? Any one else come across this and have a work around?
> >
> > Have Fun!
> >
> >
>
> Do you intend to use this function in a height_field? I do not know if
> this is related, but I get artefacts around the edges of a image_map
> function's height_field, independently of scale by the way. I solved it
> by just intersecting away the height_field edges with a slightly smaller
> box.
> Thomas
Merry Christmas :)
I was using the function to make a color palette from any image.
I use that palette to convert the image into a 'pcx' file.
Then use the 'pcx' file to make a 'cin' video file.
Using POV all the while.
The function works fine if don't scale it negatively.
Thanks for you input.
Have Christmas fun!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 18-12-25 à 16:22, Leroy a écrit :
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> On 24-12-2018 4:49, Leroy wrote:
>>> when I use this
>>> function{pigment{image_map scale<-1,-1,1>}}
>>> I get artifacts around the edges.
>>> Why is this? Any one else come across this and have a work around?
>>>
>>> Have Fun!
>>>
>>>
>>
>> Do you intend to use this function in a height_field? I do not know if
>> this is related, but I get artefacts around the edges of a image_map
>> function's height_field, independently of scale by the way. I solved it
>> by just intersecting away the height_field edges with a slightly smaller
>> box.
>> Thomas
>
> Merry Christmas :)
> I was using the function to make a color palette from any image.
> I use that palette to convert the image into a 'pcx' file.
> Then use the 'pcx' file to make a 'cin' video file.
> Using POV all the while.
> The function works fine if don't scale it negatively.
>
> Thanks for you input.
>
> Have Christmas fun!
>
>
>
>
>
In that case, you can «scale» the location instead of the image_map :
#declare Loc=Loc*<-1,-1,1>;
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|