Author Topic: Node to rotate a texture?  (Read 2696 times)

2024-04-13, 05:58:14
Reply #15

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 786
    • View Profile
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:
OSL might do what you're after, maybe?

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.
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-11-08, 10:43:13
Reply #16

Jens

  • Active Users
  • **
  • Posts: 218
    • View Profile
    • Ikonoform
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 :)
My small 3D model shop: www.ikonoform.com/shop
My arch viz blog: www.ikonoform.com/blog

2024-11-08, 10:49:30
Reply #17

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 786
    • View Profile
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 :)

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?
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-11-08, 10:54:38
Reply #18

Jens

  • Active Users
  • **
  • Posts: 218
    • View Profile
    • Ikonoform
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.
My small 3D model shop: www.ikonoform.com/shop
My arch viz blog: www.ikonoform.com/blog

2024-11-08, 11:03:53
Reply #19

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 786
    • View Profile
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?
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-11-11, 16:07:05
Reply #20

Jens

  • Active Users
  • **
  • Posts: 218
    • View Profile
    • Ikonoform
Let me try and give an example:

We have an archviz scene: A new office building on a busy street.

Two images are needed of this building. One street view, and one from the courtyard behind the building. Client wants weather to be the same for consistency.

I start with the street view. I set up the scene with a corona bitmap and load and HDRI as primary light source, sky background and to get some reflection in the glass of the facade. I rotate the bitmap on the bitmap properties to get the effect I want.

Now, it's not always that you can get the light you want, the reflections in the glass of the sky AND the look of the directly visible sky you want. Sure you can change the directly visible sky in post etc. but thats not the point.

In order to achive control of the above, I would have to copy the HDRI bitmap node 2 times so I have a total of 3 of the same HDRI bitmap nodes. Now I can control environment rotation and output of each of them. One for environment lighting, one for reflection override and one for direct visibility override.

Now I want to reuse the same HDRI for camera angle 2 (the courtyard shot). However the HDRI used for the street scene doesn't give optimal light or might look wrong in reflections/direct visibility. If I just go in and rotate the HDRI directly, I lose the setup for the street view. Hence I would have to copy those 3 HDRI bitmap nodes again so I can adjust them as I want for the new camera angle. Ending up in a total of 6 copies of the same 1gig .exr file, just because I can't rotate it with nodes that I can hook into environtment/refl, refrac and direct override. Like in the way you could reuse a brick texture plugged in to different color correction nodes to reuse same file for different look.

What we want is to be able to do the above, but with only the same 1 HDRI bitmap node connected to any number of individual UV rotation nodes.

It keeps the max scene tidier, easier to control, less clutter/confusion/renaming in material editor and smaller max file size (i think).

Hope this helps :)
My small 3D model shop: www.ikonoform.com/shop
My arch viz blog: www.ikonoform.com/blog

2024-11-11, 17:45:01
Reply #21

pokoy

  • Active Users
  • **
  • Posts: 1942
    • View Profile
An image files that is loaded in Max will be loaded only once in memory, regardless of whether it's copied or instanced or uses different mapping/tiling settings, so there is no memory saving.

I can totally understand the need though and have wished for such a node many times.
Internally, the coordinates rollout is actually a separate node, it's just that Max doesn't offer it as a separate node, probably because Max developers never saw a need.

If you're open to using 3rd party maps, Bercon Maps plugin has a BerconMapping node, which is exactly what you're looking for. It also offers an additional 'Distortion' slot, also very useful in some cases.



Personally, I'd also prefer Corona would offer such a map node (and also offer some sort of distortion/perturbation, too). 3rd party stuff can be problematic (some studios will not allow using them) or not recompiled on time for new Max versions etc.

2024-11-11, 19:25:05
Reply #22

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 786
    • View Profile
Let me try and give an example:

We have an archviz scene: A new office building on a busy street.

Two images are needed of this building. One street view, and one from the courtyard behind the building. Client wants weather to be the same for consistency.

I start with the street view. I set up the scene with a corona bitmap and load and HDRI as primary light source, sky background and to get some reflection in the glass of the facade. I rotate the bitmap on the bitmap properties to get the effect I want.

Now, it's not always that you can get the light you want, the reflections in the glass of the sky AND the look of the directly visible sky you want. Sure you can change the directly visible sky in post etc. but thats not the point.

In order to achive control of the above, I would have to copy the HDRI bitmap node 2 times so I have a total of 3 of the same HDRI bitmap nodes. Now I can control environment rotation and output of each of them. One for environment lighting, one for reflection override and one for direct visibility override.

Now I want to reuse the same HDRI for camera angle 2 (the courtyard shot). However the HDRI used for the street scene doesn't give optimal light or might look wrong in reflections/direct visibility. If I just go in and rotate the HDRI directly, I lose the setup for the street view. Hence I would have to copy those 3 HDRI bitmap nodes again so I can adjust them as I want for the new camera angle. Ending up in a total of 6 copies of the same 1gig .exr file, just because I can't rotate it with nodes that I can hook into environtment/refl, refrac and direct override. Like in the way you could reuse a brick texture plugged in to different color correction nodes to reuse same file for different look.

What we want is to be able to do the above, but with only the same 1 HDRI bitmap node connected to any number of individual UV rotation nodes.

It keeps the max scene tidier, easier to control, less clutter/confusion/renaming in material editor and smaller max file size (i think).

Hope this helps :)

Much better.

I don't think you need a map for it, it will be a complicated setup for it, the best thing I can think of is to have "relative to camera" checkbox in environment mode, which will do the trick under the hood, which you will see in the attached video.

As I understand, you need a fixed environment no matter how the camera is rotated/placed.
For this you can use rotate with node option in CoronaBitmap, wire the node's Z rotation (I think this is the most important one unless you also want to tilt the environment map) to the camera's Z rotation.
The camera will be a placeholder for rendering - you will have the actual cameras in the scene, you will just align/place the dummy camera to them and and render from it, so the transformation's (and nodes rotation) are driven by it. And you will have a fixed environment. For animation/batch rendering, you can just keyframe the dummy camera.

Hope this helps.
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-11-11, 19:59:35
Reply #23

pokoy

  • Active Users
  • **
  • Posts: 1942
    • View Profile
Hmm... this serves that one example but still doesn't solve the general ability of a map that could:
- use one texture node and change only coordinates in a general scene-global way, without the need to wire things
- if the concept works the other way around (like with CoronaColorCorrection) one could use different maps and transform coordinates by a single coordinates map node

With scene tidiness in mind, wiring objects to maps in Max is highly problematic imo. Someone else in the studio opening your file might not understand what's wired where. Wiring parameters in Max is just hidden way too deep, and a person not selecting the right object might not find it at all. A map displays the stuff right in its properties in the most readable way there is.

Wiring is also problematic with animation playback, as wiring is reevaluated globally on all scene objects. Environment maps tend to be huge, so say good bye to scene responsiveness if you want to wire them.

---
« Last Edit: 2024-11-11, 23:35:11 by pokoy »