Saturday, August 22, 2015

Wireframe Contour Rendering with Maya 2016 and mental ray

Rendering a contour image in mental ray for Maya has been a nice way to show wireframes on an object. In Maya 2016 the usual method has become somewhat hidden, so I thought I would post a brief update on how to do that.

1) Create a black surface shader and apply it to your geometry
2) In the hypershade, access the shading group (e.g. surfaceShader1SG) and open the mental ray tab in the Attribute Editor (or Hypershade property editor!)
3) Under Contours, check Enable Contour Rendering and adjust the other options as you like
4) In the render settings, make sure mental ray is selected, and go to the Configuration tab
5) Check "Show Advanced Settings" and find the Contours section at the bottom
6) Check "Enable Contour Rendering" and increase the Over-Sample to something like 3
7) Under the "Draw By Property Difference" section, check "Around all poly faces"

Not quite done... you might see a Warning: Contour Rendering is not supported with Unified sampling

8) Go to the Quality tab and check "Show Advanced Settings"
9) Expand the Legacy Options section at the bottom and choose Sampling Mode: Legacy Sampling Mode

Hit render! *phew*



Note that if you are rendering beauty passes or other things, you probably want to use the original Unified Sampling and just create layer overrides for the contour settings. Also make sure that you have unchecked both "Around all poly faces" and "Enable Contour Rendering" for these non-contour passes/layers/renders, because I have had the filter settings be set to Box (1, 1) in the background without my knowledge due to "incompatibility with contour rendering". Just something to be cautious about; not sure if they may have fixed that in this version.

Thanks for reading,
Stuart

Wednesday, July 29, 2015

Strange Teapot

I've been learning how to use Pixar's Renderman for shading, lighting, and rendering. I was trying to get a handle on setting up different shading networks, so I decided to go a bit crazy while I figured out how to use various nodes. This was the rather unfortunate result.


I used the Official RenderMan Swatch (aka the renderman teapot) to  play around with. I learned how to work with displacement, bump, blend, and facing ratio nodes, various noise textures, and the layered shader.

Thanks for visiting!
Stuart

Monday, July 27, 2015

Science Photography EdX Course - Week 5

Though this is the penultimate week in the online course I've been taking, I believe this is the final assignment. Choosing one (or more) of the images we captured during the course, we were to create an educational figure from it. This was up my alley, so to speak, and I broke out the leader-lines and orientation images. I'm fairly happy with how this turned out. I think the leader-lines are a bit thicker than necessary, and though I like that everything is neatly aligned, I don't think the text sticking out to the left works as well. 

It's also not a complete educational figure, since it only shows some of the mechanisms in the watch, but these were the images I had available, and I'm not quite ready to completely deconstruct the pocket watch.


I've really had an excellent time with this course and been exposed to many ideas that will serve me well not only in my photography, but also in the computer graphics I'll be doing in the future. And I've been inspired to do more macro photography, so if you're at all interested in that, perhaps keep an eye on this space and we'll see what turns up.

Thanks for reading!
Stuart

Monday, July 20, 2015

Science Photography EdX Course - Week 4

This week's assignment had two components relating to mobile phone cameras and video.

The first part asked the students to spend a day taking photos around the house or at work with one's smartphone. I'm not too enthused with my phone's camera, but it was an interesting assignment to think about where photographic subjects might be. It was easy to grab a quick snap of an interesting texture, the way light fell on a mundane object, or how this item looked at a different angle. I'll consider using my phone as a brainstorming tool, then perhaps go in with my better camera and explore the subject further.
Here are the two images I thought were most interesting:



The second part of the assignment was to explore video and to create a short (< 1 min) recording of a process. Since I've been having fun with my macro lens, I decided to use the video functionality on my Canon T2i to capture the "process". I think the video should speak for itself.



And the obligatory setup snap. Yes, that's a plastic horse (pegasys [sic]) with a flashlight taped to it.


Thank you for reading and watching!
Stuart

Sunday, July 19, 2015

Maya Course - 10 videos so far

So far I've uploaded 10 videos from the Maya course I taught this spring. If you're interested in learning a variety of Maya topics, I highly recommend subscribing as I upload the remainder of the course. A few selected vids:

A shorter segment on animating cameras in Maya


A fun overview of how driven keys can be helpful in rigging


And an introduction to the MEL scripting language


Later,
Stuart

Tuesday, July 14, 2015

Science Photography EdX Course - Week 3

Week 3 of the science photography course has come and gone, and the assignment this time was about different lights and light positioning.


I started out with some limited daylight from the front. There is a bit of a gleam, but fairly uninteresting in terms of light.


Then I added another light, in the above image it is bouncing off an umbrella from the front right. Still pretty similar to the daylight only, just mainly some color differences. Below you can see the setup I was using for these initial photos.



Then I tried the bare light (without the umbrella bounce) and I think this is much more interesting. The watch interior has more of a gleam to it.


This series really demonstrates how drastic an effect simply changing the light position can have. I hope I have the descriptions correct; it was a bit hard to remember exactly where the bulb was in each. Check if my analysis makes sense.


It was very interesting how a low light (the bulb was just an inch or two from the watch and my lens) casts the etching/engraving in sharp contrast and gives a graininess to the flat surfaces.


