 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Marc-Hendrik Bremer wrote in message <3a87dce9@news.povray.org>...
>Hi,
>
>I would like to know, how you manage to keep track of the things in your
>more complex scenes, 'cause I've problems with this.
Include files. Lots of include files.
Textures usually go in one include file. Each object or group of related
objects goes in another. I have my include files set up so I can either
render them separately or as part of the main scene.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Marc-Hendrik Bremer wrote:
>
> Hi,
>
> I would like to know, how you manage to keep track of the things in your
> more complex scenes, 'cause I've problems with this.
>
> So, how are you doing these things?
My scripts use the following conventions:
CSG brackets are marked with the object being put together, such as:
union { // the camera
union { // the camera case
box { ... }
sphere { ... }
cylinder { ... }
// etc...
texture { CameraTexture }
} // end of the camera case
difference { // the lens
sphere { ... }
sphere { ... }
material { LensMaterial }
} // end of the lens
} // end of the camera
I always indent (or at least try to indent) each level of nesting.
An indent of two spaces is enough for me; your mileage may vary.
A lot of my .inc files make use of variables passed on by the calling
script. The first thing in the .inc is code defining those values
that I may have neglected:
#ifndef(RobotArmed)
#local RobotArmed=false;
#end
In my current IRTC project (which will feature Rusty, Domo, and Rosie),
I have one script file which positions the robots, another that places
the camera, others that place the static objects, build the robots, etc.
Hope this helps,
John
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Marc-Hendrik Bremer <Mar### [at] t-online de> wrote:
: That works, but I find myself often scrolling about large parts of the
: scene
That's exactly why there's an #include statement...
It's perfectly possible to make your scene in several source files.
--
char*i="b[7FK@`3NB6>B:b3O6>:B:b3O6><`3:;8:6f733:>::b?7B>:>^B>C73;S1";
main(_,c,m){for(m=32;c=*i++-49;c&m?puts(""):m)for(_=(
c/4)&7;putchar(m),_--?m:(_=(1<<(c&3))-1,(m^=3)&3););} /*- Warp -*/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
This is my approach also. A holdover from my programing days.
Ron Parker wrote:
>
<snip>
> I try to put everything that
> has to do with a single physical object into one file, and everything that
> has to do with the stage in another file, and finally include them all
> into one big scene that's nothing more than #includes and object placement
> and lighting and a camera. I also try to have a test scene #ifdef'd at the
> bottom of each include file, so I can preview the objects or the stage as
> I model them.
>
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
If the file gets really big, strip common items out to include files, such as
textures. Then use highly visible comments to seperate portions of the large
file
// ********************
// * Things and stuff *
// ********************
(I try to avoid the /*...*/ style comments when possible so that if I later want
to exclude a large chunk of code I can use them to comment it out and nothing
will interfere.)
I notice a lot of instructional references use a sort of comment margin; if you
want to comment on a specific line tab over a certain distance and comment there
so that all your comments line up, and it's like you have a column of psuedocode
running down the right-hand side of the text.
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3A8B4F3C.84255D7F@faricy.net>, David Fontaine
<dav### [at] faricy net> wrote:
> (I try to avoid the /*...*/ style comments when possible so that if I
> later want to exclude a large chunk of code I can use them to comment
> it out and nothing will interfere.)
You do know that POV-style /*...*/ comments can be nested, right? The
C-style /*...*/ comments often interfere with my work, because they
don't nest, but I've never had a problem with the POV-style ones.
--
Christopher James Huff
Personal: chr### [at] mac com, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tag povray org, http://tag.povray.org/
<><
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Chris Huff" <chr### [at] mac com> wrote in message
news:chrishuff-BBA113.06361715022001@news.povray.org...
> In article <3A8B4F3C.84255D7F@faricy.net>, David Fontaine
> <dav### [at] faricy net> wrote:
>
> > (I try to avoid the /*...*/ style comments when possible so that if I
> > later want to exclude a large chunk of code I can use them to comment
> > it out and nothing will interfere.)
>
> You do know that POV-style /*...*/ comments can be nested, right? The
> C-style /*...*/ comments often interfere with my work, because they
> don't nest, but I've never had a problem with the POV-style ones.
But you use a Mac (drat it all) and for some reason this commenting method
can't be nested under Windows. Well, mine here anyhow.
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Bob H." wrote:
> > You do know that POV-style /*...*/ comments can be nested, right? The
> > C-style /*...*/ comments often interfere with my work, because they
> > don't nest, but I've never had a problem with the POV-style ones.
>
> But you use a Mac (drat it all) and for some reason this commenting method
> can't be nested under Windows. Well, mine here anyhow.
ditto
--
David Fontaine <dav### [at] faricy net> ICQ 55354965
My raytracing gallery: http://davidf.faricy.net/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bob H. wrote in message <3a8c7125@news.povray.org>...
>But you use a Mac (drat it all) and for some reason this commenting method
>can't be nested under Windows. Well, mine here anyhow.
Yes you can. The syntax highlighting won't show it, but the comments do
nest.
--
Mark
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Mark Wagner" <mar### [at] gte net> wrote in message
news:3a8cb5ae$1@news.povray.org...
> Bob H. wrote in message <3a8c7125@news.povray.org>...
> >But you use a Mac (drat it all) and for some reason this commenting method
> >can't be nested under Windows. Well, mine here anyhow.
>
>
> Yes you can. The syntax highlighting won't show it, but the comments do
> nest.
Oh, sorry, right. Thanks for clearing that up Mark. I think I never try to
use the slash-asterisk comment asterisk-slash embedding simply because of the
syntax color scheme of the CodeMax Editor and so I just always consider it to
not be done.
To think I've been limited as the result of a colored font for so long now :-/
Bob H.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |