Jump to content

how would i apply a disparity map in cops?


Oliver Markowski

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
Link to comment
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
Link to comment
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

Link to comment
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
Link to comment
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?

Link to comment
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...

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...