POV-Ray : Newsgroups : povray.newusers : Internal function Server Time
21 Dec 2024 08:14:27 EST (-0500)
  Internal function (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: kurtz le pirate
Subject: Internal function
Date: 18 Feb 2017 06:18:15
Message: <58a82d77$1@news.povray.org>
Hi,

How to convert old scene which uses internal function ?
POVRay 3.7 raise this error : Function 'internal(XX)' does not exist.



Thanks

-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: clipka
Subject: Re: Internal function
Date: 18 Feb 2017 07:33:32
Message: <58a83f1c$1@news.povray.org>
Am 18.02.2017 um 12:18 schrieb kurtz le pirate:

> How to convert old scene which uses internal function ?
> POVRay 3.7 raise this error : Function 'internal(XX)' does not exist.

Are you sure this is a genuine POV-Ray scene (as opposed to e.g. a
MegaPOV scene)? I'd be surprised if POV-Ray ever ditched any of its
inbuilt functions or renumbered them.


That said, in either case you'll have to:

1. Figure out what mathematical function the numeric code "XX" is
supposed to represent.

2. Replace the unsupported `internal` function with either:

2.a) The corresponding named function from `functions.inc` (if it exists).

2.b) A corresponding user-defined function.

2.c) A user-defined macro (if the function is used in a manner that it
can be replaced with a macro).


The trickiest part will be Step 1. There are essentially two ways you
can do this:

1.a) Examine the scene and guess what the function is.

1.b) Examine the source code of whatever version or derivative of
POV-Ray the scene was originally rendered with, to find out what the
internal function actually did.

We may be able to help you with this, but only if you disclose some more
details. For an attempt at 1.a) we'd probably need to see the entire
scene. For an attempt at 1.b) we'll need to know at least the internal
number of the function in question (the "XX" part), and anything that
might help to identify the version originally used.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Internal function
Date: 18 Feb 2017 09:25:59
Message: <58a85977$1@news.povray.org>
Le 18/02/2017 à 13:33, clipka a écrit :
> Are you sure this is a genuine POV-Ray scene (as opposed to e.g. a
> MegaPOV scene)? I'd be surprised if POV-Ray ever ditched any of its
> inbuilt functions or renumbered them.
> ...
> [snip]
>

Thanks for your help, and yes, it's a POVRay scene.
Here the begin of the code :

// Persistence of Vision Ray Tracer Scene Description File
// File: mb_basic.pov
// Vers: 3.6, 3.7
// Desc: Basic Scene Example
// Date: 12/18/09
// Auth: David Wagner
// Cite: http://www.skytopia.com/project/fractal/2mandelbulb.html

#version 3.6;

#include "colors.inc"

#declare f_mandelbulb=function{internal(79)};

global_settings {
   assumed_gamma 1.0
   }
...
...

