POV-Ray : Newsgroups : povray.unix : transparent preview window and allscene.sh Server Time
28 Mar 2024 18:50:44 EDT (-0400)
  transparent preview window and allscene.sh (Message 1 to 10 of 10)  
From: peter
Subject: transparent preview window and allscene.sh
Date: 5 Sep 2008 15:25:00
Message: <web.48c18687b44d0a7261873eb60@news.povray.org>
Hello,
I worked with POV-Ray a few years ago and now I will be teaching a POV-Ray class
soon, so I installed it again and tried to work with it. But some things don't
work right.

1. In the preview window black comes up as transparent, so the underlying
windows are visible. That is of course anoying.

2. The shell script allscene.sh aborts with a lot of error messages:



test: 67: ==: unexpected operator
test: 68: ==: unexpected operator
test: 69: ==: unexpected operator
test: 70: ==: unexpected operator
test: 71: ==: unexpected operator
------------------------------------------------------
  the sample scene render script could not determine
  the location where POV-Ray is installed.  Make sure
  POV-Ray 3.6 has been correctly installed on this
  computer.  If you continue the script will try to
  the scenes from the current directory.

read: 90: Illegal option -n
------------------------------------------------------
test: 102: ==: unexpected operator
test: 103: ==: unexpected operator
test: 104: ==: unexpected operator
test: 105: ==: unexpected operator
test: 106: ==: unexpected operator

test: 136: ==: unexpected operator
test: 137: ==: unexpected operator
test: 138: ==: unexpected operator
test: 139: ==: unexpected operator
test: 140: ==: unexpected operator
test: 141: ==: unexpected operator



Now I haven't done any shell programming yet, so I have no idea what this is
about.

Any ideas?

Peter


Post a reply to this message

From: Nicolas Calimet
Subject: Re: transparent preview window and allscene.sh
Date: 5 Sep 2008 20:41:29
Message: <48c1d1b9$1@news.povray.org>
> 1. In the preview window black comes up as transparent, so the underlying
> windows are visible. That is of course anoying.

	Which version of POV-Ray are you using?  If 3.6.x, are you talking about
the background color of the preview display or any black pixel in the rendered
image?

> 2. The shell script allscene.sh aborts with a lot of error messages:
>
> test: 67: ==: unexpected operator

	The "==" is unfortunately specific to bash (bashism) and should not
be used in here.  This problem has been reported recently for the POV-Ray
package in Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489644).
The workaround is to edit the faulty shell script(s) and replace the double
equal sign by a single one, i.e. "==" becomes "=" (without quotes).

	- NC


Post a reply to this message

From: Dan Connelly
Subject: Re: transparent preview window and allscene.sh
Date: 30 Sep 2008 13:57:02
Message: <48e2686e$1@news.povray.org>
Nicolas Calimet wrote:
>> 1. In the preview window black comes up as transparent, so the underlying
>> windows are visible. That is of course anoying.
> 
>     Which version of POV-Ray are you using?  If 3.6.x, are you talking 
> about
> the background color of the preview display or any black pixel in the 
> rendered
> image?

I have the same issue: the preview display is OR'ed with background pixels.

preview on black: okay
preview on white: invisible

Dan


Post a reply to this message

From: Dan Connelly
Subject: Re: transparent preview window and allscene.sh
Date: 30 Sep 2008 21:31:01
Message: <48e2d2d5$1@news.povray.org>
Dan Connelly wrote:
> Nicolas Calimet wrote:
>>> 1. In the preview window black comes up as transparent, so the 
>>> underlying
>>> windows are visible. That is of course anoying.
>>
>>     Which version of POV-Ray are you using?  If 3.6.x, are you talking 
>> about
>> the background color of the preview display or any black pixel in the 
>> rendered
>> image?
> 
> I have the same issue: the preview display is OR'ed with background pixels.
> 
> preview on black: okay
> preview on white: invisible
> 
> Dan

I managed to kluge a fix to this by suppressing alpha values in the SetPixel and
SetPixelScaled routines.  I'm not sure why one would want to write alpha to the X
display.

These diffs are to the 3.7 beta 28 code.

