PDA

View Full Version : Synthetic HDRIs


meselfs
04-08-2004, 01:50 AM
Everyone knows how useful HDRIs can be...

...and anyone who uses them knows how poor the selection of downloadable HDRIs are.
Some of the dowlnoadable HDRIs, such as the well abused kitchen & campus probes, aren't very good quality.

This tutorial will show you how to make perfect HDRIs, the only catch is that they are synthetic, which takes away from the notion of "rendering with natural lighting".

Making HDRIs with Terragen

This one is easy and fast. I'll show how to make HDRIs with C4D later in this document.
I've found 2 similar tutorials for this procedure on the net, this document gives you the best of both plus my contribution. Also, you can make your probe with only Terragen & HDRShop , no other 3D app needed.

1. Get these Terragen plugins:

http://www2.cs.uh.edu/~somalley/sopack.html
http://www.rna.hr/tutorial01/Cube.tgs

And these apps:

http://www.debevec.org/HDRShop/
http://www2.cs.uh.edu/~somalley/binaries/cube2cross.zip

2. Make your Terragen scene (duh).

3. Setup your render so that HDRs will be outputted:
In render control, click Camera Settings
Click effects
Click Plus (+) sign
Select SO HDR Output
Double click on SO HDR Output
Press OK
Choose a filename and location.

4. Click Terragen>Execute Script . Find and run the Cube.tgs you downloaded.

5. Once rendering is done, find your files. Actually, this is the tricky part, as such scripts tend to write their files in almost randomized locations. Find the files yourself (it is probably in the same folder as the script, but it could be anywhere related to terragen, or it could be in C:\).

6. Each HDR will end with a number, this number is a timestamp. Rename the files (they are listed in order of render) this way:

*_ft.hdr
*_rt.hdr
*_bk.hdr
*_lt.hdr
*_up.hdr
*_dn.hdr

For example, if Terragen outputted these files:

Cloudscapes00012.hdr
Cloudscapes00013.hdr
Cloudscapes00014.hdr
Cloudscapes00015.hdr
Cloudscapes00016.hdr
Cloudscapes00017.hdr

Rename to:

Cloudscapes_ft.hdr
Cloudscapes_rt.hdr
Cloudscapes_bk.hdr
Cloudscapes_lt.hdr
Cloudscapes_up.hdr
Cloudscapes_dn.hdr

7. Run cube2cross.exe. Navigate to the renamed files, select one of them, press Open. Cube2Cross will take care of the rest. You will find a new file in the directory called (eg.) Cloudscapes_cross.hdr

The following shows how to convert your cross to a probe. If you use C4D, don't do this, instead open C4D, click Plugins>Advanced Render>Convert HDRI Cross.

8. Run HDRShop, open the cross. It should be a fairly large file, don't worry about that...

9. Click Image>Panorama>Panoramic Transformations, for source image set format to Cubic Environment (Vertical Cross) , for destination image to Light Probe (Angular Map).
Now set SuperSample to a higher number... you'll have to experiment. Obviously, the higher the number the slower the conversion. But what is it for? With it set to one, you'll find some seems that came straight from your cubic HDR into the Probe. The higher you set Supersample, the better these lines will be eliminated. I usually use 6.

10. Save your HDR and your done! Remember that the Gamma for this image is not 1, you will have to adjust Gamma per use (use Filter shader in C4D).

Making HDRIs with C4D

This is essentially the same as the above process, with one big exception: C4D cannot render to an HDR, and no plugin is available to remedy that. So, you must do this:

1) First, set camera Filed of View to 90 degrees. Now animate your camera so that its actions matches that of the Terragen cube script:

Frame 1:
H 0
P 0
B 0

Frame 2:
H 90
P 0
B 0


Frame 3:
H 180
P 0
B 0


Frame 4:
H 270
P 0
B 0

Frame 5:
H 0
P 90
B 0

Frame 6:
H 0
P -90
B 0

2. Before you render, open the Render Settings window and go to the Effects page. Add a Color Correction effect and set the gamma to .5 .

3. Render all six frames

4. Now set gamma to 1.5 and render the six frames again.

5. Use HDRShop to convert each pair images to HDRs. Refer to the HDRShop tutorial (you will not have to worry about camera curves...):

http://www.debevec.org/HDRShop/tutorial/tutorial3.html

6. Once you have these 6 HDRs just pick up at step 6 of the Terragen tutorial.

That's all!





C4D users Note: When used for GI, make certain you use a Sky object for best results. Remember to use Spherical Projection.
Also, set Sampling for the image (in material editor) to Alias 3. This will kill all noticeable and pixelation.

Hope this helps :->

CGTalk Moderation
01-17-2006, 11:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.