It is currently Thu Apr 18, 2024 12:09 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 20 posts ] 
Author Message
 Post subject: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Tue Aug 29, 2017 4:58 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
As I was choosing a gradient to use in a picture in GIMP recently I inadvertently right clicked on one and saw that the drop-down menu included the option to save (the gradient) "..as POV-Ray", not having an idea what this meant I saved it anyway, then DuckDuckGo'd "POV-Ray". 'Interesting', I thought, a graphics application of some kind :) ... I downloaded and installed POV-Ray v3.7 for Windows. I soon realised the program is script-based therefore I would have to learn the ins-and-outs of the syntax used (nightmare, I'm still trying to get my head around Python lol) - anyway I've spotted some tutorials on YT (https://www.youtube.com/watch?v=1ZDWcEQrqsc for instance) so I hope to get something done with that soon... (finger's crossed). Can anybody tell me though, how can I use the file I saved (the gradient) in the POV-Ray program, not sure if anyone out there is familiar with it, but for starters I can't find anything so far in the 'POV_Ray Help' about gradients, let alone which format they have to be saved in or what one has to do with the file (maybe point to it within a POV-Ray script somehow (??)).
Anyway, would appreciate any help if anyone has a clue about it, if not I'll just soldier on hope to make something like this person's first animation(!) https://www.youtube.com/watch?v=exL5B7LapUo
Cheers.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Tue Aug 29, 2017 7:31 am  (#2) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
GIMP saves the gradient as a POV-Ray colour_map: http://www.povray.org/documentation/view/3.7.0/335/ which is a pigment modifier.

Try the example in the linked page, along with one of the standard scenes.

I'll try and find some time to experiment with it this evening.

Kevin


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Tue Aug 29, 2017 7:38 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
Thanks for finding that! It makes a lot more sense now, great! :)

EDIT: Just rendered my first object, using a gradient from GIMP (Basic Magenta White HSVCW):

Copied bits of code from here n there, adapted it and came up with this:
Image

This is how I did it:

   #include "colors.inc"

camera {
   location <0,0,-5>
   look_at <0,0,0>
}                 

light_source {
   <5, 4, -8>
   White
   
}

sphere {
    <0,1,2>, 2
    pigment {
      gradient x*y+0.3
color_map {
   [0.000000 color rgbt <1.000000, 0.000000, 1.000000, 0.000000>]
   [0.500000 color rgbt <1.000000, 0.500000, 1.000000, 0.000000>]
   [1.000000 color rgbt <1.000000, 1.000000, 1.000000, 0.000000>]
}
          }
         
           } 


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Tue Aug 29, 2017 6:40 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
That's pretty nice!

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Tue Aug 29, 2017 7:12 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1825
Dang, I just watched a very impressive animation video done with POV-Ray!

www.youtube.com Video from : www.youtube.com


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Wed Aug 30, 2017 1:39 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
PhotoMaster wrote:
That's pretty nice!

Thanks! Just a start...

racer-x wrote:
Dang, I just watched a very impressive animation video done with POV-Ray!


That's amazing, well I'm not quite there yet, only been at it a few hours !

However, managed to render a little GIF (with the help of GIMP..:) )
Image


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Thu Aug 31, 2017 3:25 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1825
Did you do the morphing in gimp or povray? If you did it in gimp, what plugin did you use?


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Thu Aug 31, 2017 3:45 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
I used GIMP / 'G'MIC>Layers>Morph layers' for that, using high precision but low smoothness. I only recently discovered it tbh.


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Thu Aug 31, 2017 7:45 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
You can animate warping in IWARP also. For example i created an ellipse and filled it with a gradient.
Then i opened IWARP warped the oval into a fish shape and saved it as a 25 layer animation. Below is the animated PNG version

Image

For those who cannot see the APNG file here is a GIF version.

Image

You can get the files to add animated png (APNG) export to GIMP-2.8.22 by going here.
viewtopic.php?f=9&t=212&hilit=IWARP&start=110#p31336

32 and 64 bit files are available for the Animated PNG setup. (windows only i am afraid)

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Thu Aug 31, 2017 8:04 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Image

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Thu Aug 31, 2017 10:55 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
cool fishes :coolthup

