|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I've been using crackle to make randomly placed armor plates, but I also
need to have one plate in a specific location, and have it not overlap
any of the random plates. What I'd like to do is something like this:
#macro my_pattern (V)
max( crackle (V), spherical (V) )
#end
#declare my_texture = texture{ my_pattern texture_map{...}}
Is there any way to do something like this?
John Chatham
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hmm.. it's the non-overlapping part that's hard.
Perhaps something like:
texture
{
spherical
texture_map
{
[0 bigCrackle]
[0.3 bigCrackle]
[.30001 smallCrackle]
[1 smallCrackle]
}
}
I doubt it will work, but it's worth a try.
______
David McCabe
mcc### [at] yahoocom
http://homepage.mac.com/davidmccabe/
Jesus loves you!
> I've been using crackle to make randomly placed armor plates, but I also
> need to have one plate in a specific location, and have it not overlap
> any of the random plates. What I'd like to do is something like this:
>
> #macro my_pattern (V)
> max( crackle (V), spherical (V) )
> #end
>
> #declare my_texture = texture{ my_pattern texture_map{...}}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3ABA191B.A47B8A97@mail.rit.edu>, John Chatham
<Wyv### [at] mailritedu> wrote:
> I've been using crackle to make randomly placed armor plates, but I also
> need to have one plate in a specific location, and have it not overlap
> any of the random plates. What I'd like to do is something like this:
> #macro my_pattern (V)
> max( crackle (V), spherical (V) )
> #end
> #declare my_texture = texture{ my_pattern texture_map{...}}
> Is there any way to do something like this?
Using MegaPOV, it's easy...just use a function pattern.
#macro MyPattern()
#local Crackle =
function {
pigment {crackle color_map {[0 rgb 0][1 rgb 1]}}
}
function {
max(Crackle(x, y, z), max(0, 1-sqrt(sqr(x) + sqr(y) + sqr(z)))
}
#end
#declare MyTexture = texture {MyPattern() texture_map{...}}
You could also declare a spherical pigment function and use that instead
of "max(0, 1-sqrt(sqr(x) + sqr(y) + sqr(z))", but it wouldn't be as
flexible, and might be slower. Or it might be faster...
MacMegaPOV is available here:
http://users.skynet.be/smellenbergh/
BTW, it's a good idea to always use at least one capital letter in
variable/macro names, to avoid interference from a keyword in a future
version. Keywords will always be lower-case, so it's easy to avoid name
collisions.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I've made a program that creates POV scenes and I'd like to make animations.
I can't really use the clock to modify my model so I generate an include
file for each frame and create animations like this:
# if (clock = 1)
#include frame01.inc
#end
#if (clock = 2)
#include frame02.inc
#end
etc....
The problem is that I want to completely automate the process; generate all
the files, open the animation file, then render; but I've been unable to
specify the clock and frame variables. I have to open the render settings
window and manually set the values under the animation tab. Is there a way
to set this up in the file (the initial_clock, final_clock, initial_frame,
final_frame variables)? In the documentation I read about INI files where
you can specify these things, but I've been unable to get POV to recognize
the INI. How do I use an INI?
Also, is there anyway to have POV automatically render? I havnt seen
anything about applescript. In my program I press a button and the scene
file is created and opened in POV automatically, then I have to go to all
the trouble of pressing command-R ;) Any way to skip that last step?
This newbie appreciates all suggestions
-laz
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I think you can use the 'print' AppleScript command to render an image.
POV-Ray really needs more OSA support, IMHO.
______
David McCabe
dav### [at] maccom
http://homepage.mac.com/davidmccabe/
Jesus loves you!
> I've made a program that creates POV scenes and I'd like to make animations.
> I can't really use the clock to modify my model so I generate an include
> file for each frame and create animations like this:
>
> # if (clock = 1)
> #include frame01.inc
> #end
>
> #if (clock = 2)
> #include frame02.inc
> #end
> etc....
>
> The problem is that I want to completely automate the process; generate all
> the files, open the animation file, then render; but I've been unable to
> specify the clock and frame variables. I have to open the render settings
> window and manually set the values under the animation tab. Is there a way
> to set this up in the file (the initial_clock, final_clock, initial_frame,
> final_frame variables)? In the documentation I read about INI files where
> you can specify these things, but I've been unable to get POV to recognize
> the INI. How do I use an INI?
>
> Also, is there anyway to have POV automatically render? I havnt seen
> anything about applescript. In my program I press a button and the scene
> file is created and opened in POV automatically, then I have to go to all
> the trouble of pressing command-R ;) Any way to skip that last step?
>
> This newbie appreciates all suggestions
>
> -laz
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Lazarus Plath wrote:
> I've made a program that creates POV scenes and I'd like to make animations.
> I can't really use the clock to modify my model so I generate an include
> file for each frame and create animations like this:
>
> # if (clock = 1)
> #include frame01.inc
> #end
>
> #if (clock = 2)
> #include frame02.inc
> #end
> etc....
You can probably simplify this with a string concatenation:
#declare thisfile = concat("frame"+str(clock,2,2) + ".inc)
#include thisfile
Of course you if you use MegaPov you can use the framenumber keyword as well.
If you explain some of the details about the project we can help you streamline
the animation process. The clock keyword is actually pretty powerful and
flexible.
> The problem is that I want to completely automate the process; generate all
> the files, open the animation file, then render; but I've been unable to
> specify the clock and frame variables. I have to open the render settings
> window and manually set the values under the animation tab. Is there a way
> to set this up in the file (the initial_clock, final_clock, initial_frame,
> final_frame variables)? In the documentation I read about INI files where
> you can specify these things, but I've been unable to get POV to recognize
> the INI. How do I use an INI?
In the Render Settings dialog box, on the scene tab there is a check mark for
Read INI . If your main text file is "foo.pov" then it will look for "foo.ini"
You can also open an ini file and there is a switch for a source file and when
you render the INI file, it grabs the source. I haven't played with that too
much however.
> Also, is there anyway to have POV automatically render? I havnt seen
> anything about applescript. In my program I press a button and the scene
> file is created and opened in POV automatically, then I have to go to all
> the trouble of pressing command-R ;) Any way to skip that last step?
I'm not sure what you mean by this. POV-Ray does not automatically Render on
the Mac.
Josh English
eng### [at] spiritonecom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Josh English wrote...
> Lazarus Plath wrote:
>
>> I've made a program that creates POV scenes and I'd like to make animations.
>> I can't really use the clock to modify my model so I generate an include
>> file for each frame and create animations like this:
>>
>> # if (clock = 1)
>> #include frame01.inc
>> #end
>>
>> #if (clock = 2)
>> #include frame02.inc
>> #end
>> etc....
>
> You can probably simplify this with a string concatenation:
>
> #declare thisfile = concat("frame"+str(clock,2,2) + ".inc)
> #include thisfile
This is very cool! I've been using POV for about a week now and didn't know
you can do things like this.
> Of course you if you use MegaPov you can use the framenumber keyword as well.
I've just downloaded MegaPOV and havn't had a chance to look at it.
> If you explain some of the details about the project we can help you
> streamline
> the animation process. The clock keyword is actually pretty powerful and
> flexible.
The program I've created uses splines and other methods of moving and
distorting objects. I know there is basically a complete math interpreter so
I could conceivably put all this in the POV file, but I find it easier to
create a different model for each frame.
>> final_frame variables)? In the documentation I read about INI files where
>> you can specify these things, but I've been unable to get POV to recognize
>> the INI. How do I use an INI?
>
> In the Render Settings dialog box, on the scene tab there is a check mark for
> Read INI . If your main text file is "foo.pov" then it will look for "foo.ini"
Perfect. I just checked the Read INI file check box and have been fiddling
around with things. Now it's reading the .ini I make, there's some more
things I need to setup, but its working now.
> You can also open an ini file and there is a switch for a source file and when
> you render the INI file, it grabs the source. I haven't played with that too
> much however.
I'll have to look into this, I think it may be better.
>
>> Also, is there anyway to have POV automatically render? I havnt seen
>> anything about applescript. In my program I press a button and the scene
>> file is created and opened in POV automatically, then I have to go to all
>> the trouble of pressing command-R ;) Any way to skip that last step?
>
> I'm not sure what you mean by this. POV-Ray does not automatically Render on
> the Mac.
The program I'm working on is an extension of a 2D program I've made, where
I did all the rendering in the program itself. When I decided to try some 3D
stuff I started making a raytracer and made a simple little thing. But when
I saw how simple it was to generate a POV file and how much better it
rendered I'm setting it up so I do all the modeling in my program then
render in POV. In my program I have a menu item "Auto POV" (command-A) which
creates my scene file and automatically opens it in POV. Then I press
command-R to render. Go back to my program, change some stuff then
command-A, command-R. I'd like to just have a button I can click that will
create the scene open it and render.
David, (a previous poster) says there's an applescript command 'print' that
with cause a render, but I dont see that in POV's applescript dictionary (I
dont see anything in its dictionary). Maybe thats for MegaPOV, I need to
look into Mega, sounds like it does alot more.
> Josh English
> eng### [at] spiritonecom
>
Thanks very much
-laz
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <B702A4BD.62AE%laz### [at] earthlinknet>,
Lazarus Plath <laz### [at] earthlinknet> wrote:
> David, (a previous poster) says there's an applescript command 'print' that
> with cause a render, but I dont see that in POV's applescript dictionary (I
> dont see anything in its dictionary). Maybe thats for MegaPOV, I need to
> look into Mega, sounds like it does alot more.
Example Applescript from the official Mac distribution--
-- Simple example of using POV-Ray's hidden batch-scripting feature
-- Using the Finder "print" AppleScript
--
tell application "Finder"
-- Start up the POV-Ray application.
-- NOTE: Only do this if it isn't already running
-- run application "POV-Ray PPC"
--
-- Loop through all ".pov" files on top level of your HD
--
set fileList to every file in startup disk whose name ends with ".pov"
-- convert files to pathname string
repeat with f in fileList
tell application "POV-Ray PPC"
print f
end tell
end repeat
end tell
I've never tried it. :-)
RJay
--
http://www.2540dpi.f2s.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Yes, I think that 'print' will render a file. Just look at the "POV Batch
Render Example" script that comes with POV-Ray.
May I ask what this program is? Is it publicly avalible?
______
David McCabe
mcc### [at] yahoocom
http://homepage.mac.com/davidmccabe/
Jesus loves you!
> The program I'm working on is an extension of a 2D program I've made, where
> I did all the rendering in the program itself. When I decided to try some 3D
> stuff I started making a raytracer and made a simple little thing. But when
> I saw how simple it was to generate a POV file and how much better it
> rendered I'm setting it up so I do all the modeling in my program then
> render in POV. In my program I have a menu item "Auto POV" (command-A) which
> creates my scene file and automatically opens it in POV. Then I press
> command-R to render. Go back to my program, change some stuff then
> command-A, command-R. I'd like to just have a button I can click that will
> create the scene open it and render.
>
> David, (a previous poster) says there's an applescript command 'print' that
> with cause a render, but I dont see that in POV's applescript dictionary (I
> dont see anything in its dictionary). Maybe thats for MegaPOV, I need to
> look into Mega, sounds like it does alot more.
>
>> Josh English
>> eng### [at] spiritonecom
>>
>
> Thanks very much
>
> -laz
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I tried to make a Folder Actions version of this script, but couldn't get it
to work. Perhaps I should try it agian.
______
David McCabe
mcc### [at] yahoocom
http://homepage.mac.com/davidmccabe/
Jesus loves you!
>
> Example Applescript from the official Mac distribution--
>
> -- Simple example of using POV-Ray's hidden batch-scripting feature
> -- Using the Finder "print" AppleScript
> --
> tell application "Finder"
> -- Start up the POV-Ray application.
> -- NOTE: Only do this if it isn't already running
> -- run application "POV-Ray PPC"
> --
> -- Loop through all ".pov" files on top level of your HD
> --
> set fileList to every file in startup disk whose name ends with ".pov"
> -- convert files to pathname string
> repeat with f in fileList
> tell application "POV-Ray PPC"
> print f
> end tell
> end repeat
> end tell
>
> I've never tried it. :-)
>
> RJay
>
> --
> http://www.2540dpi.f2s.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|