PDA

View Full Version : PointCloud


lechoo
03-13-2010, 05:19 PM
Hi,
recently I've written plugin which displays position pass as points in Nuke's 3D view.
Feel free to try it: http://www.pxfactory.eu/plug/PointCloud/pointCloud.html

ChristopherP
03-13-2010, 06:34 PM
wow...this is genius! thanks for sharing!!
after watching the district9 fxguidetv episode again recently, we were speaking with some workmates how useful it would be have something like this :)

it works fine with the example files for me (of course ;) ) and seems really fast. way faster than with some gizmos i tried before at least.
i gotta try next week and throw it some more hardcore passes.


cheers
c.

jasonhuang1115
03-14-2010, 05:57 AM
Hi,
Thank you for sharing.

I am wondering what kind of Position pass you need to feed the node. I tried to use a Point pass (world) rendered out of mental ray in Maya, but there is nothing shown in the 3D view of Nuke. Should I use the Point pass (camera) instead?

PS. the example images work just fine.

- Jason

lechoo
03-14-2010, 08:17 AM
Friend of mine tested this plugin with mental ray's position pass and he had no problems. Can you send me single frame from your position pass? My email is at bottom of this (http://www.pxfactory.eu/plug/PointCloud/pointCloud.html) page.
Is there alpha channel in your position pass?

ChristopherP
03-14-2010, 09:56 AM
i just tested it with a MR position render and it seems to work fine. how are you creating the position pass?

but i just noticed a "slight" flaw in the plugin...it's not a 3d-node, as in it wouldn't allow me to wire this in with a 3d camera, scene etc etc.
is that something you can easily put into a next version, lechoo!?


cheers
c.

jasonhuang1115
03-14-2010, 04:37 PM
It turns out that the problem seems to be the alpha channel. Since my Position pass has no alpha channel and is stored in one of the channels of an EXR, I used a Shuffle node to shuffle the Position pass to the RGB and give it a solid white alpha.

It works, but not quite there. I see the 3D representation of the image in the 3D view, but it is rotated 90 degree.

Christopher, I plug the pointWorld of a samplerInfo to a writeToVectorBuffer node to generate the Position pass. The position pass works fine in Nuke with the ReLight node.

Adam, I sent you a down-res EXR. Please take a look and let me know if I set up incorrectly as getting the tilted 3D representation. Echo to Christopher, it will be great if you can make this PointCloud node work with the Nuke 3D camera node.

cheers,
Jason

ChristopherP
03-14-2010, 04:56 PM
i plugged the surfaceSampler-node into a surfaceShader...but should be the same thing :)

when coming from maya, you need to disable that 'swap yz' switch in the pointCloud-node. that might fix the 90 rotation problem you're having...


c.

lechoo
03-14-2010, 08:41 PM
when coming from maya, you need to disable that 'swap yz' switch in the pointCloud-node. that might fix the 90 rotation problem you're having...
Exactly. I did my test images in 3dsmax where up axis is Z. In Maya and XSI its Y. 'Swap yz' fixes this problem.

Echo to Christopher, it will be great if you can make this PointCloud node work with the Nuke 3D camera node.
I'll take look into that tomorrow.

It turns out that the problem seems to be the alpha channel. Since my Position pass has no alpha channel and is stored in one of the channels of an EXR, I used a Shuffle node to shuffle the Position pass to the RGB and give it a solid white alpha.
Right now plugin requires alpha channel. I'll try do something about this.

beaker
03-15-2010, 02:55 PM
Here is another method for creating a P Pass:
http://www.spherevfx.com/html/trainingArticles01.html#10

jasonhuang1115
03-15-2010, 03:09 PM
Here is another method for creating a P Pass:
http://www.spherevfx.com/html/trainingArticles01.html#10

Hi, beaker,

I did try that one first, but it didn't work as expected when my object is not in the center of the world. What is your experience with that method?

- Jason

ChristopherP
03-15-2010, 03:14 PM
i used the method from beaker's link and it worked fine for me. also i can't really see why it shouldn't...the worldCoordinates the node spits out work independently of your objects transforms, constraints, grouping etc etc

do you have a test-frame that shows your problem?


c.

lechoo
03-15-2010, 08:48 PM
Now you should be able to connect PointCloud with scene node. Just re-download plugin from same page: http://www.pxfactory.eu/plug/PointCloud/pointCloud.html
Alpha channel is still required in position pass, I haven't fixed this issue yet.

ChristopherP
03-15-2010, 10:58 PM
adam you rock! :)

i directly have a little request, though...can you make that pointcloud renderable!? i'm thinking about situations where you would want to use it as a holdout for any additional elements/objects you add later in nuke. although i still have to figure out how to do actually do that ;) . but being able to render the output of your plugin would be a first step to that!


