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
1460 Views, 9 Replies

OSL environment hdri per camera?

josh.sarantitis
Contributor
Contributor

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!

0 Likes

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

madsd
Advisor
Advisor
Accepted solution

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

0 Likes

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

josh.sarantitis
Contributor
Contributor

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?

0 Likes

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

madsd
Advisor
Advisor

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.

 

0 Likes

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

josh.sarantitis
Contributor
Contributor

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)

0 Likes

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

madsd
Advisor
Advisor

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 )

 

0 Likes

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

josh.sarantitis
Contributor
Contributor

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

Then I can batch it easy!

Thanks!

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

madsd
Advisor
Advisor

Excellent

 

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

 

0 Likes

Excellent

 

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

 

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

josh.sarantitis
Contributor
Contributor

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!!!

0 Likes

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

madsd
Advisor
Advisor

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.

 

 

 

0 Likes

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  

Autodesk Design & Make Report