Anyone know how to unhide the blackbody shader in 3DS Max 2010?


#1

A while ago I unhid the blackbody shader in Max 2009 without any problems. I’ve just received my copy of Max 2010 and when I followed the same directions that work for Max 2009, I couldn’t get the shader to unhide. I added the “, texture” after “apply light” in the base.mi file, but there was no “hidden” to put a “#” in front of. Just to be clear, here’s what the 2009 base.mi file looked like after following the directions:

#-------------------------------------------- Light utils

declare shader
color “mib_cie_d” (
scalar “temperature”,
scalar “intensity”
)
version 1
apply light, texture
gui “gui_mib_cie_d” {
control “Global” “Global” (

“hidden”

    )
}

end declare

declare shader
color “mib_blackbody” (
scalar “temperature”,
scalar “intensity”
)
version 1
apply light, texture
gui “gui_mib_blackbody” {
control “Global” “Global” (

“hidden”

    )
}

end declare

Unfortunately, the base.mi file in 2010 looks like this:

#-------------------------------------------- Light utils

declare shader
color “mib_cie_d” (
scalar “temperature”,
scalar “intensity”
)
version 1
apply light
end declare

declare shader
color “mib_blackbody” (
scalar “temperature”,
scalar “intensity”
)
version 1
apply light
end declare

Like I said earlier, I put the “, texture” in front of “apply light”, but after closing down and restarting Max the blackbody shader was nowhere to be found. Then I tried just copying the whole Light Utilities portion of the 2009 base.mi file into the 2010 base.mi file. While this method unhid the blackbody shader I got an error upon starting Max that says: “API 0.0 error: found second definition of GUI “gui_mib_blackbody” using first” and “API 0.0 error: found second definition of GUI “gui_mib_cie_d” using first”.

Any suggestions what I should do to correctly modify the base.mi file so that I unhide the blackbody shader but don’t get any errors? Or am I just being stupid and the blackbody shader is no longer hidden and it’s residing someplace I haven’t looked?

Thanks!!!

Travis


#2

Notice the large difference in the code? My guess it is the missing code that is causing the problem. I would suggest copying the working 2009 code to the 2010 version.

-Eric


#3

FWIW, I received an email from the original poster about this and here’s the reply I sent him as I’m sure it’ll be helpful to others out there.

Hi Travis,

The Light Utilities section of your 2010 base.mi file should look like this:

#-------------------------------------------- Light utils

declare shader
color “mib_cie_d” (
scalar “temperature”,
scalar “intensity”
)
version 1
apply light, texture
end declare

declare shader
color “mib_blackbody” (
scalar “temperature”,
scalar “intensity”
)
version 1
apply light, texture
end declare

#-------------------------------------------- Shadow

Then, in order for it to appear in 3dsmax 2010 you now need to open the base_max.mi file and that’s where you’ll actually unhide the cie_d & blackbody shaders. In the base_max.mi file scroll down to the GUI sections for both the cie_d & blackbody shaders and put a # in front of the word hidden. Should look like this when you’re done:

gui “gui_mib_cie_d” {
control “Global” “Global” (

“hidden”

                            )
            }

gui “gui_mib_blackbody” {
control “Global” “Global” (

“hidden”

                            )
            }

After doing that, you’ll find it’s available for use in 2010.

Best wishes,

Jeff


#4

Ok, I’m going to look like a stupid engineer but any of you guys want to share the need for such a shader?

Yeah, I know, embarrassing…


#5

It’s for if you want geometry to emit light at a specific color temperature.


#6

Not really geometry, most people use it to make renderable lights (Studio light setup) using the portal light and the photometric light of the cie and blackbody. Like Jeff has done here and here.

-Eric


#7

Makes perfect sense now: thanks a lot.


#8

Thanks Jeff, that is a huge help! I really appreciate it!


#9

can anybody also ‘shed some light’,err sorry …on why these shaders are in max but hidden ?. they’ve been there fro what 2 - 3 releases but never ‘outed’, just wondering why. r they still in development or something.


#10

Well, in the native unedited format (as a light utility) they aren’t really needed as we have built in kelvin controls on the photometric lights. The A&D material also has kelvin controls if someone needs to make geometry ‘glow’ a specific kelvin value. So by modifying the apply type I’m able to use it for something else that is useful to me.

Along that line of thinking, Autodesk would have to spend time documenting/testing the hidden shader(s) before it’s unhidden and personally speaking I’d rather have them spending time on bigger things because we can all easily explore these files and pick/choose what we need from them.

Beyond that, I’ve heard a LOT of new users say things like “there’s just so many mental ray shaders/material options in the material editor, I don’t know where to start”. If Autodesk unleashes in a lot of extra shaders that aren’t actually necessary then the material editor may become overwhelming to people, especially those that are new to mental ray and/or 3dsmax.

Of course I certainly do not speak for Autodesk on their reasons for this…these are just my own thoughts on the topic. :thumbsup:


#11

hi Jeff,
I’ve corrected my code exactly as you wrote above^ but i still cant see the shaders? could it be because of the SP1 or something else???

thanks
Djordje


#12

I’ve just tried here and it worked.

Maybe you forgot about the texture in the base.mi file:

version 1
apply light, texture
end declare


#13

i forgot to click on the Incompatible check box in the map browser :banghead:
works great


#14

Afraid I have to respectfully disagree with you Jeff. Not the part where you said you’d prefer they were busy with other things, I can certainly understands that, it’s just that personally I don’t think that rummaging through code is a good workaround to this issue. It should be easy, but it isn’t always as easy as one hopes

First off, every few versions they change the method for accessing specific shaders, so detailed instructions (like 3rd party tutorials) have to change every few verisons to keep up with these changes.

Second, they now have multiple files that have similar stuff, like architectural.mi AND architectural_max.mi, which can cause confusion the first time you go looking through this stuff in max2010.

And third, the names of many of these shaders in the code are not terribly representational, which makes it hard to explore the shaders unless you already know what you’re looking for. It’s like you want to join a secret society, but don’t know the secret handshake, and so you have to keep shaking hands differently until you stumble on the correct one, or until you find a member of the society already who is willing to share. I mean, what does “mib_cie_d” mean? If you told me, I’d probably say “ah, I get it”, but I’d have very little hope guessing it on my own.

I understand that you’d prefer adesk to spend their time tackling other issues, and that’s cool, they certainly have plenty of big issues to tackle, but personally I think these are the types of issues that adesk (and any software developper) should be fixing. So many times the simple features that would make life so much better get overlooked for the big features, and so you have all this cruft around that makes it hard for someone new to the system to immediately understand what they need to do.

Ideally, if you’d want to avoid clutter in the material editor interface, there should be some way to hide and unhide shaders through the max interface. Maybe another checkbox called hidden. That way, you could reveal all the hidden shaders, and choose which ones are visible or invisible when you uncheck the hidden checkbox. That could apply to the regular max shaders as well, so I could finally hide the 20-30 maps and materials that I just never use, it would make everyone’s workflow faster, regardless of what renderer they use. While a new user to the system would have to know that a shader could be hidden using this checkbox, that’s a single, simple bit of info that is discoverable on one’s own, and even in the worst case where they’d have to be told, once they know of its existence they could easily figure the system out for themselves, rather than needing to know a number of bits of info like the current system.

Anyways, just some food for thought.

  • Neil

#15

:deal:
this is a really good point, there are so many unused materials that really bog the whole thing down plus it doesnt help that its a drop down list that you have to navigate.


#16

agree with this, when I first started to learn mental, name such as mia_light_surface in mr.architectural.shaders.pdf really confused me. As a beginner I find it really hard to understand what is what and where to find it. In contrary, Vray help file is much more well documented.


#17

Thankx so much Jeff,
I had the same problem and I solved


#18

tnx mr jeff patton
tnx very very much


#19

i also would like to see some kind of utility similar to maya’s plugin manager for loading/unloading shaders.


#20

Hy.

I get the Max 2011 and I was trying to use Blackbody to kelvin control, but I found a new shader in materials editor named Kelvin Temperature control, is that material the same and do the same thing that mib_blackbody?