POV-Ray : Newsgroups : povray.general : superimposing text Server Time
15 Nov 2024 19:18:59 EST (-0500)
  superimposing text (Message 1 to 7 of 7)  
From: Jim Charter
Subject: superimposing text
Date: 28 Jun 2004 13:23:00
Message: <40e053f4$1@news.povray.org>
I am running a lot of tests and I want to superimpose onto the viewing 
plane a label naming which test the rendered image is the result of.

I am poking around in the resources etc. looking for something I could 
use.  Would be very grateful for any code, suggestions, macros, includes 
that I could press into service. I was sure someone had a technique for 
applying his/her signature in that manner.

TIA

-Jim


Post a reply to this message

From: Kurts
Subject: Re: superimposing text
Date: 28 Jun 2004 13:35:18
Message: <kurtzlepirate-8AF326.19351828062004@news.povray.org>
In article <40e053f4$1@news.povray.org>, Jim Charter <jrc### [at] msncom> wrote:

> I am running a lot of tests and I want to superimpose onto the viewing 
> plane a label naming which test the rendered image is the result of.
> 
> I am poking around in the resources etc. looking for something I could 
> use.  Would be very grateful for any code, suggestions, macros, includes 
> that I could press into service. I was sure someone had a technique for 
> applying his/her signature in that manner.
> 
> TIA
> 
> -Jim

  make a look at "screen.inc"  :-))

  -----
  louis


Post a reply to this message

From: Jim Charter
Subject: Re: superimposing text
Date: 28 Jun 2004 17:13:18
Message: <40e089ee$1@news.povray.org>
Kurts wrote:

> 
> 
>   make a look at "screen.inc"  :-))
> 
>   -----
>   louis

Bingo.  Thanks Louis.


Post a reply to this message

From: Shay
Subject: Re: superimposing text
Date: 28 Jun 2004 17:39:34
Message: <40e09016$1@news.povray.org>
Jim Charter wrote:
> 
> Bingo.  Thanks Louis.

You're scenes are perhaps too complex for this method. Text objects are 
slow anyway and will be terrible with high-quality radiosity and/or 
multiple lights. What I do is call scenes from a small "wrapper" and 
setup my ini file as a two-frame animation. The first frame is my scene, 
the second frame labels it. This also makes it easier to keep multiple 
pictures. Here's an example. I made it so you could cut-paste-run it to 
check it out, but in reality, it would require that your main scene file 
create a text file with all of the information you want to print. 
Uncomment the commented lines and delete the lines labeled "fake line" 
to get the real thing.

  -Shay

// for example, file saved as "text_label.pov"
#include "strings.inc"

#if ( 0 ) // fake line
//#if ( frame_number = 0 )
	#include "my_scene.pov"
#else
//	#include "my_data.pov"
	camera {
		orthographic
		location <0,0,-1>
		look_at  <0,0,0>
		right 1*x
		up 1*y
	}
	box {
		<-0.5, -0.5, 1>, <0.5, 0.5, 1>
		texture {
			pigment {
//				image_map { sys "text_label1.bmp" }
				wood // fake line
			}
			finish { ambient 1 }
			translate -.5
		}
	}
#end

#macro Write ( String )
	#ifndef ( LineNumber )
		#declare LineNumber = 0;
	#else
		#declare LineNumber = LineNumber + 1;
	#end
	text {
		ttf
		"crystal.ttf",
		String,
		1,
		0
		scale .02
		pigment { rgb <1,1,1> }
		finish { ambient 1 }
	 	translate <-.49,.48,0>
		translate y*-.025*LineNumber
	}
#end

// in practice, variables like PTS and PTE
// would be defined in your data file
#local PTS = .008;
#local PTE = .04;

#local PtsString = concat ( "pretrace_start = ", Str(PTS) )
#local PteString = concat ( "pretrace_end = ", Str(PTE) )

Write ( PtsString )
Write ( PteString )


Post a reply to this message

From: Jim Charter
Subject: Re: superimposing text
Date: 28 Jun 2004 21:05:07
Message: <40e0c043$1@news.povray.org>
Thanks Shay, will try it out.  There may be other reasons why I might 
shift to running from an ini file too.


Post a reply to this message

From: Shay
Subject: Re: superimposing text
Date: 29 Jun 2004 10:13:59
Message: <40e17927$1@news.povray.org>
Jim Charter wrote:

> Thanks Shay, will try it out.  There may be other reasons why I might 
> shift to running from an ini file too.

Multi pass renders? Stored radiosity?

  -Shay


Post a reply to this message

From: Jim Charter
Subject: Re: superimposing text
Date: 29 Jun 2004 14:35:59
Message: <40e1b68f$1@news.povray.org>
Shay wrote:
> Jim Charter wrote:
> 
>> Thanks Shay, will try it out.  There may be other reasons why I might 
>> shift to running from an ini file too.
> 
> 
> Multi pass renders? Stored radiosity?
> 
>  -Shay
Obviously you can read minds


Post a reply to this message

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