![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Reading in code line by line?
Date: 17 Dec 2011 02:38:39
Message: <4eec46ff@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
High!
As I announced recently, I would like to add a code display feature to
my includes presentation table (see attachment). So I would like to know
whether it is possible to read ASCII text line by line via #read... the
manual says data to be read in have to be separated by commas. The other
way would be to explicitly store the whole text "manually" into an array
whose contents then are rendered in the display section of the table's
glass lid... but this appears rather clumsy to me!
And, concerning the rendering of the test version - why is the red
transparent text not completely cast as shadow?
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2011-12-17 includes showroom 1, take 92 - display table.jpg' (74 KB)
Preview of image '2011-12-17 includes showroom 1, take 92 - display table.jpg'
![2011-12-17 includes showroom 1, take 92 - display table.jpg](/povray.binaries.images/attachment/%3C4eec46ff%40news.povray.org%3E/2011-12-17%20includes%20showroom%201%2C%20take%2092%20-%20display%20table.jpg?ttop=443866&toff=1900&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> High!
>
> As I announced recently, I would like to add a code display feature to
> my includes presentation table (see attachment). So I would like to know
> whether it is possible to read ASCII text line by line via #read... the
> manual says data to be read in have to be separated by commas. The other
> way would be to explicitly store the whole text "manually" into an array
> whose contents then are rendered in the display section of the table's
> glass lid... but this appears rather clumsy to me!
Yes, that is possible indeed. Write a file with each text item separated
by commas (and I think they also should be within " ", not sure
however), then read the file using:
#while (defined(your text file))
#read (....)
....
#end
and apply each read text item to where/what you intend. Reading will
automatically stop when reaching the end of the file.
>
> And, concerning the rendering of the test version - why is the red
> transparent text not completely cast as shadow?
>
I cannot tell just from the image unfortunately.
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 17-12-2011 13:42, Thomas de Groot wrote:
> #while (defined(your text file))
> #read (....)
> ....
> #end
>
> and apply each read text item to where/what you intend. Reading will
> automatically stop when reaching the end of the file.
>
I probably should have written this better as:
#while (defined(your text file))
#read (....)
....
apply each read text item to where/what you intend. Reading will
automatically stop when reaching the end of the file.
....
#end
Thomas
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
High!
On 17.12.2011 13:42, Thomas de Groot wrote:
> Yes, that is possible indeed. Write a file with each text item separated
> by commas (and I think they also should be within " ", not sure
> however), then read the file using:
As the file to read the data from is the original stones1.inc file, it
probaby would be better to write a C++ program which reads in the text
line-wise, generates PoV-Ray array definition code from these lines and
then stores it under "stones1_inc.inc"!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Re: Reading in code line by line?
Date: 18 Dec 2011 19:47:19
Message: <4eee8997@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi(gh)!
> As the file to read the data from is the original stones1.inc file, it
> probaby would be better to write a C++ program which reads in the text
> line-wise, generates PoV-Ray array definition code from these lines and
> then stores it under "stones1_inc.inc"!
I've done so... see my recent entry on povray.programming!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Re: Reading in code line by line?
Date: 18 Dec 2011 19:49:03
Message: <4eee89ff@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi(gh)!
Oh, yes, and here an example:
Post a reply to this message
Attachments:
Download '2011-12-19 includes showroom 1, take 94 - display table.jpg' (51 KB)
Preview of image '2011-12-19 includes showroom 1, take 94 - display table.jpg'
![2011-12-19 includes showroom 1, take 94 - display table.jpg](/povray.binaries.images/attachment/%3C4eee89ff%40news.povray.org%3E/2011-12-19%20includes%20showroom%201%2C%20take%2094%20-%20display%20table.jpg?ttop=443866&toff=1900&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> And, concerning the rendering of the test version - why is the red
> transparent text not completely cast as shadow?
Because you accidently told POV-Ray to render it this way? :-P
I can't tell what's wrong without seeing the code. Maybe you set
no_shadow on that text without noticing?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Emitting media problem (Re: Reading in code line by line?)
Date: 22 Dec 2011 01:57:17
Message: <4ef2d4cd$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Hi(gh)!
After I got together the text array, I wonder whether it is possible to
have the display elements in a glowing emitting media with does not fade
to invisible against a white background... as want to use radiosity
later on, just using ambient 1 would be useless!
See you in Khyberspace!
Yadgar
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: clipka
Subject: Re: Emitting media problem (Re: Reading in code line by line?)
Date: 22 Dec 2011 08:54:50
Message: <4ef336aa@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Hi(gh)!
>
> After I got together the text array, I wonder whether it is possible to
> have the display elements in a glowing emitting media with does not fade
> to invisible against a white background... as want to use radiosity
> later on, just using ambient 1 would be useless!
Purely emitting media /always/ fades to invisible against a white
background (unless you're rendering to a high dynamic range file format,
i.e. HDR or openEXR).
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |