POV-Ray : Newsgroups : povray.newusers : Logo Placement : Re: Logo Placement Server Time
29 Apr 2024 07:48:02 EDT (-0400)
  Re: Logo Placement  
From: Kenneth
Date: 6 Feb 2015 07:50:01
Message: <web.54d4b6af42939c78f644696d0@news.povray.org>
"TSDLL" <nomail@nomail> wrote:
> Hi,
>
> ...is there a way to set povray up so that it will automatically place
> a logo on the output images?
>

As mentioned, screen.inc is the thing to use. Unfortunately, it's a bit
difficult to understand, IMO. But a simple scene will demonstrate how it works,
at least for placing a logo on your rendered images:

//--------
#default{finish{ambient .3 diffuse .7}}

light_source {
  0*x
  color rgb <1,1,1>
  translate <-20, 40, -20>
}

// some background objects
plane{y,0
 pigment{
  average
  pigment_map{
   [1 cells scale 4]
   [3 rgb 1]
   }
  }
 }

box{0,1
scale 3
pigment{rgb <1,.7,.2>}
rotate 30*y
translate <15,0,16>
}

cylinder{0,12*y,1 pigment{rgb <1,.2,.2>} translate <-2,0,15>}

sphere{0,3 pigment{gradient y sine_wave} translate <-18,3,26>}


#include "screen.inc"

// First is the macro to set up the special camera (which is actually
// inside screen.inc.) This camera takes the place of the usual one in your
// scene.(By the way, this particular macro is only one of several
// choices you can use for camera set-up.)
// Set_Camera(Location, LookAt, Angle)

Set_Camera(<-33,14,-8>,<5,-4,30>,67) // the macro is already defined
// inside screen.inc

// Another macro there, optional, can easily rotate the camera around
// its own lens axis.
// #macro Set_Camera_Sky(Sky)

Set_Camera_Sky(<-.4,1,0>) // the default 'sky' vector in POV-Ray is <0,1,0>
// or simply y.

// Here's the macro to apply your logo image. The image needs an alpha
// channel transparency mask so your scene is visible through it. In
// screen.inc, the image is applied to a plane created in front
// of the camera, and always remains perpendicular to the lens axis.
//#macro Screen_Plane (Texture, Scaling, BLCorner, TRCorner)

Screen_Plane (
pigment{image_map{png "your_logo_image.png"}},
1,
<.05,.05,.05>, <.3,.3,.3>
)

// Note: SCALING  is not very intuitive at all; I leave it at 1. The actual
// 'scaling' of your image_map can be done by varying the TRCorner value(!)


Post a reply to this message

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