Jump to content
Sign in to follow this  
hkspowers

Houdini UV Map COP 1 pixel missing bug?

Recommended Posts

Hey guys,

 

Our tracker asked me to write him out a 2d UV map today from Houdini because he was running into a bug in Nuke where the resulting UV Map would have a missing .5 pixels on each side of the frame for a total of 1 missing pixel . However, when he generated the UV Map out of out of 3d Equalizer it was correct and it was not missing a pixel.  

 

So I took a crack at it and ran out said UV Map from Houdini, and sure enough it came out identical to Nuke's UV Map with the missing pixel.  

 

 

If I load in the generated UV Map into Nuke as an STMap input and add a checkerboard with the same res as the UV map into the STMap node and compare them, the difference in resolution is very clear.  

 

Has anyone run into this or is there a reason for this behavior?  Any ideas would be appreciated.

 

Houdini 15.0.347

Edited by hkspowers

Share this post


Link to post
Share on other sites

How did you export UV map from Houdini?

Did you use B plane (reserved for that purpose) or you simple write to C plane ( RGB channels)?  Using C plane for that purpose is basically wrong  (except you exactly know what you are doing)  because sRGB color space have gamma of 2.2 which will distort such UV coordinates on C plane. By other words you will lose linear gradient across UV space if export UV just as RGB values.

Also UV (generally any channel which handle space information like P, N, Zdepth, UV or any other should be exported as 32 bit float so it can handle all possible float values such channel could have)

 

About "missing pixel" .... Are you talking about UV generated from camera projection or what? What type of node you are using for UV generation? Did you turn on FIX BOUNDARY SEAMS option on it?

  • Like 1

Share this post


Link to post
Share on other sites

Its been a while but I ran into a similar issue when procedurally generating displacement maps. This 1 pixel border gives a nasty edge to your displacements.  In that case I tried  to dilate erode in cops to blur the edges of maps in these areas but to limited success. 

 

My understanding is that there will always be a 1 pixel seam because the uv coords for the verts that wrap to the other side of the uv space will not be oriented exactly the same. 

 

This is a somewhat similar situation to what i had.  

http://polygonspixelsandpaint.tumblr.com/post/19733351349

 

From what I remember reading at the time, this 1 pixel border is an inherent problem with UVs, and is why we get UV seams at the boundary of UV islands,

that being the case Houdini and Nuke may be giving you the correct (though annoying) result. Though why 3de gives you something different is confusing. 

 

R

  • Like 1

Share this post


Link to post
Share on other sites

How did you export UV map from Houdini?

Did you use B plane (reserved for that purpose) or you simple write to C plane ( RGB channels)?  Using C plane for that purpose is basically wrong  (except you exactly know what you are doing)  because sRGB color space have gamma of 2.2 which will distort such UV coordinates on C plane. By other words you will lose linear gradient across UV space if export UV just as RGB values.

Also UV (generally any channel which handle space information like P, N, Zdepth, UV or any other should be exported as 32 bit float so it can handle all possible float values such channel could have)

 

About "missing pixel" .... Are you talking about UV generated from camera projection or what? What type of node you are using for UV generation? Did you turn on FIX BOUNDARY SEAMS option on it?

Thanks Djiki!

 

I used the "UV Map" node in cops to generate the UV map.  As it turns out, I was indeed writing out the UV data to the c plane, I didn't realize this would cause an issue.  I tried writing it out to the B plane as you suggested and it works perfectly now.

 

Thanks again!

Share this post


Link to post
Share on other sites

Hello,

I see djiki mentioned B plane, I can see that in display properties of the renderview, the defaults for color correcting the planes are 

* ^P ^Pz ^N ^M ^B ^V ^Af

 

I don't know which planes it refers to with M and B, can someone explain what those are please?  :huh:

 

thanks!

Share this post


Link to post
Share on other sites

In Houdini COP module (IMG2, composite module) you have nodes manipulating different channels over an image like you have in other composite software. M plane refers to mask (in general meanings), B plane general vector plane etc. The catch is that standard C plane (RGB) internally has different handling routines (clamped negative values, applied gamma etc) while B plane process vector data as is. That is the reason why UV map exported using C plane will produce errors in external software.

Share this post


Link to post
Share on other sites

Oh I didn't understood we were in COP! 

Thanks a lot for the explanation, I didn't know.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×