POV-Ray : Newsgroups : povray.general : Transparent PNGs Server Time
18 Apr 2024 07:36:26 EDT (-0400)
  Transparent PNGs (Message 11 to 20 of 44)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: Transparent PNGs
Date: 9 Oct 2017 10:05:01
Message: <web.59db8201c5de9ff4c437ac910@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> Which brings me to the next problem, how to
> recreate one of the Roman-style galley oars. it is too easy just to use
> a long cylinder with a flattened (thin-scaled) oval cylinder at the end.
> The transition between shaft and brad area was kinda smooth.

I'd start by posting a close-up / detailed image of what you want to do in 3D
(if you can't find an existing 3D model) and then I'm sure someone could
recommend a mesh-modeling, CSG, isosurface, or blob approach.


Post a reply to this message

From: Sven Littkowski
Subject: Re: Transparent PNGs
Date: 9 Oct 2017 14:04:27
Message: <59dbba2b@news.povray.org>
On 09.10.2017 10:04, Bald Eagle wrote:
> Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
>> Which brings me to the next problem, how to
>> recreate one of the Roman-style galley oars. it is too easy just to use
>> a long cylinder with a flattened (thin-scaled) oval cylinder at the end.
>> The transition between shaft and brad area was kinda smooth.
> 
> I'd start by posting a close-up / detailed image of what you want to do in 3D
> (if you can't find an existing 3D model) and then I'm sure someone could
> recommend a mesh-modeling, CSG, isosurface, or blob approach.
> 
> 
> 
> 
The very strange thing with me is, that I find it extremely hard to
model with WYSIWYG surfaces, but I find it totally easy to write scenes
with all the coordinates by myself and understand them. This is how I
got my huge spaceships done.

Okay, here is the sample photo. These oars have no real edges, every
corner has been rounded and smoothened. And even the edge between staff
and blade is kinda smoothened a bit.


---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message


Attachments:
Download 'oars.jpg' (245 KB)

Preview of image 'oars.jpg'
oars.jpg


 

From: Bald Eagle
Subject: Re: Transparent PNGs
Date: 9 Oct 2017 15:10:01
Message: <web.59dbc948c5de9ff4c437ac910@news.povray.org>
Sven Littkowski <I### [at] SvenLittkowskiname> wrote:

> The very strange thing with me is, that I find it extremely hard to
> model with WYSIWYG surfaces, but I find it totally easy to write scenes
> with all the coordinates by myself and understand them. This is how I
> got my huge spaceships done.

Yep, we all have our own ways of understanding and manipulating data.

> Okay, here is the sample photo. These oars have no real edges, every
> corner has been rounded and smoothened. And even the edge between staff
> and blade is kinda smoothened a bit.

CSG:
cylinder shaft
Cone tapered from shaft to near the end
flattened cones, slices of cones, or CSG parts of narrow rectangles for blades
flattened sphere or a box for the tip of the blade

If you look through the isosurface docs, you can come up with functions for all
of those primitives, their rotations and translations, and differences, and then
blob them together to get a totally smooth surface.
It sounds hard until you give it a go, and then it doesn't seem too bad.


Use the isosurface approximation or the (I believe very similar) Paul Nylander
mesh code to make an array of smooth_triangle vertices, and you could then
generate a mesh and save it.

'cause it sounds like you want to render a fleet of Roman vessels....


Post a reply to this message

From: Sven Littkowski
Subject: Re: Transparent PNGs
Date: 9 Oct 2017 17:02:52
Message: <59dbe3fc$1@news.povray.org>
On 09.10.2017 15:08, Bald Eagle wrote:
> Sven Littkowski <I### [at] SvenLittkowskiname> wrote:
> 
>> The very strange thing with me is, that I find it extremely hard to
>> model with WYSIWYG surfaces, but I find it totally easy to write scenes
>> with all the coordinates by myself and understand them. This is how I
>> got my huge spaceships done.
> 
> Yep, we all have our own ways of understanding and manipulating data.
> 
>> Okay, here is the sample photo. These oars have no real edges, every
>> corner has been rounded and smoothened. And even the edge between staff
>> and blade is kinda smoothened a bit.
> 
> CSG:
> cylinder shaft
> Cone tapered from shaft to near the end
> flattened cones, slices of cones, or CSG parts of narrow rectangles for b
lades
> flattened sphere or a box for the tip of the blade
> 
> If you look through the isosurface docs, you can come up with functions f
or all
> of those primitives, their rotations and translations, and differences, a
nd then
> blob them together to get a totally smooth surface.
> It sounds hard until you give it a go, and then it doesn't seem too bad.
> 
> 
> Use the isosurface approximation or the (I believe very similar) Paul Nyl
ander
> mesh code to make an array of smooth_triangle vertices, and you could the
n
> generate a mesh and save it.
> 
> 'cause it sounds like you want to render a fleet of Roman vessels....
> 
> 
I wished I had the skills to render an entire ship! I have all the
maritime archaeological knowledge, but not the skill to create such
shapes in any renderer. But this is a dream for more than 10 years...

For now, the oars only.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Thomas de Groot
Subject: Re: Transparent PNGs
Date: 10 Oct 2017 02:41:43
Message: <59dc6ba7@news.povray.org>
On 9-10-2017 14:00, Stephen wrote:
> On 09/10/2017 12:38, Thomas de Groot wrote:
>> It might be better to render as tga and later convert to png if 
>> necessary.
> 
> Is that one of those "Plant thy Mandrake when the moon is in Taurus and 
> waning gibbous.", things? :-P
> 
> 

LOL Yes, but then adapted to the digital world. Even so, I indeed 
recommend Mandrake over a Homunculus. ;-)

I seem to remember to have had problems generating transparent png 
images while I never had problems with tga.

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: Transparent PNGs
Date: 10 Oct 2017 03:27:29
Message: <59dc7661$1@news.povray.org>
On 10/10/2017 07:41, Thomas de Groot wrote:
> On 9-10-2017 14:00, Stephen wrote:
>> On 09/10/2017 12:38, Thomas de Groot wrote:
>>> It might be better to render as tga and later convert to png if 
>>> necessary.
>>
>> Is that one of those "Plant thy Mandrake when the moon is in Taurus 
>> and waning gibbous.", things? :-P
>>
>>
> 
> LOL Yes, but then adapted to the digital world. Even so, I indeed 
> recommend Mandrake over a Homunculus. ;-)
> 

