POV-Ray : Newsgroups : povray.general : creating you include files Server Time
5 Nov 2024 20:15:58 EST (-0500)
  creating you include files (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Royce Sullivan
Subject: creating you include files
Date: 5 Apr 1999 00:26:29
Message: <37082D4E.94744AA9@home.com>
Greetings,

I'm using spatch to model organic shapes for a project. When I export to
povray the models can include several hundred lines of code. I was
wanting to know if these large files can some how be expressed as povray
include files so they can be tucked away into the include directory and
be referred to in the main scene making for shorter scene files that are
easier to troubleshoot.
Thanks in advance.

Ronald F. Hicks

www.geocities.com/SoHo/1006
dag### [at] yahoocom


Post a reply to this message

From: Ken
Subject: Re: creating you include files
Date: 5 Apr 1999 03:53:56
Message: <37085CE3.709AE8DE@pacbell.net>
Royce Sullivan wrote:
> 
> Greetings,
> 
> I'm using spatch to model organic shapes for a project. When I export to
> povray the models can include several hundred lines of code. I was
> wanting to know if these large files can some how be expressed as povray
> include files so they can be tucked away into the include directory and
> be referred to in the main scene making for shorter scene files that are
> easier to troubleshoot.
> Thanks in advance.
> 
> Ronald F. Hicks
> 
> www.geocities.com/SoHo/1006
> dag### [at] yahoocom

  It is very prudent to do so. The usual method is to name the file with
the long code using a .inc extension. In your main .pov file it is
convenient to declare the textures, the translations and rotations, and
any other object modifiers so you don't have to constantly open, save and
close the .inc file containing the object. For example you have a mesh
of a dog that is 100k in size. You call it dog.inc and declare the object
simply Dog. In your main .pov file you could have something like:


camera { stuff }

light_source { light stuff }

#declare DogTex = texture { Stuff }

#include "dog.inc"

object { Dog 
 texture { DogTex scale <whatever> }
  rotate y*23
   translate < -25, 0, 35 >
}

More stuff, other objects here etc.


  This way you are only saving a 1k - 5k file instead of a much larger
file plus it is more compact so you see more of the scene without a lot
of scrolling to find a specific part. If you place it in another directory
you may need to supply a path to the file depending where it is located.
If you place it in one of the directories already located in the pov library
search paths you need not include the extra path syntax.

This is legal -> #include "d:\povray\include\meshs\dog.inc"


-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Anthony Bennett
Subject: Re: creating you include files
Date: 5 Apr 1999 08:24:21
Message: <37088DE4.DF6A5649@panama.phoenix.net>
I would appreciate a program that would 'clean' up Spatch files eliminating
all the unnecesary zeroes and spaces, like in 0.00000 which could just be 0.


Post a reply to this message

From: Ken
Subject: Re: creating you include files
Date: 5 Apr 1999 12:01:05
Message: <3708CF07.252890F5@pacbell.net>
Anthony Bennett wrote:
> 
> I would appreciate a program that would 'clean' up Spatch files eliminating
> all the unnecesary zeroes and spaces, like in 0.00000 which could just be 0.

The pov editor does a good job of it. Highlight the unwanted combination
such as , 0.000000, and use the search and replace functions. Specifiy
for the above , 0, and hit replace all and it will take care of the rest.
I do this with all large mesh files removing excess trailing zeros and
the spaces after , { } < >  . I reguraly see 1 meg mesh files go to as
low as 600k by using a simple search and replace. All you need to do is
in the search for box hit the space bar one time and in the replace box
specifiy nothing. It will remove every single space in the file. This is
BIG hard drive space saving trick.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Nieminen Mika
Subject: Re: creating you include files
Date: 5 Apr 1999 14:53:49
Message: <3708f8ad.0@news.povray.org>
Anthony Bennett <ben### [at] panamaphoenixnet> wrote:
: I would appreciate a program that would 'clean' up Spatch files eliminating
: all the unnecesary zeroes and spaces, like in 0.00000 which could just be 0.

  You can also use my triangle mesh compressor for this.
  The compressed mesh macro can be found at
http://www.geocities.com/SiliconValley/Lakes/1434/pcm.html
  The new version of the macro with many improvements will be available very
soon.
  However, you don't need the macro at all if you don't want it. You can
just use my mesh compressor to "clean up" the mesh.
  For this you need the newer version of the compressor, which can output
in povray format: http://iki.fi/warp/PovUtils/meshc11a.zip
  This program will be included in the new macro when released.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Anthony Bennett
Subject: Re: creating you include files
Date: 5 Apr 1999 16:35:11
Message: <370900EE.41973D4C@panama.phoenix.net>
Can the mesh compressor work with bicubic patches? That's what I want to work
with.


Post a reply to this message

From: Anthony Bennett
Subject: Re: creating you include files
Date: 5 Apr 1999 16:39:05
Message: <370901D3.B140C1A@panama.phoenix.net>
> The pov editor does a good job of it. Highlight the unwanted combination
> such as , 0.000000, and use the search and replace functions. Specifiy
> for the above , 0, and hit replace all and it will take care of the rest.

I've been using this time consuming method for quite some time. I hate it. I would
like a program that could eliminate _all_ unnecesary 0s, as in 0.2070 which could
be .207, for example. The program could cycle through 0.0000 --- 1.0000 (or a user
defined number) and clean it up for us. This can be done, right? I would probably
do it myself, if I knew how to work with strings better. I'm busy with real
strings right now. I plan to turn the cloth macro to a C program. I am also adding
some improvements to the cloth algorithm.


Post a reply to this message

From: Anthony Bennett
Subject: Re: creating you include files
Date: 5 Apr 1999 16:41:08
Message: <37090250.3D7C9FEC@panama.phoenix.net>
It's about time that povray.org meant something more than the place you
go get your binaries from. Keep going, POV-Team!


Post a reply to this message

From: Anthony Bennett
Subject: Re: creating you include files
Date: 5 Apr 1999 22:16:41
Message: <370950F0.E1FCEFCB@panama.phoenix.net>
I have no idea how this ended up here. It was for the Farewell CompuServe
message.

Anthony Bennett wrote:

> It's about time that povray.org meant something more than the place you
> go get your binaries from. Keep going, POV-Team!


Post a reply to this message

From: Johannes Hubert
Subject: Re: creating you include files
Date: 6 Apr 1999 03:31:45
Message: <3709aa51.0@news.povray.org>
You do know that you can delete a message from the server, if you posted it
yourself, do you?

Johannes.

Anthony Bennett wrote in message <370950F0.E1FCEFCB@panama.phoenix.net>...
>I have no idea how this ended up here. It was for the Farewell CompuServe
>message.
>
>Anthony Bennett wrote:
>
>> It's about time that povray.org meant something more than the place you
>> go get your binaries from. Keep going, POV-Team!
>


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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