POV-Ray : Newsgroups : povray.unofficial.patches : Stereoscopic camera patch Server Time
29 Feb 2024 20:17:47 EST (-0500)
  Stereoscopic camera patch (Message 1 to 8 of 8)  
From: Dave Bodenstab
Subject: Stereoscopic camera patch
Date: 15 Nov 2007 18:50:42
Message: <473cdb52@news.povray.org>
Here is Paul Bourke's stereoscopic camera patch for povray 3.6.1
which I have modified to have povray automatically render both the
left and right images.  Combined with an appropriate Post_Frame_Command
(included), a red/cyan anaglyph is produced automatically.  For an
animation, an appropriate Post_Scene_Command (included) can generate
the animation.

See the thread in povray.general (Stereoscopic camera) begun 10/28/07.

Dave Bodenstab


Post a reply to this message


Attachments:
Download 'us-ascii' (21 KB)

From: alphaQuad
Subject: Re: Stereoscopic camera patch
Date: 27 Dec 2007 13:05:00
Message: <web.4773e8dc3835376ebdaa378b0@news.povray.org>
If anyone knows the logic behind this parse error  (assuming I patched it right)
I might be awhile on this one. Stereoscopic-patch/megapov: Anyone tried this
yet?


keywords colored reserved

sky49_3d.pov  Line: 502
File Context (5 lines):
    stereoscopic
    zeroparallax
Parse Error: No matching } in 'camera', zeroparallax found instead

