POV-Ray : Newsgroups : povray.general : problems to render a script Server Time
1 Aug 2024 18:25:32 EDT (-0400)
  problems to render a script (Message 1 to 5 of 5)  
From: khayyam
Subject: problems to render a script
Date: 29 Jun 2005 09:00:00
Message: <web.42c29a67f3b38337f3fe8ce80@news.povray.org>
hello everybody,

I try to render the stones brickes from
http://www-public.tu-bs.de:8080/~y0013390/pov/wtunnel.html
the source code is here
http://www-public.tu-bs.de:8080/~y0013390/pov/wtunnel/wt_stb.pov

and with and without MegaPov, the parsing stops at the line
 #local fnBox = function { "superellipsoid", <Round,Round> }

with the error "Expected 'valid function expression', < found instead"

and I dont see why it doesn't work. could anyone say me what's wrong ?


Post a reply to this message

From: Christoph Hormann
Subject: Re: problems to render a script
Date: 29 Jun 2005 11:10:01
Message: <d9uden$dva$1@chho.imagico.de>
khayyam wrote:
> hello everybody,
> 
> I try to render the stones brickes from
> http://www-public.tu-bs.de:8080/~y0013390/pov/wtunnel.html
> the source code is here
> http://www-public.tu-bs.de:8080/~y0013390/pov/wtunnel/wt_stb.pov
> 
> and with and without MegaPov, the parsing stops at the line
>  #local fnBox = function { "superellipsoid", <Round,Round> }
> 
> with the error "Expected 'valid function expression', < found instead"
> 
> and I dont see why it doesn't work. could anyone say me what's wrong ?

That is certainly not correct.  Trying to render this scene with 
official POV-Ray results in:

File: wt_stb.pov  Line: 8
File Context (5 lines):

#version unofficial MegaPov
Parse Error: This file was created for an unofficial version and cannot 
work as-is with this official version.

Trying to render with MegaPOV 1.x results in:

File: wt_stb.pov  Line: 8
Parse Warning: This file was designed for (unofficial) MegaPov version 
0.7.  You are using version 1.2. Some features may have changed.

And i think this completely explains why it does not work.

You can fund some information how you can translate MegaPOV 0.x 
isosurface syntax in Mike's isosurface tutorial:

http://www.econym.demon.co.uk/isotut/

(seems currently offline)

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 03 May. 2005 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Mike Williams
Subject: Re: problems to render a script
Date: 29 Jun 2005 11:27:22
Message: <2cbuoDAT3rwCFwlI@econym.demon.co.uk>
Wasn't it khayyam who wrote:
>hello everybody,
>
>I try to render the stones brickes from
>http://www-public.tu-bs.de:8080/~y0013390/pov/wtunnel.html
>the source code is here
>http://www-public.tu-bs.de:8080/~y0013390/pov/wtunnel/wt_stb.pov
>
>and with and without MegaPov, the parsing stops at the line
> #local fnBox = function { "superellipsoid", <Round,Round> }
>
>with the error "Expected 'valid function expression', < found instead"
>
>and I dont see why it doesn't work. could anyone say me what's wrong ?


To render this code as supplied, make sure you're using a version of
MegaPOV that's below v1.0 because the function syntax changed completely
at that point. When isosurfaces were introduced into official POV, the
syntax was significantly different (more powerful and flexible) from
that used in MegaPOV v0.*.

MegaPOV v1.0 adopted the new syntax.


To get it to work in the current official POV and current MegaPOV you
need to:-

Add     #include "functions.inc"

Change  #local fnBox = function { "superellipsoid", <Round, Round> }
To      #local fnBox = function { f_superellipsoid(x,y,z,Round, Round) }

Change  function { fnBox(x/(Xsz*0.5), y/(Ysz*0.5), z/(Zsz*0.5)) -
        fnNoise((x+DX), (y+DY), (z+DZ)) }
To      function { - fnBox(x/(Xsz*0.5), y/(Ysz*0.5), z/(Zsz*0.5)) +
        fnNoise((x+DX), (y+DY), (z+DZ)).hf }

Delete  sign -1
Delete  method 2

1. The syntax of functions is different
2. There is no "sign" keyword, so you have to negate the function 
   equation.
3. Pigment functions in official POV return a colour instead of a float, 
   so the ".hf" is added to extract the same float that MegaPOV 0.* 
   would have.
4. There is no "method" keyword. There's only one isosurface solver 
   method, so it's not required.


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Mike Williams
Subject: Re: problems to render a script
Date: 29 Jun 2005 11:32:27
Message: <88$sgGAB8rwCFwHr@econym.demon.co.uk>
Wasn't it Christoph Hormann who wrote:
>You can fund some information how you can translate MegaPOV 0.x 
>isosurface syntax in Mike's isosurface tutorial:
>
>http://www.econym.demon.co.uk/isotut/
>
>(seems currently offline)

Looks like a technical problem at my ISP.

  Currently some customers may be experiencing problems accessing
  web sites and services hosted on homepages.demon.co.uk.
  Engineers are investigating.

Check back in an hour or two.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: khayyam
Subject: Re: problems to render a script
Date: 29 Jun 2005 12:10:00
Message: <web.42c2c7a246d7bd25f3fe8ce80@news.povray.org>
> Add     #include "functions.inc"
>
> Change  #local fnBox = function { "superellipsoid", <Round, Round> }
> To      #local fnBox = function { f_superellipsoid(x,y,z,Round, Round) }
>
> Change  function { fnBox(x/(Xsz*0.5), y/(Ysz*0.5), z/(Zsz*0.5)) -
>         fnNoise((x+DX), (y+DY), (z+DZ)) }
> To      function { - fnBox(x/(Xsz*0.5), y/(Ysz*0.5), z/(Zsz*0.5)) +
>         fnNoise((x+DX), (y+DY), (z+DZ)).hf }
>
> Delete  sign -1
> Delete  method 2
>

wonderful, thanks a lot


Post a reply to this message

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