PDA

View Full Version : mia material and outputs


newuser2008
06-27-2008, 02:02 AM
Just started using the mia material and really like them. However the output to buffers seems really confusing i must say.

1: Is it the case that the primary buffer will get tonemapped if i output to an 8bit rgba file but the rest of the buffers wont get tonemapped?

2: I cant use geometry shaders (like the p_MegaTK_pass) to output passes with the miax material?

3: Do i have to use outputs like the buffer_store and connect all miax material to an individual buffer_Store shader and then create a mentalrayuserbuffer for each pass i want to output? Thats such!!! an annoying workflow if thats the case.

4: Found a shader on mymentalray.com called miaxOutputControl (http://www.mymentalray.com/index.php?option=com_shaders&Itemid=108&Action=DisplayDetail&ObjectId=35), but it didnt make any sense to me at all? Only one tickbox for each pass can be ticked in at a time?

5: Also seen the renderpass toolkit 1.0 but not to sold on the concept. Do you have to use the mia phenomena that ghost has created or will it work with standard mia/miax material? Doesnt seem so cause i only get blank buffers but a correct primary when using the miax material.

Thanks for any feedback/help on the topic!

newuser2008
06-27-2008, 04:31 AM
So in reply to my own question. If i use a buffer store for each miax material i can then use a buffer_write connected to the camera and a buffer_api as a geometry shader. But now in order to get tonemapping on buffers working i have to set that option on the cntrl shaders which will then ignore my lens shader on my camera, so instead i have to drop the lens shader and have all tonemapping done via the cntrl shaders? And then also maintain it on booth the api and write shader?

Also anyone know about some sort of documentation for the cntrl buffer shaders? I mean how does:
Exposure, gamma, bias, contrast, luma max, luma min, luma avg
correspond to the mia_exposures_simple:
pedestal, gain, knee, compression, gamma??

newuser2008
06-30-2008, 12:14 AM
So carried on testing over the weekend and must say i found more questions then solutions.
Set up a test scene so you guys can have a look at what im talking about:
http://rapidshare.com/files/125962975/buffer_out_testscene.mb.html

With this setup i would expect my rendered buffers to have the same settings as my primary. I.e i have enabled tonemapping for booth the cntrl_api and the cntrl_writer. However my buffers are totally unusable with these settings?

If i turn off tonemapping on the cntrl_writer and set the .tonemap.buffers(but not main) then i seem to get the correct output however my buffers all of a sudden change order??? And ao_raw and indirect turns out empty but diffuse and reflection are ok? However i want my primary buffer to be tonemapped AND my buffers to be tonemapped too! :(

What settings am i suppose to be using to get the same tonemapped look on my buffers as on my primary?

djx
06-30-2008, 01:40 PM
There is some info at http://www.wiki.render3d.de/doku.php?id=renderwiki:techniques:passes:mr which mentions some different shaders that you might want to look at.

I think that ghostlake114 did a really great job with the render pass toolkit. You do have to use his phenomena but it replicates the mia_material_x so it is still easy to work with.

And puppets p_MegaTK is another one.

-- David

newuser2008
06-30-2008, 02:06 PM
Ghostlakes workflow suffers the same problems as i described above. The only difference is his phenomena which uses the buffer_store shader which my scene contains too. The buffers using his workflow still wont get tonemapped. I can see that this might not be a big issue if youre outputting to 32 bit float and can do this in post. However im outputting to Autodesk Flame operators which cant handle 32 bit floating precision. So what i want to do is use the compression/gamma/knee/gain settings etc to get a better 8 bit render and there fore i have to be able to tone map all my framebuffers cause i cant do it in post. Sorry if this wasnt clear before :)

JayHoo
07-01-2008, 03:45 PM
I tried this miaxOutputControl shader but it does not work. I think I connected it correctly but no file could be rendered.

ghostlake114
07-01-2008, 04:36 PM
Ghostlakes workflow suffers the same problems as i described above. The only difference is his phenomena which uses the buffer_store shader which my scene contains too. The buffers using his workflow still wont get tonemapped. I can see that this might not be a big issue if youre outputting to 32 bit float and can do this in post. However im outputting to Autodesk Flame operators which cant handle 32 bit floating precision. So what i want to do is use the compression/gamma/knee/gain settings etc to get a better 8 bit render and there fore i have to be able to tone map all my framebuffers cause i cant do it in post. Sorry if this wasnt clear before :)

