Community
3ds Max Shading, Lighting and Rendering
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max materials topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OSL environment hdri per camera?

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
josh.sarantitis
1190 Views, 9 Replies

OSL environment hdri per camera?

Hi, love the OSL environment shader but any recommendations to save OSL environment hdri per camera view so I can have different settings in each?

thanks!

9 REPLIES 9
Message 2 of 10
madsd
in reply to: josh.sarantitis

You can wire up multiple maps to the Color Array map, and drive the input with an integer.

So when you change camera, you just click the integer so it matches the camera and you are done.

 

It can be done in multiple ways however, and you can write a custom shader setup that works for your special case.

 

Small illustration.

 

cc.gif

Message 3 of 10
josh.sarantitis
in reply to: madsd

Nice solution, thanks, I guess I can try to save this in material settings in the scene states in order to batch render? Will it save the the number settings?

Message 4 of 10
madsd
in reply to: josh.sarantitis

If you can reach the Integer node, which is like any other map, from within statesets, then yes.

 

Im not a state sets guy, I use Arnold Operators instead.

 

Message 5 of 10
josh.sarantitis
in reply to: madsd

hmm, I stay away from state sets usually myself. Really like the scene states for batch rendering.

I tested it and scene states/ materials does not save the integer change. No way to link up a camera view instead of an integer huh? I guess I can put in frame number and have one for each camera (bit of a pain though)

Message 6 of 10
madsd
in reply to: josh.sarantitis

cameras[] is an array of scene cameras.

 

if you pick cameras[1] it will pick your first camera on the camera array.

You can wire this up in a scripted controller that is attached to the integer ( or index of the OSL array map )

 

Message 7 of 10

OK, way too simple, I just have to save the scene state environment setting for each hdri.

Then I can batch it easy!

Thanks!

Message 8 of 10
madsd
in reply to: josh.sarantitis

Excellent

 

Also, I missread, thought you meant StateSets, not the batcher.

 

Message 9 of 10
josh.sarantitis
in reply to: madsd

I've never done scripting, this sound like maybe a good way to start. Would you be able to share any links that could be helpful. Thanks a bunch!!!

Message 10 of 10
madsd
in reply to: josh.sarantitis

The links has to form in the brain, there is no shortcut to conforming ideas into concrete functional code.

 

No programmer has any solution before it's done, nor does the programmer have the ability to forsee all corner cases or special rules, better interop before start.

 

Its a process where you identify the initial parts and investigate properties around them and establish link through code to obtain a result in the end.

 

And you use the manual as only reference, for when you are stuck.

 

Only resort to broad general video material if you fail to understand a general concept, or details you cant get working while looking at the documentation. You need to get familiar with the syntax and manual and how to search for things you think that gives meaning, in any or all particular cases.

 

And first of all, start to look at, read, consume, understand every single character in a random script, then the next then the next, the content is irrelevant, the important thing is that you brainwash yourself to look at the code in no particular order and you will then start to see patterns, structures and then you have come far.
Do this for as long as it is needed, so you feel confident explaining a random script, pretending you are at an examn.

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report