in fact, i don't understand the true difference between pixel and float values..
So why pixel bender makes differences between theses types ?
If pixel bender is strongly typed, i am sure there is a big difference. But without real time debugger, it is pretty difficult for me to see it.
Maybe pixel are unsigned ?
1 person found this helpful
At the beginning I thought pixel type means always casting into [0 1] while float isn't clipped.
Yet, if you look for it on the forum, There is no difference between pixel and float in PB at the moment.
They had ideas at the beginning how pixel should be different, however they never made it.
Thanks Royi A
So i will use pixel values when it makes sense for anyone who read my code.
And i will use float values for arithmetics purposes.
Thanks for your reply. really ^^ I was not sure....
To describe the background, i am trying a PB to remap texture on CG render. It requires 2 inputs, the uv channel and the texture. The uv channel is a special map rendered with cg soft (maya, max, xsi, etc.) where uv space is mapped in the 32 bits u(0.0 , 1.0) v(0.0 , 1.0) space
where red channel stands for u
green channel stands for v
bleu channel stands for pixel coverage between geometry
alpha stands for cropping and acceleration structure.
To tell things speedy (frenchy syntax) : i query the uv map to retrieve the alpha, blue, red and green channels, then i sample the second input (the texture to remap) to write output accordingly. In fact i come from uv space to screen space mapping.
Because the result is very aliased, i use (actually) a graph to propagate output to a fragment for B-spline super sampling.
That is, the super sampling is done after transformations. It is a screen space super sampling. it is not ideal :/ but i don't know how to deal with super sampling before transformations with keeping "full pixel datas" ... :/ I don't know how to keep track of image4 pixels... because of paralellism of evaluatepixel()
I publish parameters to select nodeRenderID, offset and tile texture onto the geometry. Actually the filter needs to be applied several time to remap serveral geometry on a single picture (based on renderID)
In fact this filter is similar to autodesk combustion 3D-texmap operator with screen space mitchell-netravali sampling. If you see what i mean... ^^
I don't do it for fun, i do it because my customer needs to remap his customer's picture on CG product-render in real time with flash. I hope my PB will export to pbj regarding limitations ; graph not allowed :$ I will deal with it later. One thing at a time.
I will try 2 filters in pipeline.... well really i don't know if PB is my solution. lot of work to be done !! ^^ But i try it !! Hope it helps. I can't do it in ActionScript without heavy payload on customer's cpu. That's why i try PB
If i can achieve the result I will distribute it for free on adobe exchange when it's done : A texmap filter with screen space anti aliasing for flash and toshop as least
again, excuse me for my frenchy bytecode
That's the logic I use.
If it's a calculation of a pixel (Meaning assuming Domain and Range in [0 1]) I use pixel type.
If it's an auxiliary calculation I use float.
Sorry, I don't have much knowledge in Computer Graphics.
My knowledge in in the Image Processing world.
Wish you success with your code.
1 person found this helpful
Royi was correct. float and pixel are interchangeable. I think the idea of using pixel for output values and float for computation values is a good convention. I may recommend that in the future.
just to edit my previous post, of course i wanted to write "maybe float are unsigned" not pixel ^^
PB are very fun to work with. ^^