POV-Ray : Newsgroups : povray.programming : Instruction "Input"? Server Time
20 Apr 2024 00:54:03 EDT (-0400)
  Instruction "Input"? (Message 1 to 2 of 2)  
From: RedGuff
Subject: Instruction "Input"?
Date: 31 Dec 2014 01:30:00
Message: <web.54a396ae6af716b2cfdd18850@news.povray.org>
Hello.
I'd like to enter parameters in my images and videos.
The POV or INC file should tell me message and ask me the value of the
parameter, during the render.
I can do it with a software that changes the POV or INC files, depending of the
parameters I write, but it's not perfect for games.
Something like this (see
https://fr.wikipedia.org/wiki/Liste_de_programme_Hello_world#POV-Ray for the
original POV):

#include "colors.inc"
camera {
    location <3, 1, -10>
    look_at <3,0,0>
}
light_source { <500,500,-1000> White }

#input{"What's your name?" name }  //          HERE!
//#declare name="RedGuff";         //          For test.

text {
    ttf "timrom.ttf" "Hello" 1, 0
    pigment { White }
}
text {
    ttf "timrom.ttf" name 1, 0
    pigment { Red }
    translate <0,-2,0>
}

Thanks.


Post a reply to this message

From: Le Forgeron
Subject: Re: Instruction "Input"?
Date: 2 Jan 2015 07:41:51
Message: <54a6920f$1@news.povray.org>
Le 31/12/2014 07:24, RedGuff a écrit :
> Hello.
> I'd like to enter parameters in my images and videos.
> The POV or INC file should tell me message and ask me the value of the
> parameter, during the render.
> I can do it with a software that changes the POV or INC files, depending of the
> parameters I write, but it's not perfect for games.
> Something like this (see
> https://fr.wikipedia.org/wiki/Liste_de_programme_Hello_world#POV-Ray for the
> original POV):
>
> #include "colors.inc"
> camera {
>      location <3, 1, -10>
>      look_at <3,0,0>
> }
> light_source { <500,500,-1000> White }
>
> #input{"What's your name?" name }  //          HERE!
> //#declare name="RedGuff";         //          For test.
>
> text {
>      ttf "timrom.ttf" "Hello" 1, 0
>      pigment { White }
> }
> text {
>      ttf "timrom.ttf" name 1, 0
>      pigment { Red }
>      translate <0,-2,0>
> }
>
> Thanks.
>
>

You can also define (aka declare) values on the command line.
Povray is not expected to be, at least in its portable version, an 
interactive program.

-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

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