|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have a standalone povray file, but I want to include it as an object in my own
povray file including other objects. I remove the camera and light from the
first povray file and tried to include it in my own file as
camera {location <0,7,-7> look_at <0,0,0>}
light_source {<-15,10,-15> color rgb<1,1,1> }
background {color rgb<.7,.7,.7> }
#declare externalobject = #include "/.../external.pov"
object {externalobject .... }
but it doesn't work and I doesn't return any error to find out what is the
problem.
Post a reply to this message
|
|
| |
| |
|
|
From: dick balaska
Subject: Re: How to include a pov ray file as an object?
Date: 25 Jul 2018 13:22:22
Message: <5b58b1ce$1@news.povray.org>
|
|
|
| |
| |
|
|
On 07/25/2018 12:40 PM, Kima wrote:
> I have a standalone povray file, but I want to include it as an object in my own
> povray file including other objects. I remove the camera and light from the
> first povray file and tried to include it in my own file as
>
>
>
> camera {location <0,7,-7> look_at <0,0,0>}
> light_source {<-15,10,-15> color rgb<1,1,1> }
> background {color rgb<.7,.7,.7> }
>
> #declare externalobject = #include "/.../external.pov"
>
> object {externalobject .... }
>
>
> but it doesn't work and I doesn't return any error to find out what is the
> problem.
I'm surprised you don't get any error. My guess is you are running into
I/O restrictions. Your external.pov is in a not-allowed directory (Your
include starts with a '/'). Try copying external.pov to the same
directory as your main file.
My project has 200+ include files, but they are all in the current
directory or a subdirectory below it.
--
dik
Rendered 328976 of 330000 (99%)
Post a reply to this message
|
|
| |
| |
|
|
From: kurtz le pirate
Subject: Re: How to include a pov ray file as an object?
Date: 25 Jul 2018 13:38:54
Message: <5b58b5ae$1@news.povray.org>
|
|
|
| |
| |
|
|
Le 25/07/2018 à 18:40, Kima a écrit :
> I have a standalone povray file, but I want to include it as an object in my own
> povray file including other objects. I remove the camera and light from the
> first povray file and tried to include it in my own file as
>
>
>
> camera {location <0,7,-7> look_at <0,0,0>}
> light_source {<-15,10,-15> color rgb<1,1,1> }
> background {color rgb<.7,.7,.7> }
>
> #declare externalobject = #include "/.../external.pov"
>
> object {externalobject .... }
>
>
> but it doesn't work and I doesn't return any error to find out what is the
> problem.
>
First, look the doc
<http://www.povray.org/documentation/view/3.6.1/220/>, 2.1.2.5.3 Include
File Name.
_"POV-Ray looks for files in the current directory. If it does not find
a file it needs it looks in various other library directories which you
specify. POV-Ray does not search your operating system path. It only
searches the current directory and directories which you specify with
this option. For example the standard include files are usually kept in
one special directory. You tell POV-Ray to look there with..."_
Second, in your included file contain the definition of an object like :
#declare myObject = {...}
When you add #include "path_to_file", 'myObject' is available directly
and you can use it like :
object {
myObject
pigment { ... }
finish { ... }
transform { ... }
...
}
--
Kurtz le pirate
Compagnie de la Banquise
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
dick balaska <dic### [at] buckosoftcom> wrote:
> On 07/25/2018 12:40 PM, Kima wrote:
> > I have a standalone povray file, but I want to include it as an object in my own
> > povray file including other objects. I remove the camera and light from the
> > first povray file and tried to include it in my own file as
> >
> >
> >
> > camera {location <0,7,-7> look_at <0,0,0>}
> > light_source {<-15,10,-15> color rgb<1,1,1> }
> > background {color rgb<.7,.7,.7> }
> >
> > #declare externalobject = #include "/.../external.pov"
> >
> > object {externalobject .... }
> >
> >
> > but it doesn't work and I doesn't return any error to find out what is the
> > problem.
>
>
> I'm surprised you don't get any error. My guess is you are running into
> I/O restrictions. Your external.pov is in a not-allowed directory (Your
> include starts with a '/'). Try copying external.pov to the same
> directory as your main file.
>
> My project has 200+ include files, but they are all in the current
> directory or a subdirectory below it.
>
> --
> dik
> Rendered 328976 of 330000 (99%)
Sorry, the mistake was mine. The absolute path worked fine, that's why I didn't
receive any error. The external povray placed the objects in an odd location far
outside the camera domain. I adjusted the camera, and it's fine.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 18-07-25 à 18:44, Kima a écrit :
> Sorry, the mistake was mine. The absolute path worked fine, that's why I didn't
> receive any error. The external povray placed the objects in an odd location far
> outside the camera domain. I adjusted the camera, and it's fine.
>
>
>
That's a reason to create your objects at or near the origin, then
translate them to the desired location.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|