stereoscopic patch takes about 30 minutes to paste by searching adjacent line
(not line # as megapov is way off by now)
and works fine with povray 3.6 source. (11-file patch)






not the problem but something to think about if trying this patch with mpov:



Conflict with NTH_OUTPUT_FILE_NAME_PATCH (renderio.cpp)
params = Parse_Float() and opts.FrameSeq.FrameNumber

number_string never gets Parse_Float() the way I did this.
(still needs solution, if !0 is passed goes stereoscopic R/L)
ini animation bmps still number ok, apparently not part of
NTH_OUTPUT_FILE_NAME_PATCH

void setup_output_file_name(int stereoview)
{
/*#ifdef NTH_OUTPUT_FILE_NAME_PATCH
setup_nth_output_file_name(opts.FrameSeq.FrameNumber);
}
void setup_nth_output_file_name(int n)
{
#endif */

AND
    sprintf(number_string, "%0*d", opts.FrameSeq.FrameNumWidth,
 //#ifdef NTH_OUTPUT_FILE_NAME_PATCH
// n
//#else
opts.FrameSeq.FrameNumber
//#endif
);

USE setup_output_file_name() NOT setup_nth_output_file_name()
(parsestr.cpp)
#ifdef NTH_OUTPUT_FILE_NAME_PATCH
    CASE (OUTPUT_FILENAME_TOKEN)
      parseUnofficialFeature(110);
      GET (LEFT_PAREN_TOKEN);
      setup_output_file_name((int)Parse_Float());
      New = String_To_UCS2(opts.Output_Numbered_Name, false);
      setup_output_file_name(opts.FrameSeq.FrameNumber);
      GET (RIGHT_PAREN_TOKEN);
      EXIT
    END_CASE
#endif


Post a reply to this message

From: alphaQuad
Subject: Re: Stereoscopic camera patch
Date: 27 Dec 2007 18:20:00
Message: <web.477431e43835376e6d912ba0@news.povray.org>
> Conflict with NTH_OUTPUT_FILE_NAME_PATCH (renderio.cpp)

resolved completely by giving it its own function,
no reason these 2 have to share


as expected stereoscopic parse error still persists, argh
ming=no debugger,


I foresee a week of writing debug code being this unfamiliar with it ALL
(4meg of compiled logic!)

someone should make the stereoscopic-patch for megapov.

ya someone should do that.


Post a reply to this message

From: alphaQuad
Subject: Re: Stereoscopic camera patch
Date: 29 Dec 2007 00:10:00
Message: <web.4775d5623835376e3e9fb4eb0@news.povray.org>
> someone should make the stereoscopic-patch for megapov.


ok there has been no error. I've patched Megapov like all other patches with a
switch:

  #ifdef PATCHES_BY_PAUL_BOURKE
    #define STEREOSCOPIC_PATCH
  #endif  //PATCHES_BY_PAUL_BOURKE

I even turned off MEGAPOV_MASTER_SWITCH
but left STEREOSCOPIC_PATCH on.


says at the TOP:patches.h
"from Persistence of Vision(tm) Ray Tracer version 3.6."

"version 3.6." This SHOULD be working!

File Context (5 lines):
    stereoscopic
    zeroparallax
Parse Error: No matching } in 'camera', zeroparallax found instead


If anyone is interested in getting this already patched code
(because you think you can debug it), contact me.
aQ

note this patched worked when applied to pov3.6.? (thefile had no v#)
crap now I dont know! povwin_s.zip 5,008,527 bytes date: 11/25/07
(dir in the zip is povwin-3.6\)


readme:
(If you have in fact installed it ensure it is the same version
as the source code you have compiled, as the DLL names will change between v3.60
and v3.61).


Post a reply to this message

From: alphaQuad
Subject: Re: Stereoscopic camera patch
Date: 30 Dec 2007 15:40:01
Message: <web.477801223835376eb65ac5f90@news.povray.org>
> readme:
> (If you have in fact installed it ensure it is the same version
> as the source code you have compiled, as the DLL names will change between v3.60
> and v3.61).



I saw "not updated for 3.6.1 and win64" on the dl page, so what is this source??

everyone keeps saying 3.6.1 like at the beginning of this thread

note this patched worked when applied to pov3.6.? (thefile had no v#)
crap now I dont know! povwin_s.zip 5,008,527 bytes date: 11/25/07
(dir in the zip is povwin-3.6\)


does anyone really know for sure?


Post a reply to this message

From: Dave Bodenstab
Subject: Re: Stereoscopic camera patch
Date: 31 Dec 2007 17:21:12
Message: <47796B55.8000904@sbcglobal.net>
alphaQuad wrote:
>> readme:
>> (If you have in fact installed it ensure it is the same version
>> as the source code you have compiled, as the DLL names will change between v3.60
>> and v3.61).
> 
> 
> 
> I saw "not updated for 3.6.1 and win64" on the dl page, so what is this source??
> 
> everyone keeps saying 3.6.1 like at the beginning of this thread
> 
> note this patched worked when applied to pov3.6.? (thefile had no v#)
> crap now I dont know! povwin_s.zip 5,008,527 bytes date: 11/25/07
> (dir in the zip is povwin-3.6\)
> 
> 
> does anyone really know for sure?
> 

I grabbed the source directly from this link when applying Mr. Bourke's and my
patches:

   ftp://ftp.povray.org/pub/povray/Official/Unix/povray-3.6.1.tar.bz2


Post a reply to this message

From: alphaQuad
Subject: Re: Stereoscopic camera patch
Date: 7 Jan 2008 11:25:00
Message: <web.478250d43835376edb67f4fb0@news.povray.org>
Dave Bodenstab <dav### [at] sbcglobalnet> wrote:

> I grabbed the source directly from this link when applying Mr. Bourke's and my
patches:
>
>    ftp://ftp.povray.org/pub/povray/Official/Unix/povray-3.6.1.tar.bz2


I found winmerge lastnight and had a look at the unix code.

Here is the first render patch I found. The header should stay until the patch
to remove it.

Maybe should start a new thread -windows source patch upgrades- or something
like that, if I can isolate more.

Is there another list of changes?
http://www.povray.org/download/features/3.6.1.php


unclippedcolor.patch.txt (chormann)

--- F:/povray-3.6/source/render.cpp Sun Jul 18 05:16:26 2004
+++ F:/povray-3.6.1/source/render.cpp Mon Aug 02 18:11:38 2004
@@ -26,10 +26,10 @@
  * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins.
  *---------------------------------------------------------------------------
  * $File: //depot/povray/3.6-release/source/render.cpp $
- * $Revision: #2 $
- * $Change: 2939 $
- * $DateTime: 2004/07/04 13:43:26 $
- * $Author: root $
+ * $Revision: #4 $
+ * $Change: 3032 $
+ * $DateTime: 2004/08/02 18:43:41 $
+ * $Author: chrisc $
  * $Log$
  *****************************************************************************/

@@ -38,7 +38,6 @@

 #include "frame.h"
 #include "vector.h"
-#include "povproto.h"
 #include "bbox.h"
 #include "chi2.h"
 #include "colour.h"
@@ -1446,7 +1445,7 @@
   int x, y, xx, xxx, yy, skip_odd_lines;
   int sub_pixel_size, antialias_line = true;
   long size;
-  COLOUR clippedColour, unclippedColour;
+  COLOUR unclippedColour;
   PIXEL *First_Row, *Last_Row, *TempRow;
   PIXEL **Block;
   PIXEL TempPixel;
@@ -1591,9 +1590,7 @@

       POV_PRE_PIXEL (x, Current_Line_Number, unclippedColour)
       trace_sub_pixel(1, Block, x, Current_Line_Number, 0, 0, sub_pixel_size,
sub_pixel_size, sub_pixel_size, unclippedColour, antialias_line);
-      Clip_Colour(clippedColour, unclippedColour);
-      gamma_correct(clippedColour);
-      POV_POST_PIXEL (x, Current_Line_Number, clippedColour)
+      POV_POST_PIXEL (x, Current_Line_Number, unclippedColour)

       /* Do histogram stuff. */

@@ -1604,12 +1601,12 @@

       /* Store colour in current line */

-      Assign_Colour(Current_Line[x], clippedColour);
+      Assign_Colour(Current_Line[x], unclippedColour);

       /* Display pixel */
       POV_ASSIGN_PIXEL_UNCLIPPED (x, Current_Line_Number, unclippedColour)
-      plot_pixel(x, Current_Line_Number, clippedColour);
-      POV_ASSIGN_PIXEL (x, Current_Line_Number, clippedColour)
+      plot_pixel(x, Current_Line_Number, unclippedColour);
+      POV_ASSIGN_PIXEL (x, Current_Line_Number, unclippedColour)

       /* Store current block in rows */

@@ -2114,8 +2111,6 @@
   /* Average pixel's color. */
   Scale_Colour(result,result,(1.0/samples));

-  Clip_Colour(result, result);
-  gamma_correct(result);
 }


@@ -2451,7 +2446,8 @@

         Trace(Ray, C, 1.0);

-        Clip_Colour(C, C);
+        /* Commented out Jul 2004 C.H. */
+        /*Clip_Colour(C, C);*/

         Add_Colour(Colour, Colour, C);
       }
@@ -2589,7 +2585,6 @@
 * DESCRIPTION
 *
 *   Trace a primary ray regarding focal blur and vista buffer.
-*   The color of the pixel is clipped and the number of pixels is increased.
 *
 * CHANGES
 *
@@ -2645,9 +2640,6 @@
   }

   Assign_Colour(ColourClipped, ColourUnclipped);
-
-  Clip_Colour(ColourClipped, ColourUnclipped);
-  gamma_correct(ColourClipped);

   /* Do histogram stuff. */
   if (opts.histogram_on)


Post a reply to this message

From: alphaQuad
Subject: Re: Stereoscopic camera patch
Date: 7 Jan 2008 20:45:00
Message: <web.4782d4773835376edb67f4fb0@news.povray.org>
previous patch was 4 files, not one of render.cpp

moving on now to:

source files patch of 3.6 to 3.6.1
 <web.4782d1ed9870e68fdb67f4fb0@news.povray.org>

did everything but the povproto.h removal. it compiles and runs.

why is this loop needed?


--- tokenize.cpp Sun Jul 18 05:16:28 2004
+++ tokenize.cpp Mon Aug 02 18:11:38 2004
IN: void Terminate_Tokenizer()



+    for(int i = 0; i <= CS_Index; i++)
+    {
+      if((Cond_Stack[i].Cond_Type == INVOKING_MACRO_COND) &&
(Cond_Stack[i].Macro_Same_Flag == false))
+        delete Cond_Stack[i].Macro_File;
+    }


Post a reply to this message

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