Author Topic: TG2's Tonemapping algorithm?  (Read 3927 times)

Offline Floating.Point

  • Member
  • *
  • Posts: 86
TG2's Tonemapping algorithm?
« on: November 04, 2010, 10:55:36 PM »
Hey gang,

Im doing some TG2 work and comping in additional 3D foreground objects.
Im doing my comping with the 32bpc linear .exr out of TG2...

The thing is, I love the way terragen tonemaps its renders, can anyone shed some light as to how I would achieve the same results in Photoshop?
It seems no matter what I try, I cannot get photoshop to tonemap the same way TG2 does it :(

Does anyone know what I'm on about?

One thing's for sure- I'm very under-slept so please forgive me my gibberish :)

Offline RArcher

  • Member
  • *
  • Posts: 1062
    • Archer Designs
Re: TG2's Tonemapping algorithm?
« Reply #1 on: November 04, 2010, 11:01:54 PM »
I may be missing some of what you are trying to do, but if you like the way that TG tonemaps a finished render is there any reason not to use the .bmp or .tif image instead of the .exr image?  If you are tonemapping in PS anyway you aren't saving the 32 bit depth anyway correct?

I use the .exr image because I prefer the flexibility of doing postwork afterward, but if you already like the way TG spits out the image then why bother with .exr?

Offline Floating.Point

  • Member
  • *
  • Posts: 86
Re: TG2's Tonemapping algorithm?
« Reply #2 on: November 05, 2010, 12:29:22 AM »
Heya, thanks for getting back to me :)

If I use the TG2 .bmp and try comp with that, i still have the issue of not matching the tonemapping of my foreground cg with the TG2 baked-in tonemapping.
My hope is to comp together the CG + TG2 .exr in linear color 32bpc, then tonemap the whole image the same / similar to how TG2 does it....

Thanks

-FP

Edit: Perhaps I just need to get practicing with adjusting the tone curves in photoshop... any suggestions?
« Last Edit: November 05, 2010, 10:02:40 AM by Floating.Point »

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: TG2's Tonemapping algorithm?
« Reply #3 on: November 05, 2010, 11:12:54 AM »
The tone-mapping algorithm in TG2 is proprietary as far as I know.
I don't know whether you would like to know it, or really need to know it, otherwise you can ask Matt about it.
In the meantime some tone-mapping excercise would never hurt I guess? :)

Martin

Offline Floating.Point

  • Member
  • *
  • Posts: 86
Re: TG2's Tonemapping algorithm?
« Reply #4 on: November 05, 2010, 05:37:17 PM »
Im not sure I could do anything with the algorithm... I couldn't even program a salutation to the planet.  ::)
But I would love the ability to apply TG2's tonemapping to images I have already done some work with...
Im not sure if anyone agrees, (or even notices) but TG2's tonemapping is very very good!


Offline RArcher

  • Member
  • *
  • Posts: 1062
    • Archer Designs
Re: TG2's Tonemapping algorithm?
« Reply #5 on: November 05, 2010, 07:08:31 PM »
Thanks for explaining why you want to do what you are doing!  Makes perfect sense now that you explained it, I haven't done much comp work so it wasn't something I had really thought about.

It will certainly be very tricky to get the .exr file to look exactly the same as the TG2 tonemapped version.  Each scene would need to be handled differently.  If you were doing a shot of something without bright highlights it wouldn't be too bad, but clouds and sky are very tricky to deal with in .exr.

Only real suggestions I have are to possibly try some very subtle tonemapping adjustments in photomatix (very easy to make things look terrible here)  or simply raise or lower the gamma when you import the .exr into photoshop until you get similar visible features to what is output by TG, then adjust contrast and brightness to match the stock output.

Offline Mandrake

  • Member
  • *
  • Posts: 515
