2010-11-23

mental ray for C4D users!

Aloha folks, long time no post.

Sorry, Zap's been busy with .... stuff.

Also, some other guys than me have been busy and created this neat plugin for using mental ray AND iRay from within Cinema 4D:



It fully supports not only all the standard C4D materials, but also custom shaders in MetaSL, so this is some kick-butt powerful stuff!

Check out the website for more information, coz I must admit I am not an expert on C4D at all, and was not directly involved in this project, so I can't really answer much questions about it, sorry :)

But hey, C4D users - enjoy!

/Z

2010-08-23

More about MetaSL in 3ds Max 2011

Aloha again!

Sorry for not making a proper "post SIGGRAPH post", but I've been "post SIGGRAPH busy". And as always, me being Busy, means good things for you all.... in the future. :)



I've gotten a ton of questions about MetaSL in 3ds Max, and since the public beta mentioned in a previous post has now been discontinued (you can still use the 30 day trial if you like it will time out approximately the same time that the public beta would have timed out anyway), the interest in "what was the app actually doing and can I do it myself" has increased.

So let me explain the process 3ds Max uses to load/use a MetaSL shader:

Max uses configuration files located in the <3dsmax>\mentalimages\shaders_standard\MetaSL\Config directory to define how it works.


First there is a file in this directory named MaxMetaSLNodeTexmap.tbx. This file contains entries of which MetaSL shaders are shown in the MetaSL section in the Slate material editor.

By default, only a handful of shaders are actually in this file, but anyone can open up this file and add new entries for any of the standard MetaSL shaders that ship with max (and all the shaders in mental mill are included in this set).

So by adding a line like, for example


<palette_item type="node_class" node_class="generator_blend_ramp" image="conversion.bmp"/>


...will make the standard shader generator_blend_ramp visible in your Slate "MetaSL" toolbox! (NOTE: You must add it before the closing "<palette/>" line)



That's fine for "standard" shaders, but what about adding your OWN shader?

Well, when max is looking for a MetaSL shader name (technically, a MetaSL class name), it rummages through the file NodeToMsl_MappingTable.xml in that same directory.

This file contains entries similar to these:


<Item ClassName="Color_contrast" XMSLName="color_balance.xmsl"/>
<Item ClassName="Color_gamma" XMSLName="color_balance.xmsl"/>
<Item ClassName="Color_saturation" XMSLName="color_balance.xmsl"/>


This links a class name ("Color_contrast" for example) to a file that needs to be loaded to define that class name ("color_balance.xmsl" in that case).

If we further look into the file "color_balance.xmsl" (which lives in the <3dsmax>\mentalimages\shaders_standard\MetaSL\XMSL directory), we will find it consists only of this line:


<root>
<metasl_code file_name="color_balance.msl"/>
</root>


What we see is that this file simply loads the "color_balance.msl" file (which lives in the <3dsmax>\mentalimages\shaders_standard\MetaSL\MSL directory). Now this XMSL file could have defined a whole phenomena of it's own (of the desired class name), but in this case it didn't... it simply deffered to say "nah, to find that class, just load this MSL file, it will defined that class".

And if we were to open up "generator_blend_ramp.msl" we will find some shader code that indeed defines this shader.


So, to add our OWN shader, all we need to do are the following steps. Assume we have a simple shader that multiplies two colors, like this:
shader mul2colors {
  input:
    Color A;
    Color B;
  output:
    Color result;

  void main() {
    result = A * B;
  }
};

#1: We our shader code in a file in the <3dsmax>\mentalimages\shaders_standard\MetaSL\MSL directory in a file named multi_two_colors.MSL

#2: Create an XMSL file in the <3dsmax>\mentalimages\shaders_standard\MetaSL\MSL\mult_two_colors.xmsl that simply reffers to the MSL file, using the simple format above, e.g.

<root>
<metasl_code file_name="mult_two_colors.msl"/>
</root>


#3: Add an entry in the <3dsmax>\mentalimages\shaders_standard\MetaSL\Config\NodeToMSL_MappingTable.xml file for the new class, mapping the shader name ("mul2colors") to the .xmsl file name ("mult_two_colors.xmsl")

<Item ClassName="mul2color" XMSLName="mult_two_colors.xmsl"/>


