POV-Ray : Newsgroups : povray.binaries.images : Using "transmit all" with an image map Server Time
5 Nov 2024 20:17:01 EST (-0500)
  Using "transmit all" with an image map (Message 1 to 10 of 29)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Dave Blandston
Subject: Using "transmit all" with an image map
Date: 28 Dec 2022 03:55:00
Message: <web.63ac0323f59cfc766631b53a9334df62@news.povray.org>
Howdy folks,

I'm sure there's a very good reason that "transmit all" works the way that it
does with .png transparency, but it seems like it would be a lot more useful if
the file transparency would just carry over to the image map. Is there some
magical way to do that?

Here's a short demo file. (The image "ABBA.png" has an opaque round center and a
fully transparent border. Any .png file with transparency will do.)

Have a great day everyone!





#version 3.7;

global_settings {assumed_gamma 2.2}

camera {
   orthographic
   location <0, 0, -1>
   right image_width / image_height * x
   direction <0, 0, 1>
   look_at <0, 0, 0>
} //camera

#include "colors.inc"

background {Orange}

#local ImagePigment    = pigment {image_map {png "ABBA.png" gamma 2.2 map_type 0
once transmit all .7}}
#local ImageResolution = max_extent (ImagePigment);

object {
   box {<0, 0, 0> <1, 1, .01>}
   texture {pigment {ImagePigment} finish {emission .9} scale <1, 1.0000001, 1>}
   translate <-.5, -.5, 0>
   scale <1, ImageResolution.y / ImageResolution.x, 1>
} //object


Post a reply to this message


Attachments:
Download 'untitled.jpg' (138 KB)

Preview of image 'untitled.jpg'
untitled.jpg


 

From: Bald Eagle
Subject: Re: Using "transmit all" with an image map
Date: 28 Dec 2022 06:25:00
Message: <web.63ac26d2eaa53b9c1f9dae3025979125@news.povray.org>
Try taking a look here, and see if this doesn't address the issue:

Specifically, the "use_alpha" keyword.

https://wiki.povray.org/content/Reference:Image_Pattern

Merry Christmas,

- BW


Post a reply to this message

From: Alain Martel
Subject: Re: Using "transmit all" with an image map
Date: 28 Dec 2022 10:47:47
Message: <63ac6523$1@news.povray.org>
Le 2022-12-28 à 03:49, Dave Blandston a écrit :
> Howdy folks,
> 
> I'm sure there's a very good reason that "transmit all" works the way that it
> does with .png transparency, but it seems like it would be a lot more useful if
> the file transparency would just carry over to the image map. Is there some
> magical way to do that?
> 
> Here's a short demo file. (The image "ABBA.png" has an opaque round center and a
> fully transparent border. Any .png file with transparency will do.)
> 
> Have a great day everyone!
> 
> 
First, in this case, you don't need to use transmit all.
transmit all intent is to give transparency to an image that have NO 
alpha channel. It makes a picture with NO transparency transparent.

Try the same, but without transmit all.


Post a reply to this message

From: Dave Blandston
Subject: Re: Using "transmit all" with an image map
Date: 28 Dec 2022 16:15:00
Message: <web.63acb0c7eaa53b9c6631b53a9334df62@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Try taking a look here, and see if this doesn't address the issue:
>
> Specifically, the "use_alpha" keyword.
>
> https://wiki.povray.org/content/Reference:Image_Pattern
>
> Merry Christmas,
>
> - BW



Merry Christmas to you as well, sir!

This note in the documentation might explain what's going on with version 3.7:

/*
New as of version 3.8, using filter all and transmit all on an image file with
an alpha channel is now supported properly (requires #version 3.8 or higher).
*/

Maybe it's time to upgrade to version 3.8...


Post a reply to this message

From: Dave Blandston
Subject: Re: Using "transmit all" with an image map
Date: 28 Dec 2022 16:45:00
Message: <web.63acb85aeaa53b9c6631b53a9334df62@news.povray.org>
Alain Martel <kua### [at] videotronca> wrote:
> First, in this case, you don't need to use transmit all.
> transmit all intent is to give transparency to an image that have NO
> alpha channel. It makes a picture with NO transparency transparent.
>
> Try the same, but without transmit all.



Unfortunately, that generates an error message "Keyword 'transmit' cannot be
used with non color-mapped image."

I'm currently using a workaround, which is to apply the transparency with a
paint program. Since this is for an animation though, it means preparing many
images with varying transparency instead of one image that "transmit" can be
applied to.


Post a reply to this message

From: Le Forgeron
Subject: Re: Using "transmit all" with an image map
Date: 29 Dec 2022 07:22:59
Message: <63ad86a3$1@news.povray.org>
Le 28/12/2022 à 22:42, Dave Blandston a écrit :
> Alain Martel <kua### [at] videotronca> wrote:
>> First, in this case, you don't need to use transmit all.
>> transmit all intent is to give transparency to an image that have NO
>> alpha channel. It makes a picture with NO transparency transparent.
>>
>> Try the same, but without transmit all.
> 
> 
> 
> Unfortunately, that generates an error message "Keyword 'transmit' cannot be
> used with non color-mapped image."
> 
> I'm currently using a workaround, which is to apply the transparency with a
> paint program. Since this is for an animation though, it means preparing many
> images with varying transparency instead of one image that "transmit" can be
> applied to.
> 