Re: TG2's Tonemapping algorithm?
« Reply #6 on: November 17, 2010, 03:49:40 PM »
I can use the word color instead of tone?
I did a comparison once of rgb from C4D to PoseRay to TG2 and not matter what, you get different rgb values in each program upon importing the same object.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3583
  • I'm the crazy one
Re: TG2's Tonemapping algorithm?
« Reply #7 on: November 17, 2010, 10:49:14 PM »
Im not sure I could do anything with the algorithm... I couldn't even program a salutation to the planet.  ::)
But I would love the ability to apply TG2's tonemapping to images I have already done some work with...
Im not sure if anyone agrees, (or even notices) but TG2's tonemapping is very very good!

It's nice to know that my tone mapper is appreciated! I want to keep the details closely guarded though, as I've always felt it gives Terragen images some help out of the box. If you want to approximate this in Photoshop, I have a couple of suggestions. The first thing you need to do is preserve highlights that are above 1 and bring them into the normal range. You might want to import the EXR with a lower exposure value so that very little of the image is clipped, and then use Curves to boost the rest of the image back up to where you want it.
Just because milk is white doesn't mean that clouds are made of milk.

Offline Floating.Point

  • Member
  • *
  • Posts: 86
Re: TG2's Tonemapping algorithm?
« Reply #8 on: November 23, 2010, 09:53:13 AM »
Cheers Matt-

Happy to show gratitude for your tonemapping algorithm, i really do think its beautiful :)

I have access to Nuke at my Uni and have been getting some nice results in there...
But there is something magic in TG2 which I cannot for the life of me replicate :)

Perhaps you could write TG2 plug-in or little companion app which will load up pre-rendered .exr's and apply your tonemapping?
I'd appreciate / even pay for that :)

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3583
  • I'm the crazy one
Re: TG2's Tonemapping algorithm?
« Reply #9 on: November 24, 2010, 03:07:09 AM »
Cheers Matt-

Happy to show gratitude for your tonemapping algorithm, i really do think its beautiful :)

I have access to Nuke at my Uni and have been getting some nice results in there...
But there is something magic in TG2 which I cannot for the life of me replicate :)

The SoftClip node in Nuke doesn't do the same as Terragen, but I think there are some similarities. You should give that a try if you haven't already.

Quote
Perhaps you could write TG2 plug-in or little companion app which will load up pre-rendered .exr's and apply your tonemapping?
I'd appreciate / even pay for that :)

The way I'd thought about solving this problem was to be able to load EXRs into TG's RenderView and adjust exposure and tonemapping options on the fly. (I will do that in some future update, but we haven't exactly put that in the schedule.) A separate EXR processing app might be a quicker solution. I am not sure it's possible any time soon, as we are on a very focused schedule at the moment.
Just because milk is white doesn't mean that clouds are made of milk.

Offline AP

  • Member
  • *
  • Posts: 2743
Re: TG2's Tonemapping algorithm?
« Reply #10 on: November 24, 2010, 04:18:48 AM »
Bryce 7 can load .hdr probes. It is an interesting way of how it is done amongst other things.


Offline Floating.Point

  • Member
  • *
  • Posts: 86
Re: TG2's Tonemapping algorithm?
« Reply #11 on: November 30, 2010, 11:07:05 AM »
Yeah, Ive been playing with Nuke's softclip as well as F_contrast... good but not "TG2 GREAT!" :)
The ability to load images into the viewer and edit exposure / tone would be awesome!

I think the render viewer could be improved in other aspects as well,
Such as maintaining a history with which a series of renders could be viewed and compared... ideally with an A/B slider. This would be perfect for setting up elements of the scene that require a lot of quick renders
(kind of like how cinema4D does it as seen below)
(apologies this has gotten a bit off topic)
   

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 13208
  • Holy snagging ducks!
Re: TG2's Tonemapping algorithm?
« Reply #12 on: December 01, 2010, 02:21:16 AM »
Yes, we have similar kinds of improvements to the render viewer in mind for the future.

- Oshyan

 

anything