#4: Finally, make it visible by adding it to the 3ds Max MetaSL Slate toolbox by adding a line to the <3dsmax>\mentalimages\shaders_standard\MetaSL\Config\MaxMetaSLNodeTexmap.tbx file (prior to the closing "<palette/>" line:
<palette_item type="node_class" node_class="mul2colors" image="conversion.bmp"/>

Note: The name of the bitmap isn't important since 3ds Max creates it's own bitmaps by actually running the shader w. it's default parameters to generate the toolbox icon.


Hope this makes sense?

ALSO, DO NOT FORGET that my FXPHD class is still running... we're in the week 5 "break week" currently. There is still time to sign up (FXPHD allows signups up until the 8:th class week). So be there, or be hexagonal! ;)


/Z

2010-07-23

Heading off to SIGGRAPH 2010

A quick note: Heading off to SIGGRAPH right... now.

Those who want to follow me do it most easily on twitter, and I may post some neat stuff on QiK once in a while:

twitter.com/MasterZap

facebook.com/MasterZap

qik.com/MasterZap

Enjoy

/Z

2010-07-02

MRY201 mental ray FXPHD course to be RE-RUN for July 2010 term

For those of you who missed my FXPHD course back in January, fear not, because it is being run AGAIN this upcoming July term!







Scroll down to my previous postings about the course for more info! Now, this is a re-run, so it is the same classes as before (with some minor updates and corrections, especially to Class #1), but I will still be available in the FXPHD forum for the new students to ask their questions!

For more info about the course click here or just go to www.fxphd.com

For now, though, I'm off on some vacation, coming back in time for SIGGRAPH 2010 in Los Angeles! More about that in a later post!

/Z

2010-06-22

MetaSL in 3ds Max 2011 - demo

After posting my last post, I've gotten a lot of questions around the MetaSL implementation in 3ds Max 2011 and the Mental Mill SE 1.1 beta. Well... to demonstrate this, I've made a little video presentation (actually a shortened version of what I showed at the EUE event mentioned two posts back).

So click here to check out the video, it's 15 minutes of me rambling....




The presentation shows my MetaSL "eye" shader (to be posted soon) run in mental mill, mental ray, 3ds Max viewport, and the Quicksilver renderer.

Enjoy! :)

/Z

2010-05-27

mental mill 1.1 Standard Edition public beta 2

Notice: There is a new public beta of mental mill 1.1 Standard Edition


One particular neat feature with this beta is an exporter I built for it that exports MetaSL shaders to 3ds Max 2011 directly from inside the mill.

The workflow is basically this:

  • Build your shader tree in mental mill
  • Select the root node
  • Go to File->Export
  • Choose the "Autodesk 3ds Max 2011 (Slate Extension)" exporter
  • (First time only: Select your 3ds max installation directory)
  • Hit "Export" button.
  • Start Max

Now you will see the shader in the Slate material editor "MetaSL" category.
These shaders now...

  • ...work in the 3ds Max viewport
  • ...render in mental ray
  • ...render in Quicksilver
  • ...and any other MetaSL compatible renderer!
And the coolest part is that it works even with your own custom made MetaSL shaders, in all above renderers! This is different than the MetaSL support in Max 2010 that was locked to the shader set shipping with it. Not so in Max 2011, you can build your own shaders. They compile automatically in the back and "just work". Even raytracing calls in the shaders get converted to the automatically generate cube reflection maps for Quicksliver, which is quite neat :)





Expect lots and lots of posts on this topic coming soon - for those that are curious about this workflow and want to see it up close, and see me debug some shaders live, pop up in Utrecht, Netherlands, next week (June 3-4, 2010) at www.EndUserEvent.com (see previous post)


Known Issues:

  • There are some known issues with the Lookup_Texture_2d node not showing in the viewport with gamma correction enabled, but I hear this should be fixed in a 3ds Max service pack (hopefully). It still works in mental ray / Quicksilver.
  • If Texture2d inputs exist inside a phenomena in your mill graph but are not exposed to the interface of the Phoneomenon, they will not get properly filled in when loaded into 3ds Max. To fix this, simply expose the "Texture2d" to the interface of the Phenomenon.
Find the download for mental mill 1.1 Standard Edition here

Have fun!

/Z

2010-04-25

End User Event, Jun 3-4 2010, Utrecht / Netherlands

A heads up:

