POV-Ray : Newsgroups : povray.newusers : Oleguer's question: putting image into another Server Time
26 Nov 2024 10:22:49 EST (-0500)
  Oleguer's question: putting image into another (Message 1 to 1 of 1)  
From: Hughes, B 
Subject: Oleguer's question: putting image into another
Date: 11 Aug 2004 21:24:56
Message: <411ac6e8$1@news.povray.org>
This needed reposting to the appropriate group, so I took it upon myself to
do so. Please direct questions and answers here and in
povray.binaires.images (same
subject).

Following was my reply (his original question at end):

Placing a POV-Ray rendering (image file) from within another program might
be easier to do, because you might only need to resize and position it as a
selection... from what I understand of your question.

There's a way to do it all within POV-Ray by using a image_map of the
graphics and another of your scene, but just not as simple as would be to
drag'n'drop resized pictures in another program.

Main thing to remember when using image_map in POV-Ray is to place its
object behind other scene elements, like a backdrop on a stage with the
other objects in front of it. Or making it transparent in part, or in whole,
so that things behind can be seen.

Maybe I can explain that better with some pov script:

/* using your graphic image */
#local X1=ResX; // resolutions of main graphic for background,
#local Y1=ResY; // will also be for orthographic camera FOV.

plane {
  z,0
  pigment {
    image_map {
      gif "111.gif" // your graphics image in 256 colors format.
      once // no repeating tiles.
//      transmit 255,1 // makes index 255 transparent. Not necessary.
    }
  translate -0.5 // center image.
  scale <X1,Y1,1> // use resolution of image file, e.g. X1=480, Y1=960.
  }
  finish {ambient 1 diffuse 0} // no lights needed.
}

/* using your prerendered cloud scene */
plane {
  z, -0.01 // place in front of background graphic image.
  pigment {
    image_map {
      sys "111.bmp" // your scene in default format.
      once // no repeating tiles.
//      transmit 255,1 // makes index 255 transparent. Not necessary.
    }
  translate -0.5 // center image.
  scale <X2,Y2,1> // use resolution of image file, e.g. X=320, Y=240.
  / 0.5 // or 2, or ?, and this will resize it.
  translate <Xx,Yy,0> // position here, e.g. Xx=+10, Yy=-100.
  }
  finish {ambient 1 diffuse 0} // no lights needed.
}

camera {
  orthographic // direct projection.
  location -100*z // move to front,
  look_at 0 // looking toward center.
  right X1*x // background graphic resolution again
  up Y1*y
}

This would need to be a separate rendering from your cloud scene, and done
last, cloud scene rendered first to get its image file for usage here.

Our language barrier makes it difficult to know if you will be using a
clouds scene separate of some things added to it first and only later adding
the whole thing to that graphic page-- or if you intend to do more with that
background, such as add clouds into the whole thing (you did not draw it
that way, so perhaps not).

Anyway, I will repost this for you so it gets seen as a new question with my
answer. I'm glad to help any way I can, so don't worry about anything.

Bob H.

"Oleguer Vilella" <ole### [at] infonegociocom> wrote in message
news:411a43a9@news.povray.org...
>
> Well, I send you an archive and maybe it's more clearely.
> In this JPG you will see a lot of diferents images, I did it with
CorelDraw,
> and down of the page you will see and space with a beautiful hand-made
> picture, here I want to put my Pov-Ray picture. I did a cloudy escene with
> Pov-Ray a part of the Pov-Ray picture. I'll add the cloudy escene in the
> Pov-Ray picture like a background, but I need to place the Pov-Ray picture
> in the correct place of the background (cloudy escene) , so that, when I
> paste the Pov-Ray escene under the CorelDraw picture it have to be in the
> space.


Post a reply to this message

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