Jump to content
Oliver Markowski

how would i apply a disparity map in cops?

Recommended Posts

Hey guys,

 

i tried the whole night but i decided to ask you if somebody tried this before. I also looked at the "Velocity Blur" but it seems to be broken since ages and it obviously does not what it's supposed to do...

 

i have a color plane and a disparity plane containing the vector along which i want to shift my pixels.

1st question: do i need a VOP COP2 generator or filter to do that kind of image distortion?

2nd question: how do i write to a specific pixels during a FOR-LOOP? is that even possible?

 

this issue also applies to everyone that would try to do a proper velocity blur, but it is not as complex yet since i don't need to draw a line, but just need to move one pixel to another position (for now)

 

Please tell me that this is doable in COPs....

BTW: i don't care about performance for now!

 

thx in advance

Oli

Edited by Oliver Markowski

Share this post


Link to post
Share on other sites

Hi Oli,

 

How about using deform cop? That should be able to do pixel displacement.

 

cheers,

Kustaa

Share this post


Link to post
Share on other sites

Hi Oli,

 

How about using deform cop? That should be able to do pixel displacement.

 

cheers,

Kustaa

 

Thx Kustaa for the advice!

 

This is basically what I wanted, but it is not working as expected (see attachment), since i guess that i need some more options, so it seems i have to build this from scratch...

Can somebody give me a hint how I could do such a deform_COP with vex (or better with VOP COP2)? Any resources that might be interesting?

 

thx

Oli

...

deform_COP.zip

Edited by Oliver Markowski

Share this post


Link to post
Share on other sites

Hey John,

 

i don't know if you remember me, but we actually met at Siggraph 2013!

 

Thx for your hip file, but it seems there is something wrong. I have attached an image of the desired output that i am expecting. This is a proper 3d render which we will of course not be able to reproduce because of occlusion artifacts,but at least it's a good guide for what i am looking for.

 

I also attached a nuke script which shows the reverse effect using an idistort in Nuke to show that the disparity is correct. but it just works for distorting the other way around from desiredOutput to beauty...not from my beauty to the desired output...

 

cheers

Oli

desiredOutput.zip

Share this post


Link to post
Share on other sites

Hey Guys,

 

i needed to go into HDK to solve this problem and it seems that I'm on the right track...but there is a lot of work ahead of me i think...

 

i attached my initial plugin, hip file and exr files here...i compiled the .so against H13.0.571-linux-x86_64-gcc4.6 on Centos 7

see the screenshot if you just want to know what this is all about...

 

if someone finds a way to do this in VEX please let me know!!!

 

cheers

Oli

 

COP2_DeformForwardFilter.zip

post-4341-0-71803700-1414419870_thumb.pn

Edited by Oliver Markowski
  • Like 1

Share this post


Link to post
Share on other sites

Hey Oliver,

 

Yes! I remember meeting you at Siggraph in Anaheim!

 

Sorry it's taken me a while to get back to you, I've been pretty busy with work this week.

 

It should be possible to achieve results like your expecting in VEX, I'll try to take another look at it later this week.  The main issue I was having was using the copinput node to sample pixel values from another image plane.  It takes the sample position in uv (0-1) values instead of actual pixel integer, so there's a bit of remapping different ranges I need to do to get it to match closer to the reference.

 

What is the expression node doing in your nuke file?  Was it to amplify the distance that the source image was moved by the disparity map?

Share this post


Link to post
Share on other sites

What is the expression node doing in your nuke file?  Was it to amplify the distance that the source image was moved by the disparity map?

 

This node just takes the 0-1 values from the diparity map to the actual amount of pixels that the point needs to be shifted...Red gets multiplied by 1920 and green by 1080...

Share this post


Link to post
Share on other sites

Are you using the disparity map for stereo?

More or less...i use it to generate new viewpoints in my scene....i do this in houdini just as a proof of concept...after that i need to get this done on the GPU in realtime...does anyone know a good resource on how to do this?

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

×