cheers
chris

ChristopherP
03-16-2010, 10:49 AM
ok, figured out the holdout-issue. so i guess it would be nice if we could also apply the FillMat-material to the pointCloud...that's what would turn it into a holdout object basically.

Edit: just thinking out loud, here...don't mean to shower you with endless feature requests :)


c.

lechoo
03-16-2010, 09:27 PM
can you make that pointcloud renderable!?
I've been thinking about that from beginning, so far I don't have really good idea how to do that. I could treat points as verts and use them to build mesh. Maybe it will work just fine.

SePu
03-16-2010, 11:14 PM
how do you install this, sorry for the obvious question ... Im not 100% sure ...

thanks

ChristopherP
03-17-2010, 12:12 AM
how do you install this, sorry for the obvious question ... Im not 100% sure ...

thanks

as always there's lots of ways you could do that :)
one simple one is to copy the PointCloud plugin file to your .nuke directory, create a file called "menu.py" (if you haven't already) in the same directory and add

toolbar = nuke.menu('Nodes')
toolbar.addCommand('Other/PointCloud', 'nuke.createNode("PointCloud")')

to it. that will give you the PointCloud plugin in the "Other"-menubar.

hope that made sense ;)

there are also some more tutorial videos from the foundry on adding plugins, scripts etc to your menubar, custom menubars etc etc


cheers
c.

SePu
03-17-2010, 12:31 AM
gotcha .. yeah I knew how to do that .... I just thought that was different since the extension was .dylib didnt know that you could add it like a gizmo .... thanks !

MasonDoran
03-17-2010, 08:54 AM
I am aware of what the point pass is and what it is used for, but can someone explain the practical uses of a Point Cloud beyond just visualization of the point pass? I am still learning these techniques and want to see if I should integrate them.

ChristopherP
03-17-2010, 09:38 AM
I am aware of what the point pass is and what it is used for, but can someone explain the practical uses of a Point Cloud beyond just visualization of the point pass? I am still learning these techniques and want to see if I should integrate them.

watch fxguidetv episode #71 HERE (http://www.fxguide.com/fxguidetv.html) , where they talk about how they used nuke's 3d capablities on district 9...


c.

andrewhake
03-18-2010, 11:49 AM
I love you! :thumbsup: :thumbsup: :thumbsup:

I saw this on the fxguide District 9 demo and was drooling all over my keyboard.

Questions:
-Is there any reason this wouldn't work with sequences? I guess I don't see why it wouldn't work. . .
-Anything else exciting coming up? The other ImageEngine tools may be available at some point from the sound of it, but I hope you may be willing to fill in the gap if not.

Thanks again!

ChristopherP
03-18-2010, 11:52 AM
this works very well with sequence actually :) . i tried throwing 2k-sequences at it...that was a little bit too slow. but down-sizing this to 1k makes it fast enough to work with!


c.

andrewhake
03-18-2010, 11:58 AM
I am aware of what the point pass is and what it is used for, but can someone explain the practical uses of a Point Cloud beyond just visualization of the point pass? I am still learning these techniques and want to see if I should integrate them.

Definitely watch the fxguidetv episode. Where this really shines is the ability to actually layout elements in 3D space in a logical way, and have it work immediately with a tracked camera or a camera coming in from 3D. Plus a number of other things.

this works very well with sequence actually :) . i tried throwing 2k-sequences at it...that was a little bit too slow. but down-sizing this to 1k makes it fast enough to work with!


c.

Wooo! Is there any chance of getting the camera data from the example lechoo? You shouldn't definitely put together some sequence based examples with an animated camera to really show how useful this could be.

I've been thinking about that from beginning, so far I don't have really good idea how to do that. I could treat points as verts and use them to build mesh. Maybe it will work just fine.

yes, yes, and yes. This made my St. Patricks day recovery so much better ^_^

Some more thinking out loud. Wouldn't a version of this that utilizes pointCamera be necessary for production? This version only uses pointWorld passes right? So there is no way to really utilize this with a shot camera from 3D?

jtvergarav
03-18-2010, 02:37 PM
Man this is damn nice.

I'm trying to switch from ae to nuke, but I'm still very slow with it. This kind of stuff encourages me to keep learning this tool.

thanks man!

lechoo
03-18-2010, 08:45 PM
Some more thinking out loud. Wouldn't a version of this that utilizes pointCamera be necessary for production? This version only uses pointWorld passes right? So there is no way to really utilize this with a shot camera from 3D?
It doesn't really matter if you use world or camera space in position pass. Plugin works the same way.
i tried throwing 2k-sequences at it...that was a little bit too slow. but down-sizing this to 1k makes it fast enough to work with!
I'll ad integer knob which will cause plugin to load only Nth pixel. This should speed things up in higher resolutions. Otherwise there's always reformat.
Anything else exciting coming up?
I'm playing around with fractals in nuke. This is fun project which I'm hoping to finish in few weeks time if I'm not too busy at work. Nothing big, simple image warper.

