PDA

View Full Version : Image Buffer replacement



MSherak
06-15-2007, 03:05 PM
Basically want to know if there is a way to do this after the image is rendered.. If you are wondering.. It's for storing an imaging for real-time normal mapping, spec and transparency.. This way you get 3 images into 1 32-bit image..

32-bit image
----------------
Red Channel = Specularity
Green Channel = Color Red
Blue Channel = Transparency
Alpha Channel = Color Green

Yes this means you would be baking the normal map and seperating the y and x into the green and alpha channel..

Jarno
06-15-2007, 11:32 PM
A simple image filter should do. Here's a little LScript image filter that does it:


@version 2.6
@warnings
@script image
@name SherakBaker

process: ifo
{
for(i = 1; i <= ifo.height; ++i)
{
for(j = 1; j <= ifo.width; ++j)
{
specularity = ifo.specular[j,i];
red = ifo.red[j,i];
transparency = ifo.trans[j,i];
green = ifo.green[j,i];

ifo.red[j,i] = specularity;
ifo.green[j,i] = red;
ifo.blue[j,i] = transparency;
ifo.alpha[j,i] = green;
}
}
}


---JvdL---

dpont
06-16-2007, 01:05 AM
You could use also an Image Filter node editor,
and separate, mix any kind of channels/buffer.

Denis.

MSherak
06-18-2007, 12:26 PM
Thank you guys..

Trying both.. Basically making a pipeline where you texture to your hearts content on a model.. Hit render and it bakes everything needed for textures in the correct format for the engine..

Will keep you posted on how it goes..

WaxSteel
11-11-2007, 12:48 PM
You could use also an Image Filter node editor,
and separate, mix any kind of channels/buffer.

Denis.

Sorry to barge in but I have a question regarding this subject.

I'm currently attempting to wade through the examples of this nodal multipass rendering, and many of the these examples end up plugging into a "pixelFilter" or "imageFilter" node. Are these standard lw nodes or are they part of the dPont nodelImage filter download. I have installed this in 9.3 & have the following listed in the DP Kit > Get Extra Buffer, Mixer, Render Buffer, Replace Spot, Store Extra Buffer.

I cant find the pixelFilter or imageFilter nodes anywhere, but then I havent been using nodes very long & this is a bit of a jump in the deep end for me.

Am I missing anything critical in order to be able to save something ( a normal pass) out as a external buffer render?