Projection Puzzle

Forums: Projection Puzzle
Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)

Projection Puzzle

Postby Andreas_Resch » Wed May 24, 2023 9:32 am

Andreas_Resch Wed May 24, 2023 9:32 am
I have a little puzzle for the trigonometry specialists here. In the node setup below you can see a little spotlight that I've scaled and rotated into a place where I like it. I would like to see that as the "neutral" setup. What I want to do now, is to stack a transformation on top of that so that I can rotate that setup in world coordinates. Let's say I want to light to come from the opposite side of the sphere, I would like to rotate the setup by 180° on the Z axis to achieve that. But now I would have to touch several value to get the light there.
In the unlinked node below you can see how I would rotate the light by 90°. That's basically what I want to do - but to the already transformed light. In Blender I can do that by sequencing vector transformations. But in Octane there doesn't seem to be a way to sequence projections.

I hope I have explained it well enough. Any help is appreciated.

Projection_01.jpg
Andreas_Resch
 
Posts: 269
Joined: Sat Jul 28, 2018 6:29 am

Re: Projection Puzzle

Postby jobigoud » Wed May 24, 2023 1:56 pm

jobigoud Wed May 24, 2023 1:56 pm
Chaining projections should be doable by making an OSL projection that takes another projection as input.
I think it would be placed in between, so your current spherical projection would plug into it, and this new programmatic projection would use the position resulting from your spherical projection as its input (instead of the global P). It would then take its own transform and apply it to the input point and return the result.
User avatar
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Re: Projection Puzzle

Postby Andreas_Resch » Wed May 24, 2023 2:19 pm

Andreas_Resch Wed May 24, 2023 2:19 pm
Yeah. I also thought that this might work. But unfortunately my OSL programming skills are zero. If there's a way to solve this with the internal nodes it would be preferable. You always have to keep those OSL shaders with your project files which is extra maintenance. But if anybody has the time to create such an OSL shader, it would be great. Cheers.

A good workround - at least for my setup that I use a lot - was to bake all my HDRs into new zeroed-out HDRs. I can combine them now and just "add" the rotation to them equally. It's worth the time if you use the setup a lot. But for the occasional set, a stacked version might be preferable.
Andreas_Resch
 
Posts: 269
Joined: Sat Jul 28, 2018 6:29 am

Re: Projection Puzzle

Postby jobigoud » Wed May 24, 2023 3:26 pm

jobigoud Wed May 24, 2023 3:26 pm
There is also the texture node called "UVW transform" (Octane texture > Mapping > UVW transform). It takes a texture and a transform, see if that could help. In this case it would go after your RGB image.
User avatar
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Re: Projection Puzzle

Postby Andreas_Resch » Wed May 24, 2023 3:37 pm

Andreas_Resch Wed May 24, 2023 3:37 pm
jobigoud wrote:There is also the texture node called "UVW transform" (Octane texture > Mapping > UVW transform). It takes a texture and a transform, see if that could help. In this case it would go after your RGB image.


Thanks. I've tried that. But that works in object space and I would need the transformations to work in world space. And with the projection located before all that in the chain, all the axis are off. I guess an intermediate OSL projection will be the way to go.
Andreas_Resch
 
Posts: 269
Joined: Sat Jul 28, 2018 6:29 am

Return to Blender


Who is online

Users browsing this forum: No registered users and 27 guests

Sat Apr 27, 2024 10:57 pm [ UTC ]