Node to rotate a texture?

I’m wondering if anyone has a tip for me.

I often work with HDRI direct visibility override, but the HDRI image/file is the same as the environment texture, just rotated somewhat. See the attached image below.

The problem is that I need to have a duplicate of the HDRI. If I change the hdri or edit its settings I have to do it twice. Once for the environment and again for the direct override.

Is there some sort of node I can plug in a texture into as an intermediate so it takes the texture and rotates it more? Does this make sense?

Again, see the attached image for how I expect it could work.

Thanks for any help!

Corona mapping randomizer should do the trick for you.

Dammmmm, so simple I never thought of it!

Thanks Romullus, that will indeed do the trick

You’re welcome!

Actually, I jumped the gun there!..

Testing this… it doesn’t work?

What should my settings in the randomizer be? Say; I want to rotate the direct one by 90 degrees (so the sun moves left or right) what should I do? Nothing seems to work.

Indeed it doesn’t. Strange, but i think i remember that this used to work, maybe something got broken at some point? I also found that W rotation in Corona bitmap rotates in wrong axis when in spherical mode. Something seems not right here. Anyway, sorry for misleading, it seems you’ll need to find other solution.

You could try the following setup: plug the Default Output to the Environment slot, and apply a self illuminated CoronaMtl to a geosphere that will act as a “geometry direct override” if that makes sense.

If you rotate the HDRi, the rotation is reflected on the geosphere as well. But if you want the geosphere to have a different orientation than your HDRi all you have to do is to rotate it in the Top viewport.
You will have to find the correct orientation of the geosphere first so that its mapping matches the one of the environment slot, and play with the self-illumination intensity as well but this setup works.

I hope it helps.


Another possible option would be to use controller nodes for parameter linking.

Yes, I was thinking of that possibility too, but didn’t find how to do that.
Could you explain a bit further?

Sure, it’s very simple operation. You don’t have to wire every single control, just those that you want to be instanced.
sme-controller-wiring.gif

Thanks.
But this is not what he wants: he doesn’t want to instance the rotation value, he wants a control to change the rotation of only one map, and the two maps being instanced.

Then you don’t wire rotation and wire everything else. I think the only option that can’t be instanced is loading of bitmap itself, so if you’d want to change HDRI, you have to do it on both nodes.

Surprisingly difficult problem :smiley:
I thought BerconMapping Map could help but it doesn’t work on environment maps, only 2D/Object/Screen.
UVW Randomizer does funny things, too.

Hey Dev’s, any idea why this is happening? It should work, right?

My guess is because there is no checkbox for ‘env’ randomization then it doesn’t know to apply the randomness to the env slot?

OSL might do what you’re after, maybe?

Ideally, you would use the OSL UVW Transform map and it should be enough, but it simply multiples the input values, does not transform.

While this:

works exactly as you would expect. So give it a go.

P.S. it actually works for CoronaBitmap too (instead of OSL file name map), it is just 3ds Max that does not show the node connection lines, but it is there.

I would love for the uv randomizer node to be able to work on HDRI/envir bitmaps. I have the exact same issue as OP. Having to load multiple bitmap nodes of the same HDRI for different camera angles or reflection overrides feels like a waste. Just being able to drop a rotation node inbetween would be amazing. Just like we can do with color correction etc and reuse the same HDRI/bitmap.

If uv randomizer node had an “environment” checkbox so we could just do a fixed rotation, would be lovely :smiley:

Hi,

Not sure what your workflow is, but randomizer is not a “rotate-only” node, so maybe another thing should be used or should be done in another way.
Do per-camera environment overrides apply to your case by the way?

Well it can be, just leave all values at 0 (including blending and uncheck randomize tile) and put in a fixed interval in rotation like 45-45. Or am I missing something here?

It does, but I use Pulze scene manager for this. It works great, but I still find it a hassle and silly having to load in the same HDRI multiple times just to be able to rotate it on a per camera basis.

I’ve just posted it as a feature request btw.

Well it depends what exactly you need.
If the same background/environemnt for all cameras - then it is environment overrides.

If the same environment rotated in real as camera rotates - then no rotation is needed I think, if the environment is full (spherical e.g.).

I think I am don’t fully understand the use case and what exactly you need rotated in which case.
Aren’t the available 3ds Max maps working for you?