Can't get the APNG thing to work, I see the option 'PNG/APNG' but trying to save it and nothing happens...


All I can do is squash or expand things, not artistic enough to warp it into an actual image (!)


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Fri Sep 01, 2017 7:16 pm  (#12) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1825
G'mic's layers morph plugin doesn't really morph, it mostly just cross fades. I have made warping animations with gimp's Iwarp before, but won't post them because they're not politically correct...

I've used a few morphing plugins before where you set the morphing points for the before/after images. It looks more realistic.


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Sun Sep 03, 2017 10:26 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
racer-x wrote:
G'mic's layers morph plugin doesn't really morph, it mostly just cross fades. I have made warping animations with gimp's Iwarp before, but won't post them because they're not politically correct...

I've used a few morphing plugins before where you set the morphing points for the before/after images. It looks more realistic.

Most of the time i use flash for morphing objects. IWarp is great in a pinch though. :)

Quote:
Can't get the APNG thing to work, I see the option 'PNG/APNG' but trying to save it and nothing happens...

You don't have to save as an animated PNG image you can use GIF. BUT try removing the file-png.exe from the program directory /lib/gimp/2.0/plug-ins folder and GIMP should recognize either APNG multi layers or PNG single layer images.

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Mon Sep 04, 2017 11:50 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
Rod wrote:
You don't have to save as an animated PNG image you can use GIF. BUT try removing the file-png.exe from the program directory /lib/gimp/2.0/plug-ins folder and GIMP should recognize either APNG multi layers or PNG single layer images.


OK I'll try that thanks.


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Mon Sep 04, 2017 12:06 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
Great got that working now, a 720 layer 640x360 animation exported as an APNG is 73MB in this case, 55 MB's more than a GIF made with the same images (optimized) - to be expected as the colour's certainly are better in the APNG... anyway now we've strayed from the original topic of this thread (POV-Ray) by some margin :lol so I'll leave it at that for now.
Cheers


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Mon Sep 04, 2017 10:30 pm  (#16) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7712
Location: On the other side of this screen
:coolthup video

_________________


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Tue Sep 05, 2017 12:38 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
Wow! These are all pretty sharp! I do have to say that the auto engine video was amazing!

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Sun Sep 10, 2017 12:05 am  (#18) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
I've used povray for creating objects I've used in mapping, and to create maps as well. It is extremely powerful, but great and easy for mathematical/scripted/repetitive shapes.


I made this paddlewheel for a top down paddlewheeler map:
Attachment:
8E3_paddle_wheel_double_overlap_wood_rma.png
8E3_paddle_wheel_double_overlap_wood_rma.png [ 366.04 KiB | Viewed 2174 times ]


Palm trees (I was able to randomize a few dozen in size and leaf orientation so they wouldn't repeat when used):
Attachment:
palm2_RMA.png
palm2_RMA.png [ 241.68 KiB | Viewed 2174 times ]


Asteroids from a videogame:
Attachment:
rock_render1.gif
rock_render1.gif [ 164.5 KiB | Viewed 2174 times ]


I've also used POVRay to render height-fields of objects,shapes and entire maps, like this one:
Image

-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Sun Sep 10, 2017 12:31 am  (#19) 
Offline
Script Coder
User avatar

Joined: Jul 14, 2010
Posts: 697
A couple more for fun - cross eye stereogram renders of a planet from a heightfield:
Attachment:
planet_stereo.png
planet_stereo.png [ 443.02 KiB | Viewed 2174 times ]


And the cover art for a dice game package:
Attachment:
pic1093393_lg.jpg
pic1093393_lg.jpg [ 360.77 KiB | Viewed 2174 times ]


-Rob A>

_________________
Image
Fantasy Cartography and Mapping by RobA


Top
 Post subject: Re: POV-Ray (Persistence of Vision Raytracer)
PostPosted: Thu Sep 14, 2017 12:07 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2017
Posts: 204
Really good outcomes RobA, lots of potential in the program I can see... have left it gathering dust in the corner of my desktop for now but hope to get back into it again soon.
Cheers


Top
Post new topic Reply to topic  [ 20 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group