Tonemap buffer is what I research for time and here is solution, at least it work

1. Use mia_exp_simple: easiest thing set gamma and gain in your final compositing = in this node. And then make a little tweak you get the similar result before go into enhance the result with pass inside.

2. Using the tonemap in buffer.api. I normally set gamma here = 2.2 so get a 'linear' work flow. To get buffer tonemap check the option tonemap second buffers (as I remember) and you got the buffer tonemap.

Currently no way to make mia_photo lense shader work. They has a complex tonemap math and I can not figure how to replicate it in compositing apps

newuser2008
07-02-2008, 01:44 AM
Alrite, that seems to produce something. But now im back to the question of how
Exposure, gamma, bias, contrast, luma max, luma min, luma avg
of the cntrl_api correspond to the mia_exposures_simple:
pedestal, gain, knee, compression, gamma
????

The tonemapping that takes place in my lens shader does not correspond to what happends if i simply set the gamma to be the same in the api but leave the rest of the settings to default.

Would be great if any of the people working at Cntrl studios could clarify how these settings work, and if its even possible to get these two tonemapping procedures to output the same result?

I.e

I have these settings on my simple lens shader>>
setAttr "mia_exposure_simple2.pedestal" 0
setAttr "mia_exposure_simple2.gain" 1
setAttr "mia_exposure_simple2.knee" 0.5
setAttr "mia_exposure_simple2.compression" 2
setAttr "mia_exposure_simple2.gamma" 1.8

How do i set these settings to align with that result:
setAttr "glbufferapi.tone_exp"
setAttr "glbufferapi.tone_gamma"
setAttr "glbufferapi.tone_bias"
setAttr "glbufferapi.tone_conp"
setAttr "glbufferapi.tone_lummax"
setAttr "glbufferapi.tone_lummin"
setAttr "glbufferapi.tone_lumavg"

Thanks


Also: just to clarify:
All compositing here is supposed to be additive right?
diffuse+indirect+reflective

ghostlake114
07-02-2008, 02:10 AM
The tonemap in buffer.api is not shared the same agroth with the mia_simple one, so does not expect these kind of 'translation'. I am talking about workflow. If you chose the tonemap in buffer.api, use it and consider it as the tonemap for the whole your work flow, forget about the mia_simple thing.

newuser2008
07-02-2008, 03:09 AM
Haha ok but then im back to the problem where the cntrl_api ad cntrl_buffer dont produce the same tonemapping output.

cntrl_api set to tonemap primary but not buffers
cntrl_buffer set to tonemap with same algorithm as cntrl_api (adaptive logmap) and same settings.

That creates buffers that are totally useless.

????

ghostlake114
07-02-2008, 03:41 AM
The tonemap in buffer.write come with an issue
http://forums.cgsociety.org/showpost.php?p=5132292&postcount=783

so dont use it

Problem is buffer.api DO NOT allow use tonemap both main buffer and other second buffer at the same time. But the trick to do them is simple. Create TWO buffer.api in the scene with same setting, one for tonemap seconds buffer. :deal:

newuser2008
07-02-2008, 03:45 AM
Aha! that was my problem too, ok so nasty hack solution is the only way to solve it then.
Thanks for that one ghostlake!

newuser2008
07-02-2008, 04:02 AM
Did you actually try that technique ghostlake? Cause my two renders dont look the same after i composite them together. Primary is a lot darker then my buffers added together?

ghostlake114
07-02-2008, 04:28 AM
I am using it and found no problem,? Both main and second is tonemaped.

newuser2008
07-02-2008, 04:39 AM
Do you think you would have time to send me a scene with the correct setup ghostlake? :)
cant for the life of me get the output im expecting.

Many thanks!

newuser2008
07-02-2008, 04:50 AM
placed my test scene here:
http://rapidshare.com/files/126474297/buffer_out_testscene2.mb.html

newuser2008
07-06-2008, 03:55 AM
So i take it this is properly broken in the cntrl buffer shaders then?

CGTalk Moderation
07-06-2008, 03:55 AM
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.