POV-Ray : Newsgroups : povray.binaries.images : Is this what's SUPPOSED to happen?? [3 images ~120kb total] Server Time
4 Nov 2024 22:19:10 EST (-0500)
  Is this what's SUPPOSED to happen?? [3 images ~120kb total] (Message 1 to 10 of 10)  
From: Dayv Helfrich
Subject: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 01:21:40
Message: <4657c3e4@news.povray.org>
Is this the wrong place to post this question?  I figured since I was 
attaching images to illustrate my problem it'd be best to start here.

Based on my previous understanding of image_maps, and the documentations 
description, my image isn't coming out as expected...

I have a PNG of my company's logo.  I made the background transparent 
leaving the white and gray parts.  I created a box object, applied an 
image_map of the logo.  I expected to see the white and gray portions of the 
logo extruded along the Z axis from the front of the box to the back. 
Instead, the image is appearing flat against the front of the box (-z, for 
the purposes of this scene., flat against the back of the box (+z), with 
emptyness in the middle... Is it because I'm using alpha channel 
transparency?  Am I doing something dumb?  Or do I just STILL (after 10 
years since my rsocp) still not have a grasp on the basics???  I've tried 
things like scaling the texture along the z axis, making the box hollow, 
then not hollow, then using interior_texutre... none of these I expected to 
work, but...

I'm attaching 2 renders, jpg, cropped to make smaller files, and the full 
.png image I'm using as my image map.

The code:

// An area light (creates soft shadows)
// WARNING: This special light can significantly slow down rendering times!
light_source {
  0*x                 // light's position (translated below)
  color rgb 1.0       // light's color
  area_light
  <20, 0, 0> <0, 0, 20> // lights spread out across this distance (x * z)
  4, 4                // total number of lights in grid (4x*4z = 16 lights)
  adaptive 0          // 0,1,2,3...
  jitter              // adds random softening of light
  //circular            // make the shape of the light circular
  //orient              // orient light
  translate <40, 40, -40>   // <x y z> position of light
}


plane {
  y,
  0.0
  hollow on
  material {
        texture {
                pigment {
                        color rgb <1.00, 0.95, 0.90>
                        }
        }
  }
  finish {
        specular 1
        reflection 0.3
        crand 0.02
        diffuse 0.5
  }
}

box {
        < 0.00,  0.00001,   0.05>  // one corner position <X1 Y1 Z1>
        < 5.76,  4.08,     -0.05>  // other corner position <X2 Y2 Z2>
        material {
                texture {
                        pigment {
                                image_map {
                                        png "dg.png"
                                        once
                                }
                                scale <5.76, 4.08, 1>
                        }
                }
        }
}


Any thoughts???
Thanks!
-Dayv


Post a reply to this message


Attachments:
Download 'DG.jpg' (57 KB) Download 'DG.png' (19 KB) Download 'DGsideview.jpg' (37 KB)

Preview of image 'DG.jpg'
DG.jpg

Preview of image 'DG.png'
DG.png

Preview of image 'DGsideview.jpg'
DGsideview.jpg


 

From: Dayv Helfrich
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 01:46:56
Message: <4657c9d0$1@news.povray.org>
Oh yeah.. the .png image... I realize except for the gray triangle, it's all 
white-on-transparent, so kind of hard to see in some applications!


"Dayv Helfrich" <Day### [at] Gmailcom> wrote in message 
news:4657c3e4@news.povray.org...
> Is this the wrong place to post this question?  I figured since I was 
> attaching images to illustrate my problem it'd be best to start here.
>
> Based on my previous understanding of image_maps, and the documentations 
> description, my image isn't coming out as expected...
>
> I have a PNG of my company's logo.  I made the background transparent 
> leaving the white and gray parts.  I created a box object, applied an 
> image_map of the logo.  I expected to see the white and gray portions of 
> the logo extruded along the Z axis from the front of the box to the back. 
> Instead, the image is appearing flat against the front of the box (-z, for 
> the purposes of this scene., flat against the back of the box (+z), with 
> emptyness in the middle... Is it because I'm using alpha channel 
> transparency?  Am I doing something dumb?  Or do I just STILL (after 10 
> years since my rsocp) still not have a grasp on the basics???  I've tried 
> things like scaling the texture along the z axis, making the box hollow, 
> then not hollow, then using interior_texutre... none of these I expected 
> to work, but...
>
> I'm attaching 2 renders, jpg, cropped to make smaller files, and the full 
> .png image I'm using as my image map.
>
> The code:
>
> // An area light (creates soft shadows)
> // WARNING: This special light can significantly slow down rendering 
> times!
> light_source {
>  0*x                 // light's position (translated below)
>  color rgb 1.0       // light's color
>  area_light
>  <20, 0, 0> <0, 0, 20> // lights spread out across this distance (x * z)
>  4, 4                // total number of lights in grid (4x*4z = 16 lights)
>  adaptive 0          // 0,1,2,3...
>  jitter              // adds random softening of light
>  //circular            // make the shape of the light circular
>  //orient              // orient light
>  translate <40, 40, -40>   // <x y z> position of light
> }
>
>
> plane {
>  y,
>  0.0
>  hollow on
>  material {
>        texture {
>                pigment {
>                        color rgb <1.00, 0.95, 0.90>
>                        }
>        }
>  }
>  finish {
>        specular 1
>        reflection 0.3
>        crand 0.02
>        diffuse 0.5
>  }
> }
>
> box {
>        < 0.00,  0.00001,   0.05>  // one corner position <X1 Y1 Z1>
>        < 5.76,  4.08,     -0.05>  // other corner position <X2 Y2 Z2>
>        material {
>                texture {
>                        pigment {
>                                image_map {
>                                        png "dg.png"
>                                        once
>                                }
>                                scale <5.76, 4.08, 1>
>                        }
>                }
>        }
> }
>
>
> Any thoughts???
> Thanks!
> -Dayv
>
>


Post a reply to this message

From: Charles C
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 02:50:02
Message: <web.4657d80edaf12e9d7d5894630@news.povray.org>
"Dayv Helfrich" <Day### [at] Gmailcom> wrote:
> Any thoughts???
> Thanks!
> -Dayv

I think it's that it's still just a box with only surfaces being the
original 6 faces.  There are no new surfaces defined for where the pigment
changes.  Maybe use prisms?


Post a reply to this message

From: Jim Charter
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 03:11:15
Message: <4657dd93$1@news.povray.org>
I think you have the correct concept that the image_map texture is 
indeed "extruded" along the z axis.
However to POV the box is just six defined surfaces, so it only 
evaluates the texture where it intersects with any of those six surfaces.


Post a reply to this message

From: Grassblade
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 04:35:02
Message: <web.4657f128daf12e9da2a8ba5a0@news.povray.org>
"Dayv Helfrich" <Day### [at] Gmailcom> wrote:
> Is this the wrong place to post this question?  I figured since I was
> attaching images to illustrate my problem it'd be best to start here.
>
> Based on my previous understanding of image_maps, and the documentations
> description, my image isn't coming out as expected...
>
> I have a PNG of my company's logo.  I made the background transparent
> leaving the white and gray parts.  I created a box object, applied an
> image_map of the logo.  I expected to see the white and gray portions of the
> logo extruded along the Z axis from the front of the box to the back.
> Instead, the image is appearing flat against the front of the box (-z, for
> the purposes of this scene., flat against the back of the box (+z), with
> emptyness in the middle... Is it because I'm using alpha channel
> transparency?  Am I doing something dumb?  Or do I just STILL (after 10
> years since my rsocp) still not have a grasp on the basics???  I've tried
> things like scaling the texture along the z axis, making the box hollow,
> then not hollow, then using interior_texutre... none of these I expected to
> work, but...
>
> I'm attaching 2 renders, jpg, cropped to make smaller files, and the full
> .png image I'm using as my image map.
>
> Any thoughts???
> Thanks!
> -Dayv

For a minute there, I thought it was the Dolce & Gabbana logo. :-p
I'm hardly an expert, but that is not the way I understand image maps to
work. It is true that they extend "infinitely" (as close to infinite as
POVray gets, that is) along the z-axis, but they are just applied on
surfaces, since objects are really empty (see 1.4.1.9). You could get the
effect you want by stacking a high number of boxes on top of one another.
But using a heightfield instead would make things a lot simpler, and it
would be a true 3d object.


Post a reply to this message

From: Lukas Winter
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 04:44:01
Message: <pan.2007.05.26.08.44.00.46641@removeit.geloescht.net>
You need a prism for that. Prisms work with splines, but fortunately the
logo looks like it was created with vector graphics. If you have access to
the source vector graphic you could try to export it into Inkscape*, a
program that can export POV-prisms. Otherwise you'd have to play with
Inkscape's bitmap vectorising. After you exported it to a prism you should
fix some things in the resulting file, like the texture and so on.

*Inkscape is a great free vector graphics editor. See
http://www.inkscape.org/ for more infos.


Post a reply to this message

From: Jim Charter
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 04:54:57
Message: <4657f5e1@news.povray.org>
Here are some brief results using media and height_field techniques

code on p.b.scene-files


Post a reply to this message


Attachments:
Download '009.jpg' (16 KB) Download '010.jpg' (17 KB) Download 'dg.png' (4 KB)

Preview of image '009.jpg'
009.jpg

Preview of image '010.jpg'
010.jpg

Preview of image 'dg.png'
dg.png


 

From: Marc
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 04:56:14
Message: <4657f62e$1@news.povray.org>

news: pan### [at] removeitgeloeschtnet...
> You need a prism for that. Prisms work with splines,

An alternative easy way is height_field.
Just save your alpha channel as an image and use it to make a height_field 
that you texture with your all opaque logo image.
Set the water_level to open the wanted parts.
http://www.povray.org/documentation/view/3.6.1/279/

Marc


Post a reply to this message

From: Kenneth
Subject: Re: Is this what's SUPPOSED to happen?? [3 images ~120kb total]
Date: 26 May 2007 05:10:01
Message: <web.4657f490daf12e9d9dafebf60@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> I think you have the correct concept that the image_map texture is
> indeed "extruded" along the z axis.
> However to POV the box is just six defined surfaces, so it only
> evaluates the texture where it intersects with any of those six surfaces.

I would add that textures, by definition, are only "surface" things.  What
you were expecting would be considered the "interior" of the object...the
extrusion *through* the box. Normally, when you carve away an object,
you still see the texture on the new surface. But here, the alpha-channel
transparency is, I believe, "altering" or overriding that (though that
may not be a proper explanation for what's happening.)

Awhile back, I posted an experiment using MEDIA to get what looks like a
solid extrusion from an alpha-channel image_map, same as your idea.
It would do what you're looking for, I believe. Coding it is a bit
complex, though.  Here's the link...

 http://news.povray.org/povray.binaries.images/thread/%3Cweb.4436e54a72fe66658ad7a9060%40news.povray.org%3E/

It appears that my test image is no longer showing there as a thumbnail, but
you can still download it.

An alternate idea would be to make a height_field from your image (though it
would have an open "back," since a heightfield is just a surface or shell.)

Ken W.


Post a reply to this message

From: Dayv Helfrich
Subject: Re: Thank you, everyone who responded
Date: 26 May 2007 18:24:34
Message: <4658b3a2$1@news.povray.org>
I think I'll try the height field.  I should have thought of that.  I've 
tried in the past to plot out a prism with the right shape, but I've failed 
miserably.  And no, I don't have access to the original vector graphic.  I'd 
dare say no one in my company does anymore (if they ever did... I'm thinking 
we  bought this somewhere... I've seen several other companies with the same 
initials with the EXACT same logo shape, just in different colors or with 
different embellishments... like the triangle in the D in ours... )

What confused me was the doc's description of the image_map:

"With image maps you should imagine that each pixel is a long, thin, square, 
colored rod that extends parallel to the z-axis. The image is made from rows 
and columns of these rods bundled together and the object is then carved 
from the bundle."

I figured a clean edge parallel to the z axis would be solid.  But I get it 
now, since there's no surface at those points there's no image.

Thanks everyone for the explanations.  I haven't POV'd anything in quite 
some time.  I was never an expert by any means, but now I'm even more out of 
practice (I had to look up the syntax for the plane to refresh my memory!).



"Marc" <jac### [at] wanadoofr> wrote in message 
news:4657f62e$1@news.povray.org...
>

> de news: pan### [at] removeitgeloeschtnet...
>> You need a prism for that. Prisms work with splines,
>
> An alternative easy way is height_field.
> Just save your alpha channel as an image and use it to make a height_field 
> that you texture with your all opaque logo image.
> Set the water_level to open the wanted parts.
> http://www.povray.org/documentation/view/3.6.1/279/
>
> Marc
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.