I had already looked in 'functions.inc' and 79 is not defined in the 
file. Last is 78, f_noise_generator :(



-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: William F Pokorny
Subject: Re: Internal function
Date: 18 Feb 2017 09:39:31
Message: <58a85ca3$1@news.povray.org>
On 02/18/2017 09:25 AM, kurtz le pirate wrote:
> Le 18/02/2017 à 13:33, clipka a écrit :
>> Are you sure this is a genuine POV-Ray scene (as opposed to e.g. a
>> MegaPOV scene)? I'd be surprised if POV-Ray ever ditched any of its
>> inbuilt functions or renumbered them.
>> ...
>> [snip]
>>
>
> Thanks for your help, and yes, it's a POVRay scene.
> Here the begin of the code :
>
> // Persistence of Vision Ray Tracer Scene Description File
> // File: mb_basic.pov
> // Vers: 3.6, 3.7
> // Desc: Basic Scene Example
> // Date: 12/18/09
> // Auth: David Wagner
> // Cite: http://www.skytopia.com/project/fractal/2mandelbulb.html
>
> #version 3.6;
>
> #include "colors.inc"
>
> #declare f_mandelbulb=function{internal(79)};
>
> global_settings {
>   assumed_gamma 1.0
>   }
> ...
> ...
>
> I had already looked in 'functions.inc' and 79 is not defined in the
> file. Last is 78, f_noise_generator :(
>
>
>
If I recall correctly, David was running his own patched version of 
POV-Ray where he added the additional function himself. You would need 
to do the same I guess.

Bill P.


Post a reply to this message

From: Stephen
Subject: Re: Internal function
Date: 18 Feb 2017 09:57:02
Message: <58a860be$1@news.povray.org>
On 2/18/2017 2:25 PM, kurtz le pirate wrote:
> Le 18/02/2017 à 13:33, clipka a écrit :
>> Are you sure this is a genuine POV-Ray scene (as opposed to e.g. a
>> MegaPOV scene)? I'd be surprised if POV-Ray ever ditched any of its
>> inbuilt functions or renumbered them.
>> ...
>> [snip]
>>
>
> Thanks for your help, and yes, it's a POVRay scene.
> Here the begin of the code :
>
> // Persistence of Vision Ray Tracer Scene Description File
> // File: mb_basic.pov
> // Vers: 3.6, 3.7
> // Desc: Basic Scene Example
> // Date: 12/18/09
> // Auth: David Wagner
> // Cite: http://www.skytopia.com/project/fractal/2mandelbulb.html
>
> #version 3.6;
>
> #include "colors.inc"
>
> #declare f_mandelbulb=function{internal(79)};
>
> global_settings {
>    assumed_gamma 1.0
>    }
> ....
> ....
>
> I had already looked in 'functions.inc' and 79 is not defined in the
> file. Last is 78, f_noise_generator :(
>
>
>
Have a look at these threads:

http://news.povray.org/povray.general/thread/%3C4b2c7c62$1@news.povray.org%3E/?ttop=385585&toff=600

http://news.povray.org/povray.binaries.scene-files/thread/%3C4b3c8167@news.povray.org%3E/



-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: Internal function
Date: 18 Feb 2017 18:45:38
Message: <58a8dca2$1@news.povray.org>
Am 18.02.2017 um 15:25 schrieb kurtz le pirate:
> Le 18/02/2017 à 13:33, clipka a écrit :
>> Are you sure this is a genuine POV-Ray scene (as opposed to e.g. a
>> MegaPOV scene)? I'd be surprised if POV-Ray ever ditched any of its
>> inbuilt functions or renumbered them.
>> ...
>> [snip]
>>
> 
> Thanks for your help, and yes, it's a POVRay scene.
> Here the begin of the code :
...
> #declare f_mandelbulb=function{internal(79)};

Ah! The famous Mandelbulb function!

I'm sorry, but it is /not/ really a POV-Ray scene: It is a scene for a
special /patched/ version.

The other fellows' posts might provide useful pointers.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Internal function
Date: 19 Feb 2017 02:30:10
Message: <58a94982$1@news.povray.org>
Le 19/02/2017 à 00:45, clipka a écrit :

>
> The other fellows' posts might provide useful pointers.
>

OK, Thanks...




-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Internal function
Date: 19 Feb 2017 03:15:01
Message: <web.58a95371c68401151bab66820@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:
> Le 18/02/2017 à 13:33, clipka a écrit :
> > Are you sure this is a genuine POV-Ray scene (as opposed to e.g. a
> > MegaPOV scene)? I'd be surprised if POV-Ray ever ditched any of its
> > inbuilt functions or renumbered them.
> > ...
> > [snip]
> >
>
> Thanks for your help, and yes, it's a POVRay scene.
> Here the begin of the code :
>
> // Persistence of Vision Ray Tracer Scene Description File
> // File: mb_basic.pov
> // Vers: 3.6, 3.7
> // Desc: Basic Scene Example
> // Date: 12/18/09
> // Auth: David Wagner
> // Cite: http://www.skytopia.com/project/fractal/2mandelbulb.html
>
> #version 3.6;
>
> #include "colors.inc"
>
> #declare f_mandelbulb=function{internal(79)};

Note that the documentation is very clear on the use of "internal" - do not,
ever, use it directly in your scene. Use functions.inc .


Post a reply to this message

From: Bald Eagle
Subject: Re: Internal function
Date: 21 Feb 2017 07:55:01
Message: <web.58ac385bc6840115c437ac910@news.povray.org>
"Thorsten Froehlich" <nomail@nomail> wrote:

> Note that the documentation is very clear on the use of "internal" - do not,
> ever, use it directly in your scene. Use functions.inc .

so then,

#macro WorstMacroEver (Variable)
global_settings {
     assumed gama 2.2
}
#declare Mangled = Variable * internal(666);
Mangled;
#end

would not be recommended practice?

:D


Post a reply to this message

From: Stephen
Subject: Re: Internal function
Date: 21 Feb 2017 09:28:33
Message: <58ac4e91$1@news.povray.org>
On 2/21/2017 12:53 PM, Bald Eagle wrote:
> "Thorsten Froehlich" <nomail@nomail> wrote:
>
>> Note that the documentation is very clear on the use of "internal" - do not,
>> ever, use it directly in your scene. Use functions.inc .
>
> so then,
>
> #macro WorstMacroEver (Variable)
> global_settings {
>       assumed gama 2.2
> }
> #declare Mangled = Variable * internal(666);
> Mangled;
> #end
>
> would not be recommended practice?
>
> :D
>
>

Except on Soul Cake Tuesday. ;)




-- 

Regards
     Stephen


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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