jasonhuang1115
03-21-2010, 08:47 PM
i used the method from beaker's link and it worked fine for me. also i can't really see why it shouldn't...the worldCoordinates the node spits out work independently of your objects transforms, constraints, grouping etc etc

do you have a test-frame that shows your problem?

Hi, Christopher,

The method posted on SphereVFX works fine with their test scene (a sport car) as I tested it, but not in my other scenes.
I create some poly spheres and render Position (world) pass using two different approaches. Here are two screen caps for comparison.

SphereVFX method.
http://screensnapr.com/u/5ihhfp.png

WriteToVectorBuffer method
http://screensnapr.com/u/z4n4oi.png

Does the SphereVFX method work in all your scenes?

- Jason

ChristopherP
03-21-2010, 09:19 PM
so far, yes...no problems. are you checking for correct values in nuke!? because the color-display in maya or other apps can look wonky since you'll most likely have negative values in your image.
that's also why you should render to EXRs, float or half-float...


c.

jasonhuang1115
03-21-2010, 10:34 PM
so far, yes...no problems. are you checking for correct values in nuke!? because the color-display in maya or other apps can look wonky since you'll most likely have negative values in your image.
that's also why you should render to EXRs, float or half-float...
c.

Thanks, Christopher. You are totally right. When I load both rendered images in Nuke, they look identical. :thumbsup:

Aneks
03-22-2010, 12:15 PM
been having a bit of a play with this. I noticed that simple scaling both input images with a reformat will help a lot when dealing with 2k and larger files. easy enough to wire up as a userKnob but would be keen to see this added to the plugin.

great work overall !

andrewhake
03-22-2010, 12:36 PM
One must batch render to get EXRs out of Maya correct? I feel like such a twat but I am having issues with getting something out of Maya that gets proper results in Nuke.

fail:

http://i44.tinypic.com/3482a8g.png

Just don't have a lot (or any) experience with relighting in nuke (missed the fxphd course >_<) and would love to learn this technique in particular. I understand how to create the shader, but it would be great if someone could outline the proper method of getting an EXR out of maya with all the proper values for this plugin.

Thanks.

ChristopherP
03-22-2010, 01:05 PM
from the screenshots it looks like you're doing the right thing...

have you tried disabling the y/z-switch!?


c.

treedee
03-22-2010, 05:45 PM
Great Share! Thank you...

I'm also getting different results than the example files provided using the link Beaker sent earlier in the post or Method #2. However I'm also rendering from the render view and not batch, maybe thats the issue? So many possibilities with this plugin looking forward to seeing it evolve!

ChristopherP
03-22-2010, 06:01 PM
rendering from the maya render-view is definitely not going to work, because it's only 8-bit - no matter what you selected as ouput-format.


c.

treedee
03-22-2010, 06:23 PM
rendering from the maya render-view is definitely not going to work, because it's only 8-bit - no matter what you selected as ouput-format.


c.


Thats what I thought however the sphere vfx site states it could be rendered via render view. Would be nice if there was an EXR format as an output via render view without having to batch...thanks for the correction!

thehive
03-22-2010, 06:24 PM
this is freaking awesome thanks

AlphaJoe
03-23-2010, 10:13 PM
For those of you rendering from Maya and getting everything rotated, drop a shuffle node on your world position pass and swap the red and blue channels. That planted everything perfectly in Nuke's 3D space for me.

ChristopherP
03-23-2010, 10:18 PM
For those of you rendering from Maya and getting everything rotated, drop a shuffle node on your world position pass and swap the red and blue channels. That planted everything perfectly in Nuke's 3D space for me.

isn't that the same what the "swap y/z" switch in the pointCloud-node is doing!?


c.

edit: that's scary...get out of my head, tahl ;)

Aneks
03-23-2010, 10:18 PM
you probably don't need the shuffle node. Just untick the SwapYZ knob in the Point Cloud node.

Edit : both posted at the same time !

AlphaJoe
03-24-2010, 12:06 PM
You know, I saw those posts, and at a glance I didn't initially see the checkbox because of where it was located. I expected it to be on its own line. My bad.

Ziye-Liu
09-08-2010, 10:22 AM
Hi,
recently I've written plugin which displays position pass as points in Nuke's 3D view.
Feel free to try it: http://www.pxfactory.eu/plug/PointCloud/pointCloud.html
your my savior

CGTalk Moderation
09-08-2010, 10:22 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.