On June 3/4, my good friend Joep van der Steen, author of "rendering with mental ray & 3ds Max" will be - again - hold the "End User Event".

Imagine it as a very tiny and very European and very personal mini-version of Siggraph. There are two days filled with lectures and talks and mingling, and, yeah... it's held in a bar. :) (Well, a bar with conference rooms on the sides)

Sign up now if you want to join in on the fun. I'll be speaking there about MetaSL in 3ds Max 2011 and some other mental-ray-y things.... see you there.

www.EndUserEvent.com

/Z

2010-04-09

FXPHD, closed, done, complete, over. PHEW



Well, that was an interesting ride of 10 weeks of doing FXPHD. And while I really enjoyed doing it, well, it was quite a lot of work (since I'm such a nerdy perfectionist and want to embellish everything to the border of insanity) so I won't be doing it again any time soon....

I have not heard if the FXPHD guys plan to re-run the course, at least it is not being re-run immediately for the current April term starting up in the next few weeks. And of course, if/when it is re-run, it's the same classes run again, so all I have to do then is to hang around in the forums for questions, which is much easier....

It was quite fun to see the progress of the students and I saw quite a few nice renders done by them. I think I made several people see the light of linear rendering... :)



I'll let you guys know when more similar stuff happens. Next up is EUE (more in a future post)

Also, expect some trickle-down effect for the blog. I created some nifty Phenomena for the FXPhd course that I will post here after some polish.... stay tuned!

/Z

2010-03-06

mental ray in Round 6

Check out this awesome short film by Snowball Studios called "Round 6". You may think it is a game cinematic, but it's actually a short film intentionally made in the style of a game cinematic:

Round 6 from Snowball Studios on Vimeo.



This is, of course, mental ray in all it's glory, and what I found most interesting about this is that they have a very cool production blog over at http://round6construction.blogspot.com/ where you can read many more details of the project.

Great work guys!

/Z

2010-02-04

FXPHD update/FAQ - it's still on!

Hello!

Some updates bout my FXPHD class:

I just released Class #4 of my FXPHD course 'production rendering techniques with mental ray'. We are currently having fun doing SteamPunk Robots in a real SteamPunk location:



Perhaps you want to Join the Fun?

The questions I get most often about the FXPHD classes are:

Is it too late to join now?



No. The term may be called "January10", but it is not until 8:th week of the class (sometime in early March) is it actually "too late".

Classes are released once a week over 11 weeks (there's a break week in there), and you can download them at your leisure... however, the advantage of taking the class "live" is the interaction in the forum between the teacher (me) and the students (you, and many others).


Will this class be "Max Only"



NO. As a matter of fact, beggining Class 4 I've taken steps to include explicit information for both Maya and Softimage users, as well as amended one of the earlier classes with specific Maya and Softimage info.

I still do run the major demos in Max, though.

Will there be a lot of button pushing in Max that I will not have use of in Softimage or Maya



Not really. There will be some, but I spend a lot of the time in the class teaching theory and the why of things. How you see the world, why you need to do X, Y and Z. The actual mechanics of doing X, Y and Z is also shown - but frankly, that's in the manual! UNDERSTANDING WHY you do X, Y and Z, and UNDERSTANDING when not to do Y but Q, is where the real information lies. THAT is what I teach.

I had students that doesn't even use mental ray take the class (poor lost souls... just kidding) and enjoy it!

What does it cost me? This isn't free, right?



FXPHD has nice introductory information on their site, but here's the short Zaptronic description of how it works:

FXPHD supplies 41 courses this term (called "January10", even though it stretches over three+ months). One of these courses is my course, "production rendering techniques with mental ray".

To join a term, you pay $330. For this money you get to pick 3 courses freely out of the 41 available, plus are given on mandatory "Background Fundamentals" course, so four courses in all.

Each course has, as said, 10 classes, each class being a 30-60 minute video that you can download when you want (i.e. the class itself is not "live" per se). What is "live" is the FXPHD forum behind the class where studends (you) and the teacher (me) interact and discuss the classes.

Also, on top of your 4 * 10 classes you have chosen, you get access to the first two classes in ALL courses (so you can make up your mind before you choose the 3 you want to take). So that's 37 * 2 EXTRA classes that you get thrown in.

I once computed that this alone is actually 3 solid 24 hour days of video content! Not too shabby :)