Whereas a higher light makes things appear more glossy with lots of specular highlights.


This final one might be my favorite from the shoot, in terms of composition and lighting.

Later,
Stuart

Saturday, July 4, 2015

Science Photography EdX Course - Week 2

Week 2 of my EdX Science Photography Course involved an exploration of aperture and depth of field. Here are three images from the series. Not a tremendous difference between them, but I think you can get the idea of the depth of field changing.




Does it bother you that the f and 1 aren't visually aligned? I suppose it does now. I should have noticed that and tweaked it.

To create the images, I decided to build a DIY lightbox out of a cardboard box, parchment paper, white duct tape, and some sticky drawer liner and printer paper.



Then using my cheap studio lights, I was able to flood the interior of the box with nice diffuse light. I look forward to using the box in some other projects too. I'm using my Canon Rebel T2i and 100mm f/2.8 Macro here.

Later,
Stuart

Tuesday, June 30, 2015

Maya Course - Lectures on YouTube

Today I uploaded the first three lecture chunks (for lack of a better word) of the course I taught this spring on YouTube free for anyone to watch.







The course was offered through the Masters of Science in Biomedical Communications program, the Master's program that I completed two years ago. It covers intermediate and advanced Maya topics, or more specifically, pretty much everything that isn't modelling and texturing.

The recorded lectures are largely Maya demonstrations, tutorials, and explanations that focus on the application of a Maya toolset or technique for biomedical content. Admittedly some of the demos are less biomedical and more "let's use some spheres because it's simpler to demonstrate". They assume some prior knowledge of Maya and a decent understanding of the interface and modelling tools.

Lecture topics (that I will be posting regularly) include Animation, Rigging, nParticles, Optimization, nHair, nCloth, Fluids, Motion Tracking and Compositing with AE, and MEL scripting. I very much hope that you will subscribe to my YouTube channel to view the tutorials as soon as they are posted. There will be 35 videos of varying lengths in the series, so lots of content to come.

Thanks for checking them out! I hope they are informative and useful, and if so, please share them around.

Later,
Stuart

Sunday, June 28, 2015

Science Photography EdX Course - Week 1

I registered for a Science and Engineering Photography course offered by EdX since I am quite interested in science and nature photography, I've just purchased a macro lens, and I really like the work the instructor has done. Today I completed the first assignment. I will be working with the same object for the duration of the course, so it was important that I choose something interesting and had some significance to me. Fortunately my good wife thought to suggest my great-grandfather's pocket watch, which I inherited after he passed away several years ago at the age of 102. This wasn't his Watch (with a capital W) in the sense of it being the heirloom, since he had several watches and was more of a wrist-watch type of guy, but it still has plenty of significance for me and looking at it now, it could be as old as late 19th century though more likely c. 1930-50. Perhaps I'll be able to discover exactly when it was made while doing this course.

The first assignment was not to use a camera, rather a flatbed scanner. This ended up being a very interesting technique and something I hope to return to in the future. My scanner is capable of scanning at up to 12800 dpi, so ended up with some very large images. A bit overkill, but here is a very scaled down image.


Aside from creating some nice images of the watch face, I stumbled on a pretty surprising effect. Look at the second hand (the inset dial). What is happening here? All the evidence is already in the image, but I'll give a couple of clues. 1) The watch still works 2) The scanner head moves from the top of the image to the bottom. Let me know your analysis in the comments.


And finally, because my artist sister-in-law was over, she noticed the cool moving second hand effect and asked what would happen if I moved the whole watch during the scan. A scan and a bit of photoshop processing later (though not as much as you might expect for this image), I arrived at the below photo.


I just love the swirly chromatic strands on the hour and minute hands.


This course, while very exciting and about which I will be posting frequently, is not the special announcement I was going to make, so stay tuned again for the actual announcement.

Later,
Stuart

Saturday, June 27, 2015

Molecular Visualization Principles #1-3

As a part of my research work, we are developing some principles, guidelines, or considerations for visualizing molecules in biological systems. It's hard to know exactly how to phrase and frame these, because they are not hard and fast rules; however, they may be helpful in creating more accurate depictions of biomolecules.

Each principle is presented as a short pair of animations. The Treatment A's do not adhere to the principle whereas the Treatment B's do. So far, I have created examples to demonstrate three of the principles, with more coming.

Principle 01 is "Leave some behind". It conveys the idea that typically not all molecules are consumed in a process. For example, there may be more subunits present in the environment than ultimately bind together in a biological complex. This example shows a virus capsid assembling. Note that many of the actual mechanics of capsid assembly (i.e. ideas that may constitute other principles) are ignored or simplified for the sake of clarity. One might declare some irony or hypocrisy here, however it is important that we build the framework for the principles individually before considering how they might be combined in real-world visualization cases.





Principle 02 is "Use Random Walks". It conveys the idea that molecules move randomly due to collisions in a crowded environment. For example, an Arp2/3 complex moves erratically before binding to an actin filament.





Principle 03 is "Add Non-binding Collisions". It conveys the idea that molecules might encounter each other with unproductive orientations and conformations multiple times before a successful binding event occurs. For example, Sos and Ras might collide a number of times before their orientations result in tight binding.



I'll be announcing an exciting new set of content very soon, so check back in a couple of days for that.

Later,
Stuart