View topic - Spherical map with yafaray and pfstools

Spherical map with yafaray and pfstools

Post here tutorials and links to tutorials about YafaRay and other CG training material related to YafaRay

Spherical map with yafaray and pfstools

Post Tue Oct 19, 2010 4:41 am

it's more like a tip than a whole tutorial :D. ..remember to install pfstools (or qtpfsgui if you don't like to work in console)

http://pfstools.sourceforge.net/
http://qtpfsgui.sourceforge.net/

1.- First we need to render an Angular map, changing the camera type to ... guess what... Angular :P. "Angle" and "Max Angle" set to 180 and don't forget to check "Mirrored" and "Circular" buttons.

2.- The render must be a square image so change the resolution in Blender. In the example is 1400x1400.

3.-Render and save in any format you want but EXR and HDR will let you use the image later as IBL. (Make your own Light Probe images is really easy :D. )

4.- in console you just need to go to the folder where the angular image is saved and run the command

"pfsin [angularmap name] | pfspanoramic angular+polar -i -o 5 -y 0 | pfsout [spherical map name]"

in the example I run

pfsin angularmap.exr | pfspanoramic angular+polar -i -o 5 -y 0 | pfsout spherical.jpg

* if you want to resize the image just change "-y 0" for "-y W" where W is the final image width in pixels (in the example -y 700 will produce the same spherical map but at half size)
* "-o 5" is for oversample factor. normal values are 3 to 5

5.- The Spherical map can be open with any Panoramic viewer.. I tried PTviewer and FSPviewer.


Now... for all you guys that really hate to work in console, Luminance 2 (known as Qtpfsgui) will make your life easier, but you will need to work with HDR images (exr or hdr). Just open the angular.exr and then go to Edit -> Projective Transformation. and set:

Source Projection: Angular, Destination Projection: Polar, Oversample 5 and click OK
after that you can make tonemapping and save as PNG or JPG.
Attachments
spherical.jpg
final Spherical Map
angularmap.jpg
angularmap in LDR format
angularmap.exr.7z
angular map in HDRI format
(2 MiB) Downloaded 459 times
camerasettings.png
camera settings in Yafaray
camerasettings.png (6.13 KiB) Viewed 10772 times
luminance.jpg
setings in Luminance 2.0 (Qtpfsgui)
spherical.ogv.7z
opening spherical.jpg with PTviewer
(1.11 MiB) Downloaded 454 times

"Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men."

User avatar
condar
 
Posts: 771
Joined: Sun Apr 12, 2009 2:41 am

Re: Spherical map with yafaray and pfstools

Post Sat Feb 26, 2011 10:07 am

Hi condar,
could you please write in a few words how did you create the scene for rendering in your example?
User avatar
black
 
Posts: 8
Joined: Sat Feb 26, 2011 9:49 am

Re: Spherical map with yafaray and pfstools

Post Sat Feb 26, 2011 4:31 pm

camera at (0,0,1) pointing to Y+ , a plane at (0,0,1) on the origin and scaled to get a ground, Darktide Sunsky for the background, any 3d model you want around the camera to get a reference :)

"Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men."

User avatar
condar
 
Posts: 771
Joined: Sun Apr 12, 2009 2:41 am

Re: Spherical map with yafaray and pfstools

Post Sat Feb 26, 2011 6:10 pm

Thanks a lot, condar! I think now I know everything to make something similar.
User avatar
black
 
Posts: 8
Joined: Sat Feb 26, 2011 9:49 am


Return to Tutorials & Learning Resources



Who is online

Users browsing this forum: No registered users and 1 guest

cron