Hope this straightens out some ?'s that people may have!


/Z

Softimage defaults issue

Hello!

While teaching my FXPHD course, I stumbled upon a problem I have not seen before. The error is in Softimage 2010 and (I guess) all earlier version that has the mia_material (known as "Architectural" in Softimage) integrated.

The bug is in the default values for the Ambient Occlusion settings.

You will find that the defaults for two values are flopped: AO Shadow Color is black, and "AO Ambient" is set to a 20% gray (0.2 0.2 0.2). The proper defaults are the reverse!! Also, the AO detail enhancement is off (0).

If you use the defaults as-shipped in Softimage 2010, you get an undesired 20% ambient contribution, and your AO will only apply to that light - not your indirect bounce light.



Fixing the default will give you the proper result, and not give you a sudden 20% light coming from nowhere in particular which you probably never wanted, AND will let you use the AO to enhance the detail of your indirect illumination, as the Lord* intended.

Hope this helps!

/Z

* = That would be me in this case ;)

2010-01-01

Introducing - my FXPHD Course - 10 weeks of mental ray training

Welcome to the new year, I hope the holidays were nice to you all....

...so. I have some news:

It has been in discussion for some time (I think I may have mentioned it before), but now, it has finally come to pass:

In the January term of FXPHD, I will be teaching a mental ray course named "Production oriented rendering techniques with mental ray". Yay!

FXPHD is an online training site run by Mike Seymour, John Montgomery, Jeff Heusser and friends (who also are the people behind FXGUIDE, a VFX oriented news site I suggest you also check out if you havn't already)

Note that these courses are not free, but they are not extremely expensive either - and considering the classes run for ten weeks with full participation of the professor (that's me, in this case) in the forums for questions about the class, it's really a pretty good bargain, IMHO.

The standard FXPHD deal is that you pay for a package where you get to sign up for three of their courses. But the cool thing is that you get to see the first two classes of each course anyway, so you can spend your first two weeks of the term browsing around before you make up your mind to pick a (set of) class(es). Also, a freebie "Background Fundamentals" class is always included, with all sorts of topics.

(If you sign up as a new user, and there is a refferal field, fill in "MasterZap".

Here's my teaser clip for the class:





(If you want the FULL FXPHD orientation video (from which the above is my "segment"), it can be downloaded here.)

This course will teach techniques and concepts for rendering realistic, physically based CG elements in a visual effects context (i.e. for integration into live action shots). As it is a hands-on course in using Mental Ray to do these things, it will start with a fundamental treatment of everything from light and pixels through to cameras, response curves and compositing, as well as "learning to see". The course will be performed using the 3ds Max application, but most things apply to Maya and Softimage as well.

The ten classes will be rougly divided like this (subject to change based on feedback):

Class 1:
Pixels vs. Light - What is a pixel? The units of light, and how they map to the RGB values we encounter every day. Shows how the math we apply to pixels can break, and how, if we are not careful, two plus two can end up ten.

Class 2:
Lighting - Understanding the quality and quantity of light. Understanding how real-world lights map to computer graphics lights. Understanding how light gathers and reflects off a surface.

Class 3:
Cameras - Understanding how a real world cameras function map to their computer graphics counterparts. Understanding what film and digital cameras do to the image before you even see it.

Class 4:
Materials I - Using the physically based Arch&Design material to simulate real world surfaces. Learning to see the world, so that one can translate it to CG.

Class 5:
Materials II - More about materials. Using the mental ray skin shader for realistic characters.

Class 6:
Interaction between CG and the Real World - Using the production library shaders to seamlessly integrate CG objects in real-world background plates with reflections, bounce light, shadows, etc.

Class 7:
What Not To Do - Computer Graphics is full of old "traditional" techniques that has stuck around for many years, but that are in conflict with proper physical rendering, and should be avoided. Just because the button is still there doesn't mean you should push it.

Class 8:
Compositing - How stuff that comes out of the renderer goes together, and what can (and should) and can't (and shouldn't) be delegated to compositing.

Class 9:
Technical topics such as sampling, flicker elimination, memory management. These classes may also adress issues that has come up in the forum as needed.

Class 10:
Continuation of class 09



Check it out! I am very excited to do this class, and I welcome you all to join FXPHD!

/Z