Definitely Mandrake over Homunculus. Unless you are going to...



> I seem to remember to have had problems generating transparent png 
> images while I never had problems with tga.
> 

I recognised the form of the spell. I had the same problem donkey's 
years ago.
There was a time when PNGs behaved badly. I think it was not writing the 
Alpha values in the output.

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: Transparent PNGs
Date: 10 Oct 2017 03:34:52
Message: <59dc781c$1@news.povray.org>
On 10-10-2017 9:27, Stephen wrote:
> On 10/10/2017 07:41, Thomas de Groot wrote:
>> On 9-10-2017 14:00, Stephen wrote:
>>> On 09/10/2017 12:38, Thomas de Groot wrote:
>>>> It might be better to render as tga and later convert to png if 
>>>> necessary.
>>>
>>> Is that one of those "Plant thy Mandrake when the moon is in Taurus 
>>> and waning gibbous.", things? :-P
>>>
>>>
>>
>> LOL Yes, but then adapted to the digital world. Even so, I indeed 
>> recommend Mandrake over a Homunculus. ;-)
>>
> 
> Definitely Mandrake over Homunculus. Unless you are going to...

Yes, unless. ;-)

> 
> 
> 
>> I seem to remember to have had problems generating transparent png 
>> images while I never had problems with tga.
>>
> 
> I recognised the form of the spell. I had the same problem donkey's 
> years ago.
> There was a time when PNGs behaved badly. I think it was not writing the 
> Alpha values in the output.
> 

That must be the origin of my dim memory of ancient trouble...

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: Transparent PNGs
Date: 10 Oct 2017 08:26:43
Message: <59dcbc83$1@news.povray.org>
On 10/10/2017 08:34, Thomas de Groot wrote:
> On 10-10-2017 9:27, Stephen wrote:
>> On 10/10/2017 07:41, Thomas de Groot wrote:
>>> On 9-10-2017 14:00, Stephen wrote:
>>>> On 09/10/2017 12:38, Thomas de Groot wrote:
>>>>> It might be better to render as tga and later convert to png if 
>>>>> necessary.
>>>>
>>>> Is that one of those "Plant thy Mandrake when the moon is in Taurus 
>>>> and waning gibbous.", things? :-P
>>>>
>>>>
>>>
>>> LOL Yes, but then adapted to the digital world. Even so, I indeed 
>>> recommend Mandrake over a Homunculus. ;-)
>>>
>>
>> Definitely Mandrake over Homunculus. Unless you are going to...
> 
> Yes, unless. ;-)

Indeed.


