POV-Ray : Newsgroups : povray.newusers : Import scene file problem Server Time
29 Jul 2024 06:16:50 EDT (-0400)
  Import scene file problem (Message 1 to 6 of 6)  
From: pierre
Subject: Import scene file problem
Date: 5 Sep 2006 08:05:00
Message: <web.44fd676f1c12001dad334ed60@news.povray.org>
Hi everybody,

I am a rookie in programation and especially in povray.
I have converted 3D surface from matlab in .pov using poseray.

I obtained several files:
test_POV_main
test_POV_mat
test_POV_geom

Then , I wanted to insert this surface into a specifcal environement. I've
defined the camera, the texture, the source...

But, how do I open those files created with poseray?
I used #fopen and #read but It doesn't work, the software doesn't recognised
my surface and asked for an Object.


Thanks by advance
Pierre


Post a reply to this message

From: Stephen
Subject: Re: Import scene file problem
Date: 5 Sep 2006 08:50:00
Message: <web.44fd71fee68f8ae1f1cb1e660@news.povray.org>
"pierre" <pie### [at] efpginpgfr> wrote:
> Hi everybody,
>
> I am a rookie in programation and especially in povray.
> I have converted 3D surface from matlab in .pov using poseray.
>
> I obtained several files:
> test_POV_main
> test_POV_mat
> test_POV_geom
>
> Then , I wanted to insert this surface into a specifcal environement. I've
> defined the camera, the texture, the source...
>
> But, how do I open those files created with poseray?
> I used #fopen and #read but It doesn't work, the software doesn't recognised
> my surface and asked for an Object.
>

 Pierre


test_POV_main should have a line in it something like;


extension, what OS are you using?)

you could add your environment to test_POV_main. Or simpler still add

Things to note; Make sure that the path that your Test_Pov_* files are in
the Pov-Ray Library (search) path. This can be found in povray.ini. Make
sure that all the Test_Pov_* files are included using #include. Either in
your file or in test_POV_main.
One other thing as well as including the files you must call the object.






object{ Name_of_Object_in_ test_POV_ main }


Stephen

P.S. I just read your post again and you mentioned Poseray. If you get a
preview in Poseray then the material and geometry files will be included in

P.P.S. The #fopen and #read commands are for internal use. They are often
used to read variables and data that you want to store between frames of an
animation.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Import scene file problem
Date: 6 Sep 2006 02:43:41
Message: <44fe6e1d@news.povray.org>
"pierre" <pie### [at] efpginpgfr> schreef in bericht 
news:web.44fd676f1c12001dad334ed60@news.povray.org...
> Hi everybody,
>
> I am a rookie in programation and especially in povray.
> I have converted 3D surface from matlab in .pov using poseray.
>
> I obtained several files:
> test_POV_main
> test_POV_mat
> test_POV_geom
>
> Then , I wanted to insert this surface into a specifcal environement. I've
> defined the camera, the texture, the source...
>
> But, how do I open those files created with poseray?
> I used #fopen and #read but It doesn't work, the software doesn't 
> recognised
> my surface and asked for an Object.
>
>
It is fairly simple :-)
The test_POV_main file is a standalone scene file that you can use in 
POV-Ray to see the object like you saw it in Poseray. The important files 
are the _geom and the _mat files:
The _geom file contains the data describing your 3D surface
The _mat file contains a standard texture just to make the object visible. 
You can change that later.

If you are not using the _main file:
- you must first include the two other files in your scene.
- Look at the end of the _geom file how Poseray has named the object
- now call the object in your scene: object {whatever}

Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Import scene file problem
Date: 6 Sep 2006 02:48:22
Message: <44fe6f36$1@news.povray.org>
"Thomas de Groot" <t.d### [at] internlnet> schreef in bericht 
news:44fe6e1d@news.povray.org...
>
I made a small mistake here. Do the following:

 If you are not using the _main file:
 - you must first include the _geom file in your scene (the _mat file is 
automatically included by it. Watch out however, if the call is from another 
directory, you may have to adapt the directory address in the #include)
 - Look at the end of the _geom file how Poseray has named the object
 - now call the object in your scene: object {whatever}

 Thomas


Post a reply to this message

From: Penelope20k
Subject: Re: Import scene file problem
Date: 6 Sep 2006 08:55:38
Message: <44fec54a$1@news.povray.org>
Add this at the begining of you scene

// -----------------------------------------------------------------------
// include files in this order

#include "colors.inc"
#include "skies.inc"
#include "stars.inc"
#include "textures.inc"


#declare _path="c:\\folder1\\folder2\\";                             / / the
path of your POSERAY File
#declare _file_name_without_extend="this_file";            // the name of
your file without the extention

#include concat(_path,_file_name_without_extend,"_POV_mat.inc");
#include concat(_path,_file_name_without_extend,"_POV_geom.inc");


// Then for calling your object you should write

#object { this_file_ /* add a _ at the end of your file name }


// this is the way how poseray work by default ..

// ----------------------------------------------------------------




news:web.44fd676f1c12001dad334ed60@news.povray.org...
> Hi everybody,
>
> I am a rookie in programation and especially in povray.
> I have converted 3D surface from matlab in .pov using poseray.
>
> I obtained several files:
> test_POV_main
> test_POV_mat
> test_POV_geom
>
> Then , I wanted to insert this surface into a specifcal environement. I've
> defined the camera, the texture, the source...
>
> But, how do I open those files created with poseray?
> I used #fopen and #read but It doesn't work, the software doesn't
recognised
> my surface and asked for an Object.
>
>
> Thanks by advance
> Pierre
>
>


Post a reply to this message

From: pierre
Subject: Re: Import scene file problem
Date: 7 Sep 2006 05:20:01
Message: <web.44ffe3f6e68f8ae1ad334ed60@news.povray.org>
thanks everybody,
I was very clear and I applied your advices and It works!








"Penelope20k" <pen### [at] caramailfr> wrote:
> Add this at the begining of you scene
>
> // -----------------------------------------------------------------------
> // include files in this order
>
> #include "colors.inc"
> #include "skies.inc"
> #include "stars.inc"
> #include "textures.inc"
>
>
> #declare _path="c:\folder1\folder2\";                             / / the
> path of your POSERAY File
> #declare _file_name_without_extend="this_file";            // the name of
> your file without the extention
>
> #include concat(_path,_file_name_without_extend,"_POV_mat.inc");
> #include concat(_path,_file_name_without_extend,"_POV_geom.inc");
>
>
> // Then for calling your object you should write
>
> #object { this_file_ /* add a _ at the end of your file name }
>
>
> // this is the way how poseray work by default ..
>
> // ----------------------------------------------------------------
>
>
>

> news:web.44fd676f1c12001dad334ed60@news.povray.org...
> > Hi everybody,
> >
> > I am a rookie in programation and especially in povray.
> > I have converted 3D surface from matlab in .pov using poseray.
> >
> > I obtained several files:
> > test_POV_main
> > test_POV_mat
> > test_POV_geom
> >
> > Then , I wanted to insert this surface into a specifcal environement. I've
> > defined the camera, the texture, the source...
> >
> > But, how do I open those files created with poseray?
> > I used #fopen and #read but It doesn't work, the software doesn't
> recognised
> > my surface and asked for an Object.
> >
> >
> > Thanks by advance
> > Pierre
> >
> >


Post a reply to this message

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