|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hopefully this will be quick for someone...I'm banging my head against it and I
know it should be simple, but not quite getting it.
I'm texturing a box using a pigment gradient with two image maps as input. When
I render I don't get any color from the original images...what am I missing?
The attachment has the output on top and the original image maps on the bottom.
Here's the relevant code:
#declare White_Texture =
pigment {
image_map {
jpeg "white_hq.jpg"
map_type 0
interpolate 2
}
}
#declare Red_Texture =
pigment {
image_map {
jpeg "red_hq.jpg"
map_type 0
interpolate 2
}
}
box {
<-12, -7, -0.1>, <12, 7, 0.1>
texture {
pigment {
pigment_pattern {
gradient x
pigment_map {
[0.00 Red_Texture]
[0.25 Red_Texture]
[0.75 White_Texture]
[1.00 White_Texture]
}
}
translate <0.5, 0.5, 0>
rotate 180*y
scale <24, 14, 1>
}
finish {
ambient 1
diffuse 0
}
}
}
Post a reply to this message
Attachments:
Download 'nocolor.jpg' (225 KB)
Preview of image 'nocolor.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> texture {
> pigment {
> pigment_pattern {
> gradient x
> }
> pigment_map {
> [0.00 Red_Texture]
> [0.25 Red_Texture]
> [0.75 White_Texture]
> [1.00 White_Texture]
> }
Try the above change, the pigment_map should be part of pigment, not
pigment_pattern...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Not immediately sure, but I /think/ it is because you use a
pigment_pattern which only reads black/white.
Have you tried this?
texture {
pigment {
gradient x
pigment_map {
[0.00 Red_Texture]
[0.25 Red_Texture]
[0.75 White_Texture]
[1.00 White_Texture]
}
translate <0.5, 0.5, 0>
rotate 180*y
scale <24, 14, 1>
}
etc...
Thomas
On 24-9-2013 16:00, jceddy wrote:
> Hopefully this will be quick for someone...I'm banging my head against it and I
> know it should be simple, but not quite getting it.
>
> I'm texturing a box using a pigment gradient with two image maps as input. When
> I render I don't get any color from the original images...what am I missing?
>
> The attachment has the output on top and the original image maps on the bottom.
>
> Here's the relevant code:
>
> #declare White_Texture =
> pigment {
> image_map {
> jpeg "white_hq.jpg"
> map_type 0
> interpolate 2
> }
> }
>
> #declare Red_Texture =
> pigment {
> image_map {
> jpeg "red_hq.jpg"
> map_type 0
> interpolate 2
> }
> }
>
> box {
> <-12, -7, -0.1>, <12, 7, 0.1>
>
> texture {
> pigment {
> pigment_pattern {
> gradient x
> pigment_map {
> [0.00 Red_Texture]
> [0.25 Red_Texture]
> [0.75 White_Texture]
> [1.00 White_Texture]
> }
> }
>
> translate <0.5, 0.5, 0>
> rotate 180*y
> scale <24, 14, 1>
> }
> finish {
> ambient 1
> diffuse 0
> }
> }
> }
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
You are correct, I just had to pull the pigment_pattern block out completely...I
knew it was something simple.
This works:
box {
<-12, -7, -0.1>, <12, 7, 0.1>
texture {
pigment {
gradient x
pigment_map {
[0.00 Red_Texture]
[0.25 Red_Texture]
[0.75 White_Texture]
[1.00 White_Texture]
}
translate <0.5, 0.5, 0>
rotate 180*y
scale <24, 14, 1>
}
finish {
ambient 1
diffuse 0
}
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Not immediately sure, but I /think/ it is because you use a
> pigment_pattern which only reads black/white.
pigment_pattern takes a full-colour pigment and returns a greyscale
pattern. It's useful if you want to use a pigment as a pattern.
For example if you wanted to use a defined pigment instead of "gradient
x" you can do this:
texture {
pigment {
// gradient x
pigment_pattern { myPigment }
pigment_map {
[0.00 Red_Texture]
[0.25 Red_Texture]
[0.75 White_Texture]
[1.00 White_Texture]
}
translate <0.5, 0.5, 0>
rotate 180*y
scale <24, 14, 1>
}
However note the pigment_map is not inside pigment_pattern, otherwise
the Red_Texture or White_Texture would get chosen inside
pigment_pattern, then converted to greyscale (as the OP code did).
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|