> 
>>
>>
>>
>>> I seem to remember to have had problems generating transparent png 
>>> images while I never had problems with tga.
>>>
>>
>> I recognised the form of the spell. I had the same problem donkey's 
>> years ago.
>> There was a time when PNGs behaved badly. I think it was not writing 
>> the Alpha values in the output.
>>
> 
> That must be the origin of my dim memory of ancient trouble...
> 

I seem to remember Billboards were all the rage about that time.

-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: Transparent PNGs
Date: 10 Oct 2017 10:10:14
Message: <59dcd4c6$1@news.povray.org>
Am 10.10.2017 um 09:27 schrieb Stephen:

>> I seem to remember to have had problems generating transparent png
>> images while I never had problems with tga.
>>
> 
> I recognised the form of the spell. I had the same problem donkey's
> years ago.
> There was a time when PNGs behaved badly. I think it was not writing the
> Alpha values in the output.

If I may clarify:

PNG output in POV-Ray v3.6 had the alpha mode wrong - i.e. how the alpha
channel is supposed to interact with the colour channels.

The PNG specification mandates so-called "straight alpha", i.e. the
colour channels should hold the colour as if the image was fully opaque,
and blending should be done entirely by the display software, using
Alpha:(1-Alpha) as the ratio between stored colour and background. This
is akin to the way in which semi-transparent pigments are specified in
POV-Ray's SDL.

However, POV-Ray's internal computations yield colour channel values
that already take opacity into account, which is akin to so-called "gay
alph..." uh, I mean, "associated alpha" aka "premultiplied alpha", in
which the display software is only responsible for the background
portion of the blending, using 1:(1-Alpha) as the ratio between stored
colour and background.

POV-Ray v3.6 neglected the issue of alpha mode entirely: In file output
it directly wrote the computed colour values, thus always writing in
associated alpha mode (which happens to be wrong for PNG files). In file
input, on the other hand, it interpreted the colour values in much the
same way as in SDL, thus always reading in straight alpha mode (which
happens to be correct for PNG files but wrong for certain other files).

So not only was POV-Ray v3.6 in violation of the PNG file format specs,
it also was inconsistent in itself.

In POV-Ray v3.7, a proper alpha handling framework was implemented, and
the problem fixed for PNG files.


(Interestingly, even though the modes are referred to as "associated
alpha" and "straight alpha", it's not actually the alpha channel that's
different between the two modes -- the value stored is actually
identical for both modes -- but the colour channel.)


The advantage of "straight alpha" is that you can display an opaque
version of the image simply by ignoring the alpha channel.

The advantages of "associated alpha" are that (a) it takes less
computational effort to display, and (b) it can account for situations
where bright light is to be shown against a highly transparent
background (e.g. a transparent sphere with highlights).


Post a reply to this message

From: Thomas de Groot
Subject: Re: Transparent PNGs
Date: 11 Oct 2017 02:48:25
Message: <59ddbeb9$1@news.povray.org>
On 10-10-2017 14:26, Stephen wrote:
> On 10/10/2017 08:34, Thomas de Groot wrote:
>> On 10-10-2017 9:27, Stephen wrote:
>>> On 10/10/2017 07:41, Thomas de Groot wrote:
>>>> On 9-10-2017 14:00, Stephen wrote:
>>>>> On 09/10/2017 12:38, Thomas de Groot wrote:
>>>>>> It might be better to render as tga and later convert to png if 
>>>>>> necessary.
>>>>>
>>>>> Is that one of those "Plant thy Mandrake when the moon is in Taurus 
>>>>> and waning gibbous.", things? :-P
>>>>>
>>>>>
>>>>
>>>> LOL Yes, but then adapted to the digital world. Even so, I indeed 
>>>> recommend Mandrake over a Homunculus. ;-)
>>>>
>>>
>>> Definitely Mandrake over Homunculus. Unless you are going to...
>>
>> Yes, unless. ;-)
> 
> Indeed.

As you say.

> 
> 
>>
>>>
>>>
>>>
>>>> I seem to remember to have had problems generating transparent png 
>>>> images while I never had problems with tga.
>>>>
>>>
>>> I recognised the form of the spell. I had the same problem donkey's 
>>> years ago.
>>> There was a time when PNGs behaved badly. I think it was not writing 
>>> the Alpha values in the output.
>>>
>>
>> That must be the origin of my dim memory of ancient trouble...
>>
> 
> I seem to remember Billboards were all the rage about that time.
> 

Yes, and then it faded away. I wonder what will be next.. ;-)

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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