% diff -c disp_sdl.cpp*
*** disp_sdl.cpp	Tue Sep 30 18:25:52 2008
--- disp_sdl.cpp~	Mon Aug  4 09:11:02 2008
***************
*** 298,306 ****
   	{
   		Uint8 *p = (Uint8 *) m_display->pixels + y * m_display->pitch + x *
m_display->format->BytesPerPixel;

! 		// Uint32 sdl_col = SDL_MapRGBA(m_display->format, colour.red, colour.green,
colour.blue, colour.alpha);
! 		// djconnel: 30 Sep 2008:
! 		Uint32 sdl_col = SDL_MapRGBA(m_display->format, colour.red, colour.green,
colour.blue, (unsigned char) 0);

   		switch (m_display->format->BytesPerPixel)
   		{
--- 298,304 ----
   	{
   		Uint8 *p = (Uint8 *) m_display->pixels + y * m_display->pitch + x *
m_display->format->BytesPerPixel;

! 		Uint32 sdl_col = SDL_MapRGBA(m_display->format, colour.red, colour.green,
colour.blue, colour.alpha);

   		switch (m_display->format->BytesPerPixel)
   		{
***************
*** 346,354 ****
   		r = (r*m_PxCount[ofs] + colour.red  ) / (m_PxCount[ofs]+1);
   		g = (g*m_PxCount[ofs] + colour.green) / (m_PxCount[ofs]+1);
   		b = (b*m_PxCount[ofs] + colour.blue ) / (m_PxCount[ofs]+1);
! 		// djconnel: 30 Sep 2008
! 		//a = (a*m_PxCount[ofs] + colour.alpha) / (m_PxCount[ofs]+1);
! 		a = 0;

   		Uint32 sdl_col = SDL_MapRGBA(m_display->format, r, g, b, a);

--- 344,350 ----
   		r = (r*m_PxCount[ofs] + colour.red  ) / (m_PxCount[ofs]+1);
   		g = (g*m_PxCount[ofs] + colour.green) / (m_PxCount[ofs]+1);
   		b = (b*m_PxCount[ofs] + colour.blue ) / (m_PxCount[ofs]+1);
! 		a = (a*m_PxCount[ofs] + colour.alpha) / (m_PxCount[ofs]+1);

   		Uint32 sdl_col = SDL_MapRGBA(m_display->format, r, g, b, a);


Post a reply to this message

From: Larry Hudson
Subject: Re: transparent preview window and allscene.sh
Date: 30 Sep 2008 22:11:41
Message: <48e2dc5d$1@news.povray.org>
Dan Connelly wrote:
> Nicolas Calimet wrote:
> 
>>> 1. In the preview window black comes up as transparent, so the 
>>> underlying
>>> windows are visible. That is of course anoying.
>>
>>
>>     Which version of POV-Ray are you using?  If 3.6.x, are you talking 
>> about
>> the background color of the preview display or any black pixel in the 
>> rendered
>> image?
> 
> 
> I have the same issue: the preview display is OR'ed with background pixels.
> 
> preview on black: okay
> preview on white: invisible
> 
> Dan

I had the same problem when I recently intalled Fedora 9 and loaded the 
Nvidia driver (from Nvidia).  But disabling the "real" Nvidia driver and 
going back to the generic Linux version it displayed properly.  Looks 
like a video driver problem.  This was with standard POV-Ray 3.6.1.

Currently I'm still mainly using an earlier Fedora and just playing with 
9 before deciding to switch to it or not.  (I like to check out 
different Linux distros -- right now I have 6 different distros 
installed.  Long story and off-topic to describe my system.)   :-)

      -=- Larry -=-


Post a reply to this message

From: Nicolas Calimet
Subject: Re: transparent preview window and allscene.sh
Date: 1 Oct 2008 09:14:54
Message: <48e377ce$1@news.povray.org>
> Looks like a video driver problem.

	No, not a driver problem, but indeed a display bug in POV.  I suppose
running the driver from Nvidia activates a compositing window manager* for which
POV 3.6.x has no support yet.  IIRC the problem was first reported last year
under Gentoo, followed by a series of proposed bugfixes that I should review
once again.

	- NC

* at least the last ubuntu releases (e.g. 8.04) do so.


Post a reply to this message

From: Nicolas Calimet
Subject: Re: transparent preview window and allscene.sh
Date: 1 Oct 2008 09:16:43
Message: <48e3783b$1@news.povray.org>
> I managed to kluge a fix to this by suppressing alpha values

	OK, so this indeed should be again the compositing-window-manager-bug.

> SetPixel and SetPixelScaled routines.  I'm not sure why one would want 
> to write alpha to the X display.

	Don't know either  ;-)  I need to review that again.

	Thanks for reporting,
	- NC


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: transparent preview window and allscene.sh
Date: 1 Oct 2008 12:01:26
Message: <48e39ed6@news.povray.org>

> I had the same problem when I recently intalled Fedora 9 and loaded the 
> Nvidia driver (from Nvidia).  But disabling the "real" Nvidia driver and 
> going back to the generic Linux version it displayed properly.  Looks 
> like a video driver problem.  This was with standard POV-Ray 3.6.1.
> 

   I've also this problem with the Nvidia driver and Fedora 8, but it 
disappears using "-visual DirectColor" (on POV-Ray command line).

   Regards,

--
Jaime


Post a reply to this message

From: lessfield
Subject: Re: transparent preview window and allscene.sh
Date: 8 Oct 2008 15:45:01
Message: <web.48ed0cbe1ae3aba42b2b56d00@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:

> > I had the same problem when I recently intalled Fedora 9 and loaded the
> > Nvidia driver (from Nvidia).  But disabling the "real" Nvidia driver and
> > going back to the generic Linux version it displayed properly.  Looks
> > like a video driver problem.  This was with standard POV-Ray 3.6.1.
> >
>
>    I've also this problem with the Nvidia driver and Fedora 8, but it
> disappears using "-visual DirectColor" (on POV-Ray command line).
>
>    Regards,
>
> --
> Jaime


I have noticed this transparency problem on my flavor.
I am using ubuntu 8.04 pov3.6 w/ compiz .

My simple solution was to make a compiz window rule. "No ARGM visuals
class=Povray"

if you have compizconfig setting manager, ccsm, you can set this via the gui


Post a reply to this message

From: Dan Connelly
Subject: Re: transparent preview window and allscene.sh
Date: 20 Oct 2008 19:09:44
Message: <48fd0fb8@news.povray.org>
>   I've also this problem with the Nvidia driver and Fedora 8, but it 
> disappears using "-visual DirectColor" (on POV-Ray command line).
> 

The issue appears to be gone in Beta 29.  I'm not sure why.

Dan


Post a reply to this message

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