[SOLVED] Karma spherical uv projection
5337 17 6- Ivan L
- Member
- 200 posts
- Joined: Jan. 2014
- Offline
Hi,
We have "UV project" nodes for Arnold and Redshift, but is there a karma alternative for that?
https://docs.arnoldrenderer.com/display/A5AFHUG/UV+Projection [docs.arnoldrenderer.com]
https://docs.redshift3d.com/display/RSDOCS/UV+Projection [docs.redshift3d.com]
Thank you
We have "UV project" nodes for Arnold and Redshift, but is there a karma alternative for that?
https://docs.arnoldrenderer.com/display/A5AFHUG/UV+Projection [docs.arnoldrenderer.com]
https://docs.redshift3d.com/display/RSDOCS/UV+Projection [docs.redshift3d.com]
Thank you
Edited by Ivan L - March 31, 2021 11:31:18
I contribute to the beauty of this world
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
https://houdininotes.ivanlarinin.com/ [houdininotes.ivanlarinin.com]
- mestela
- Member
- 1796 posts
- Joined: May 2006
- Online
- jsmack
- Member
- 8038 posts
- Joined: Sept. 2011
- Offline
Why are the nodes out of order for Arnold? It's not like you can take a texture, find out the color for the current ray, then get a projection matrix and go "oh wait, lol not that pixel, I wanted this one over here." The only way it makes sense is if the types are all fake and the texture node is returning a texture sampler object that gets evaluated later. In that case calling it 'rgba' is a bit disingenuous.
- tamte
- Member
- 8780 posts
- Joined: July 2007
- Offline
jsmackat this point this is irrelevant, since Arnold is owned by AD so all logic goes out of the window
Why are the nodes out of order for Arnold? It's not like you can take a texture, find out the color for the current ray, then get a projection matrix and go "oh wait, lol not that pixel, I wanted this one over here." The only way it makes sense is if the types are all fake and the texture node is returning a texture sampler object that gets evaluated later. In that case calling it 'rgba' is a bit disingenuous.
on the other hand RS screenshot is not any better
Edited by tamte - March 31, 2021 18:29:06
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- jsmack
- Member
- 8038 posts
- Joined: Sept. 2011
- Offline
tamtejsmackat this point this is irrelevant, since Arnold is owned by AD so all logic goes out of the window
Why are the nodes out of order for Arnold? It's not like you can take a texture, find out the color for the current ray, then get a projection matrix and go "oh wait, lol not that pixel, I wanted this one over here." The only way it makes sense is if the types are all fake and the texture node is returning a texture sampler object that gets evaluated later. In that case calling it 'rgba' is a bit disingenuous.
on the other hand RS screenshot is not any better
The 'Red' is short for "Red-iculous"
- celmer
- Member
- 4 posts
- Joined:
- Offline
I took a quick look at your example file @mestela, but I'm unable to get a working render. It's coming up on a year since the post... perhaps something has changed in later versions of Karma that would break the setup? I've checked that my pathed texture is valid.
I'm using H19.0.383. Screenshot of my result attached. Thanks for any help!
I'm using H19.0.383. Screenshot of my result attached. Thanks for any help!
- jsmack
- Member
- 8038 posts
- Joined: Sept. 2011
- Offline
celmer
I took a quick look at your example file @mestela, but I'm unable to get a working render. It's coming up on a year since the post... perhaps something has changed in later versions of Karma that would break the setup? I've checked that my pathed texture is valid.
I'm using H19.0.383. Screenshot of my result attached. Thanks for any help!
Your screenshot would indicate using XPU. VEX nodes don't(won't ever) work with XPU. XPU only works with materialX nodes. MtlX has a variety of trig and other math nodes which should make performing a polar projection trivial.
- celmer
- Member
- 4 posts
- Joined:
- Offline
- pete4d
- Member
- 11 posts
- Joined: May 2014
- Offline
@jack
Would you be able to help making a mtlx polar projection? Having difficulties creating one... Thank you.
jsmackcelmer
I took a quick look at your example file @mestela, but I'm unable to get a working render. It's coming up on a year since the post... perhaps something has changed in later versions of Karma that would break the setup? I've checked that my pathed texture is valid.
I'm using H19.0.383. Screenshot of my result attached. Thanks for any help!
Your screenshot would indicate using XPU. VEX nodes don't(won't ever) work with XPU. XPU only works with materialX nodes. MtlX has a variety of trig and other math nodes which should make performing a polar projection trivial.
Would you be able to help making a mtlx polar projection? Having difficulties creating one... Thank you.
- pete4d
- Member
- 11 posts
- Joined: May 2014
- Offline
Here my poor attempt to get the spherical projection to work with mtlx.
It kinda works but something is still not right with the node hookups.
As reference you can see the principled shader behave correctly in my video. Check below out.
@jsmack would you be able to lend a hand and seeing how I can fix the mtlx nodes to behave correctly?
It kinda works but something is still not right with the node hookups.
As reference you can see the principled shader behave correctly in my video. Check below out.
@jsmack would you be able to lend a hand and seeing how I can fix the mtlx nodes to behave correctly?
Edited by pete4d - April 9, 2024 19:19:34
- brians
- Staff
- 530 posts
- Joined: May 2019
- Offline
- pete4d
- Member
- 11 posts
- Joined: May 2014
- Offline
briansThanks so much. This is really great brians.
Here is an example MaterialX implementation
Do you have an idea how I could achieve being able to transform the origin of the polar projection similar to how I managed it working with Arnolds shipped nodes? Have a look at my video.
The idea is to transform a chromeball HDR which I align with its manipulators and spherically project against a set geometry (lidar etc).
The mtlx polar seems to need some additoinal transform matrix logic so I can transform the projection against geometry.
Maybe you have some ideas how to extend your example further? Appreciate.
Edited by pete4d - April 10, 2024 08:21:46
- jsmack
- Member
- 8038 posts
- Joined: Sept. 2011
- Offline
pete4d
Do you have an idea how I could achieve being able to transform the origin of the polar projection similar to how I managed it working with Arnolds shipped nodes? Have a look at my video.
You could take advantage of the object space of the mesh. transform the meshe's vertices such that the projection center is at the origin, then transform the prim or a parent prim of the mesh back to the correct position (the inverse of the previous transform.) Then the space 'object' in the shader will refer to the un-transformed space.
To manually manipulate the space, the add and rotate nodes can be used. The transform matrix node was not implemented last time I tried to use it, but maybe that has changed. A matrix node requires a matrix though, so you're on your own for generating one using python or vex or something and then pasting the values in. materialX is missing the required nodes for actually manipulating or importing matrices.
- pete4d
- Member
- 11 posts
- Joined: May 2014
- Offline
jsmackThe first suggestion seems to make sense to implement. I dont have experience with those kinda transformations - if you had some time to use @brians example and imitate the arnold example I posted that would be fab. cheers @jsmackpete4d
Do you have an idea how I could achieve being able to transform the origin of the polar projection similar to how I managed it working with Arnolds shipped nodes? Have a look at my video.
You could take advantage of the object space of the mesh. transform the meshe's vertices such that the projection center is at the origin, then transform the prim or a parent prim of the mesh back to the correct position (the inverse of the previous transform.) Then the space 'object' in the shader will refer to the un-transformed space.
To manually manipulate the space, the add and rotate nodes can be used. The transform matrix node was not implemented last time I tried to use it, but maybe that has changed. A matrix node requires a matrix though, so you're on your own for generating one using python or vex or something and then pasting the values in. materialX is missing the required nodes for actually manipulating or importing matrices.
- MR SMITH
- Member
- 32 posts
- Joined: Aug. 2011
- Online
- pete4d
- Member
- 11 posts
- Joined: May 2014
- Offline
- jsmack
- Member
- 8038 posts
- Joined: Sept. 2011
- Offline
pete4d
Fantastic!!!! We just need to add scale now. With different scene scales of your lidar/set geometry you will want to scale the HDR sphercial projection up and down and overlay as close as possible.
You can reference another object's transform using a coordys. There are some minor scene hierarchy limitations to coordsys, however.
This will get a full transform from the object and can even do camera (perspective ndc) projections. Scale is applied, although polar projections are scale invariant so it will have no effect unless it's a non-uniform scale.
- AK1176
- Member
- 2 posts
- Joined: March 2024
- Offline
jsmackpete4d
Fantastic!!!! We just need to add scale now. With different scene scales of your lidar/set geometry you will want to scale the HDR sphercial projection up and down and overlay as close as possible.
You can reference another object's transform using a coordys. There are some minor scene hierarchy limitations to coordsys, however.
This will get a full transform from the object and can even do camera (perspective ndc) projections. Scale is applied, although polar projections are scale invariant so it will have no effect unless it's a non-uniform scale.
This is really great!
I've been looking for this exact thing for a while now.
Would you be able to recommend something to watch or read to learn more about how this all works jsmack?
-
- Quick Links