color mapped images are image with a palette, not true/direct color.

For example, gif is always palette mapped, whereas jpeg is not.
Png is variable: it could have a palette or not.
("indexed": there is a palette; grayscale & truecolor: no palette)

This has nothing to do with transparency channel;
Gif can have it, png too, but I have never seen jpeg with it.

Alain suggested to not use "transmit all" for that picture, but to have 
the transparency directly from the picture. (without any modifier)

You would edit first the transparency in your favorite editor and voilà.


Post a reply to this message

From: Dave Blandston
Subject: Re: Using "transmit all" with an image map
Date: 29 Dec 2022 18:05:00
Message: <web.63ae1c54eaa53b9ce22848419334df62@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> color mapped images are image with a palette, not true/direct color.
>
> For example, gif is always palette mapped, whereas jpeg is not.
> Png is variable: it could have a palette or not.
> ("indexed": there is a palette; grayscale & truecolor: no palette)
>
> This has nothing to do with transparency channel;
> Gif can have it, png too, but I have never seen jpeg with it.
>
> Alain suggested to not use "transmit all" for that picture, but to have
> the transparency directly from the picture. (without any modifier)
>




Using a paint program to adjust the transparency is what I'm currently doing to
achieve the result that I want but it's not a perfect solution because of the
number of images involved. I'm using the "transmit all" feature to animate some
elements of a website mockup animation that fade in and fade out, such as
buttons and pop-ups and such. Images that don't require different levels of
transparency work great and I can use "transmit all," and only one copy of the
image needs to be made. But images that require part of the image to be fully
transparent exhibit the problem in the image posted above, so I can't use
"transmit all" and I have to make many copies of the image with the varying
levels of transparency which is very tedious. That's why I was curious if there
was a better way so I just thought I'd ask. I should have a sample animation
ready to post soon that will make this more clear. It's a fun project.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Using "transmit all" with an image map
Date: 29 Dec 2022 19:45:00
Message: <web.63ae3329eaa53b9cf0247f8189db30a9@news.povray.org>
"Dave Blandston" <nomail@nomail> wrote:
> ...

> Using a paint program to adjust the transparency is what I'm currently doing to
> achieve the result that I want but it's not a perfect solution because of the
> number of images involved. I'm using the "transmit all" feature to animate some
> elements of a website mockup animation that fade in and fade out, such as
> buttons and pop-ups and such. Images that don't require different levels of
> transparency work great and I can use "transmit all," and only one copy of the
> image needs to be made. But images that require part of the image to be fully
> transparent exhibit the problem in the image posted above, so I can't use
> "transmit all" and I have to make many copies of the image with the varying
> levels of transparency which is very tedious. That's why I was curious if there
> was a better way so I just thought I'd ask. I should have a sample animation
> ready to post soon that will make this more clear. It's a fun project.

Hi Dave

Have you considered using ImageMagick to adjust the transparency levels
in your images?

https://imagemagick.org

ImageMagick provides command line tools that can be used in shell scripts
to automate such time consuming tasks.

https://imagemagick.org/script/magick-script.php

Perhaps this post is relevant for solving your problem:

"Setting an image to 50% transparency"
https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=31549

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Dave Blandston
Subject: Re: Using "transmit all" with an image map
Date: 29 Dec 2022 20:30:00
Message: <web.63ae3ec1eaa53b9ce22848419334df62@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> Hi Dave
>
> Have you considered using ImageMagick to adjust the transparency levels
> in your images?
>
> https://imagemagick.org
>
> ImageMagick provides command line tools that can be used in shell scripts
> to automate such time consuming tasks.
>
> https://imagemagick.org/script/magick-script.php
>
> Perhaps this post is relevant for solving your problem:
>
> "Setting an image to 50% transparency"
> https://legacy.imagemagick.org/discourse-server/viewtopic.php?t=31549
>
> --
> Tor Olav
> http://subcube.com
> https://github.com/t-o-k



This looks like a really useful program. I see the copyright is 1999 but I seem
to recall a program with the same or similar name from even earlier than that,
which was a DOS command-line program that operated on images. I used it quite a
bit to convert graphics formats. I wonder if this is an evolution of that DOS
program. Thanks for pointing it out.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Using "transmit all" with an image map
Date: 29 Dec 2022 20:45:00
Message: <web.63ae4202eaa53b9cf0247f8189db30a9@news.povray.org>
"Dave Blandston" <nomail@nomail> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > Hi Dave
> >
> > Have you considered using ImageMagick to adjust the transparency levels
> > in your images?
> >
> > https://imagemagick.org
> ...

> This looks like a really useful program. I see the copyright is 1999 but I seem
> to recall a program with the same or similar name from even earlier than that,
> which was a DOS command-line program that operated on images. I used it quite a
> bit to convert graphics formats. I wonder if this is an evolution of that DOS
> program. Thanks for pointing it out.

:)

ImageMagick has been popular for a long time.

There's some history here:
https://en.wikipedia.org/wiki/ImageMagick

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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