Showing posts with label Render Tests. Show all posts
Showing posts with label Render Tests. Show all posts

1 December 2018

Minor: Toon Tests 2

I have now got a work around for the issue I was having with the edge width scaling. The two renders below were taken with the same settings.



To do this I used a distanceDimension node and some multiplyDivide nodes and worked out an equation to adjust the width scale depending on the distance between my character and the camera.

I parented locators to the camera and my characters head and used the distanceDimension node to calculate the distance between them. I then made note of the best width scale value for multiple distances, in order to work out how it needed to change. It turned out that it wasn't linear so I used a spreadsheet to work out the curve.


I decided to use y=x^​‑0.45, where y is the width scale and x is the distance from the camera. I set it up like this in Maya:


The first GIF below is with the width scale set at 0.4, without any changes, and the second is with this new set up.



This was definitely an improvement, but I realised that I didn't have the maximum width set to a high enough value. I changed this in render settings, by increasing the contour filter width from 7 to 8.5. This changed the ideal values, so I needed a new equation, which required an additional multiplyDivide node.

The GIF below is with the equation y=1.4*​x^​‑0.583


I think this is definitely a much better result, although it will involve a fair bit more work in setting up my scenes. If I had a shot that was just of the body I may need to change the position of the locator that is parented to the character. I will also need to see how using the focal length to zoom in affects this and may need to do something similar, where the width scaling changes as the focal length changes. I do think it will be worth making these adjustments - particularly in shots where there is a bigger difference in distance from the camera.

30 November 2018

Minor: Toon Tests 1

I've been trying out the aiToon shader and am getting closer to the effect I would like.


There are quite a few settings inside of the shader itself and also a way to adjust the lines in the render settings. There seems to be limited information about how to best use the shader, though Arnold have a good page that describes the settings. Aside from a few problems, this shader is proving to be very useful.


This is how the shader rendered when applied without adjusting the settings. It hasn't affected the way shadows show on the object, but it has added some lines.


I started with adding a ramp to the tonemap on the base and adjusting it, as well as changing the edge width scaling and angle threshold.

After adding the correct colours and adjusting these settings I am quite pleased with this initial test. The main issue I am having is that the width of the lines doesn't behave how I would like when the camera moves. These two renders were taken with the same settings, but the camera is in a different position. Unfortunately, the line width doesn't scale with the rest of the model, which looks quite strange, especially the more extreme the change is.



I am not sure if there is a quick fix for this, I have had a bit of a look around without much luck. If not, I am wondering if there is something more involved that I can plug in to the width scaling that will solve the issue.