Defining new output format ?

Wie schreibt man ein Phenomenon, bzw. einen Shader?

Defining new output format ?

Postby 2000hoschi on Fri Aug 13, 2010 10:52 am

Hi people - I'm new to this topic - my background is realtime gaming but now I've to work a little bit with mentalray.

Maybe it's a simple quation for you - but I don't figured it out right now :-(
What I want to do is render a bunch of pictures - ok that's simple :-)
but I want to write them with -file_type "fastaccess" in my own file format.
I've heard that's possible to define your own file output format but I cant figure it out :-(((((((

Some hints from you ?????
Many thanks
Hoschi
2000hoschi
Neuankömmling
 
Posts: 2
Joined: Fri Aug 13, 2010 10:41 am

Re: Defining new output format ?

Postby haggi on Fri Aug 13, 2010 11:07 am

If you want to use mentalray, you can only use the built in filetypes - as much as I know. The only way to export images to your pripriatary format is the use of an output shader.

An output shader will be called after the rendering is done, and after the framebuffers are filtered into the final pixels. There you have a free access to the whole image and you can implement your own file type.
haggi
Admin
 
Posts: 752
Joined: Wed Jan 10, 2007 0:56 am

Re: Defining new output format ?

Postby 2000hoschi on Fri Aug 13, 2010 13:13 pm

Hi haggi,

thanks for your fast response !
OK I've seen the code for programming an outputshader and as I understand and understand your post in the right way I'm manipulating the image itself before mr writes the picture ?
So if I definde -file_type tif I can manipulate the picture before but the written file will be always a tif file format - with the tif header and pixel coding inside - right ? (That's what I want to override :-) )
Plus I've to parse the output mi file (it's most of the time written from maya stations) and "patch" the mi file to declare my outputshader ?

Right ? ????
Hoschi
2000hoschi
Neuankömmling
 
Posts: 2
Joined: Fri Aug 13, 2010 10:41 am

Re: Defining new output format ?

Postby haggi on Fri Aug 13, 2010 14:16 pm

Yes, exactly. The written file by mentalray is always a tif file. But from the output shader where you have access to all pixels, you can simply write the pixels to your own image format and ignore the file written by mentalray.

You dont have to parse the mi file. You can attach the output shader to the camera inside your 3d application. Of course you can do it if you want.
haggi
Admin
 
Posts: 752
Joined: Wed Jan 10, 2007 0:56 am

Return to Writing Shader and Phenomena®

Who is online

Users browsing this forum: No registered users and 1 guest