Page 1 of 1

Object position pass- Feature Request

PostPosted: Wed Aug 23, 2017 9:16 pm
by wellsichris
So one thing I really wish we had, and I can't find anyone bringing it up, But an object position pass.

So an object position pass, is like a world position pass except the values stick to the object's surface. this allows you to do the same things you do with world position except it sticks the the object as it moves through the scene, it's super super useful.

The import part is it also works with deforming objects, this allows you to isolate the hand of a character as it walks around for example. You can also use it with post texturing to do cubic texturing in comp. stick textures onto models as they move in post.

Thanks
Chris

Re: Object position pass- Feature Request

PostPosted: Wed Aug 23, 2017 10:30 pm
by milanm
+1

I guess we could fake it, as a texture, with a shader setup but that means we would have to render it out separately. And that's not a small task if you have a scene with a lot of deforming geometry. Also, now we are forced to render 32bit float EXR files instead of 16bit float for all of our passes just because our scene is covering a large area.

Regards
Milan

Re: Object position pass- Feature Request

PostPosted: Wed Aug 23, 2017 10:55 pm
by Goldorak
wellsichris wrote:So one thing I really wish we had, and I can't find anyone bringing it up, But an object position pass.

So an object position pass, is like a world position pass except the values stick to the object's surface. this allows you to do the same things you do with world position except it sticks the the object as it moves through the scene, it's super super useful.

The import part is it also works with deforming objects, this allows you to isolate the hand of a character as it walks around for example. You can also use it with post texturing to do cubic texturing in comp. stick textures onto models as they move in post.

Thanks
Chris


I agree it's needed. I think it will be possible to generate the map for such a pass using an OSL texture in 3.08 (P in OSL is position and can be transformed into Object, world or camera/tangent space in shader), and then attach it to a render job node to effectively get the AOV you want .

Re: Object position pass- Feature Request

PostPosted: Wed May 30, 2018 12:55 pm
by HHbomb
Any news about world position pass ?

Re: Object position pass- Feature Request

PostPosted: Thu Apr 20, 2023 9:43 am
by decade
I am in a position of desperately needing an object position pass to finish a project.
Until now, I have been using Redshift to produce the object position pass - but for a couple of shots we need to use real in-camera motion blur, so I need it to come out of Octane directly.
I tried camera projecting the Redshift position pass render onto my geometry in a global texture AOV - but it doesn't respond correctly to motion blur.
I also tried the OSL shader approach mentioned earlier, my code looks like this:

shader objectPosition(
point Vector = P,
point ObjVector = transform("common", "object", Vector),
output color Col_Out = color(0)

)

{
float x = ObjVector[0];
float y = ObjVector[1];
float z = ObjVector[2];

float colX = 0;
float colY = 0;
float colZ = 0;

if (x>0)
colX = 1;

if (y>0)
colY = 1;

if (z>0)
colZ = 1;

Col_Out = color(colX,colY,colZ);
}

If I use Vector P directly, I get some results, but not the world space I would expect - instead, X & Y seem more like in some kind of UV space & z is always constant blue.
As soon as I use the transform command to try to convert it to object space, the result is just black on every axis.
If anyone has any idea how to get an object position pass out of Octane I'd be very grateful.

Re: Object position pass- Feature Request

PostPosted: Thu Apr 20, 2023 10:34 am
by funk
How about using a global texture AOV with a position texture set to object coordinates?

I attached a sample scene. Would this work for you?

object_coord_aov_001.png

Re: Object position pass- Feature Request

PostPosted: Thu Apr 20, 2023 1:20 pm
by decade
That's crazy ! I'm using the Cinema 4D plugin & that node isn't listed in the textures group in the node editor, or anywhere in the right-click menu in the node-editor. Nor is it in the shaders list in the non-node interface either.
But when I use the search box on the node window, it's there & it works.
A position node was the 1st thing I looked for & missed it.
It looks different to the Redshift one, which is more on-off, rather than a gradient, but I wouldn't be surprised if it would work.
Thanks a lot for your help, I wonder how many more nodes are not put in the interface.