Monday, December 3, 2012

Vray Displacement Map Rendering Artifacts: Solution

Ah fuck! So 4 weeks of testing and 2 hours + of preparing a post for online questioning and then I solve the damned thing 5 minutes later. Guess that is good. Now to understand where the issue was coming from.

It was these damned settings!
View dependent - UNCHECK THE FUCKER
edge length may not be the main factor but I changed both.


Artifact Free Final Result

Zbrush Displacement into Vray without issue?

I've assigned myself a simple personal project to test the displacement from zbrush into maya\ vray. My simple personal project has turned disastrous. Firstly, I can render the geometry as is nor convert it to a vray proxy as it is too big.

I've done everything I can and re-uved the damned thing a dozen times. For some reason I still get holes in my geo. Please help...someone. Thanks!

Sculpted result in Zbrush - divided 7 times so as to avoid jaggedness around letters.

Made three poly groups to maximize UV space during UVmaster UV layout prep.

Low resolution model is 2180. Level 1.

Resulting UV's generated by UV master. Looks decent enough especially the main area (purple).

Brought it to level 5 and deleted lower divisions.
I've tried generating displacement from every other level lower then level 5. Results always have issues either way.

This is the displacement map generated and the settings used on the left. I never used 32bit cause vray spits out an error with .tiff files. I used a curve for better preview for you guys. I did use the get scale and the number was brought over to Maya.

Geometry was selected and activated displacement control and subdivision. Scale Value was copied and pasted into the displacement amount.

The result always has this weird issues! =( I don't understand why. I've redone UVs countless times. The map is 8K. It is almost working except for those damned weird things happening around letters and corners.

I am SO SO close. Please help. Yes there might be other ways to work around the problem but I want to know why this is happening to avoid future issues. Please please help.
Rendered Result


Sunday, December 2, 2012

Vray Interior & Exteriors

Thing to help me remember.

Rendering for Interiors and Exteriors. Exteriors are way easier to render as there are far fewer bounces.

Primary Bounces need an accurate calculation system whereas secondary requires something less accurate and faster.

Irradiance map is the most efficient speed/ accuracy making it the obvious choice for primary bounce especially for interiors.

Light cache is a good secondary as it is not accurate but faster.

For the GI, we used Irradiance map for the speed and efficiency but when it comes to the animated objects, we switch to brute force since it doesn't flicker and the most accurate in results. This is the same reason why we don't use light cache for primary bounce in the flicker free post posted earlier.

Vray Global Illumination No Flicker

So Siggraph Asia 2012 just went by. Recording everything learnt from the Vray booth. Highly insightful.

Objective
For starters, lets go with rendering Global Illumination with animated camera and fixed objects followed by adding animated objects and brute forcing that with everything in the same render instead of separated. Uber handy.

Vray GI - Generating the irradiance map.

When camera animation is complete.
Add all animated objects other then camera into another display layer and hide them. As we need to generate the irradiance map for stationary objects with camera animation.

1. Make sure animation is off
2. Don't need to render final image.
3. Use camera path has to be on and Vray will calculate GI for the entire movement ignoring the fact that animation mode is turned off.


4. After the map is generated. Save the irradiance map. Hit save under mode and change the mode to from file and point it to the .vrmap.
5. A good way to check or roughly preview the map is to use the irradiance map viewer. According to Constantin, even if the camera flies into different rooms, it will still work.
6. The result in the render view should look something like this.

tip* you can double the resolution during this stage to generate a more accurate irradiance map and then size it down before rendering. Also, to increase quality, up the subdiv amount under the basic parameters.


Another interesting question posed was say you don't know which direction the final render will be and you need to generate GI for the entire room. Change your camera type to Spherical and FOV to 360, this will generate a sphere render which saves GI from every direction and loaded the GI map. He then went around with a camera and "add to current map" mode after and would render specific angles like behind tables etc that lacked GI samples. 

7. After your done with this stage. Load up the objects that have animation on it. Select the materials that those objects use (He said, eventually this shouldn't be a shader option alone but object properties as well so during production be sure to assign the animated objects with their own materials even if it is the same. eg. Chrome_animated, Chrome_notanimated) For all objects that have animation, make sure the material has the option turned off.

8. Interesting, now that the irradiance map is done and from file setting is used. It is ignored and whatever we set for 9. is the primary bounce now.

9. The quality setting for 9. is now fed from the subdiv value and so we might change that to 8 or 16 or 32 and the brute force category further down is actually ignored...weird huh?

10. Not sure but I suppose we can turn off camera path at this point in any case. Don't forget to turn "Don't render final image" off again.


*tip time dependent should be ticket on for animation so we avoid that fixed sand texture that doesn't move.
The downside of this method is that the moving objects do not contribute to GI but he usually does a sphere fade AO pass to comp over.

Tuesday, October 9, 2012

ID Mattes

I keep forgetting which to use for proper render mattes for Vray. There are 4,

Multimatte is the best

- Material Select

Material Select, you drag the material and plug it into the material select element. Named after the material. It only renders the material without anything else.

- Render ID

During render time, all objects get assigned an ID. So when using this...it automatically colours each other. No aliasing and the colors are random. Not the best use.

- Material ID

One has to go to the hypershade and assign the Color ID or Material ID to the shader. Ideally, only use RED, GREEN & BLUE as when using the color selector the color can mix up. To solve this, there is the multimap.

-  Multimatte

Under the shaders color ID there is a material ID. Assign each material a number.

For objects, use apple single object property to selection and then assign an ID number to that object.




Sunday, May 20, 2012

BackBurner Renders Autokill about 60minutes

This is extracted from Mayastation - I am going to start using Backburner 2012 soon but this is something I keep forgetting and I can't be bothered to test so I will continue punching in this command and changing the number to 360 minutes.

BackBurner renders fail after 60 minutes - Part 1

Have you noticed your BackBurner jobs failing for no specific reason after 60 minutes?  Well, There is a simple explanation for this.  BackBurner has a default timeout function set to it.  After 60 minutes if the the frame or task is not completed BackBurner will send a kill signal to the job and restart.

If you are noticing this on your renders, there is a simple solution to get around it.  While there is no timeout option in the BackBurner submission window.  You can set a timeout flag manually by clicking the "Use Custom Command" box and then clicking the "Populate Command" button at the bottom of the Submission Window.  This will build a long command to be sent to BackBurner and begin the job.

This is where we need to add the -timeout flag.  Below is an example of the entire command with the timeout value set to 120 minutes. I generally set this after the manager flag.

system ("\"/usr/discreet/backburner/cmdjob\" -jobName \"exp_support_ash025444-110215\" -description \"\" -manager -timeout 120 -priority 50 -taskList \"/usr/tmp/exp_support_ash025444-110215.txt\" -taskName 1 \"/usr/autodesk/maya2011.5-x64/bin/Render\" -r file -s %tp2 -e %tp3 -proj \"/home/assist/maya/projects/default\" -rd \"/home/assist/maya/projects/default/images\" \"/Lnx-ubuntu/public/CustomerCases/renderash/exp_support_ash.ma\"")

 Hope this helps with any of your future renders!

BackBurner renders fail after 60 minutes - Part 2

I thought of revisiting the BackBurner timeout situation after a few customers mentioned that the need to manually enter the timeout was slightly annoying.
Since any permanent changes would need to be done by our development team. I thought It would be best to share a more permanent approach to get the timeout set.
Now setting this does involve editing the performExportToBackburner.mel file which support team does not generally recommend but editing these file.  Please make a local backup of the file before editing it.

We can simply add  an extra line of code to force the timeout to be a new permanent value. Since we are editing this at the file level you will no longer need to populate the command manually when submitting the job.

So, this is what has to be done.

1. Go to: C:\Program Files\Autodesk\Maya 2012\scripts\others
2. locate the file called performExportToBackburner.mel and make a backup of this file.
3. Now open the original file in word pad and locate the the following line.

"// Prepare the list of tasks and send it to Backburner through a task list file"

4. A few lines below that I add a new line.  The new line is in bold below.

// Prepare the list of tasks and send it to Backburner through a task list file
int $startFrame = `intFieldGrp -q -v1 bbExportStartFrameCtl`;
int $endFrame = `intFieldGrp -q -v1 bbExportEndFrameCtl`;
int $taskSize = `intFieldGrp -q -v1 bbExportTaskSizeCtl`;
if( $taskSize < 1) $taskSize = 1;
string $taskListFileName = createTaskListFile($jobName, $startFrame, $endFrame, $taskSize);
if($taskListFileName != "")
{
$exportSysCmd = $exportSysCmd + " -timeout 360 ";
}

5. Save the file.  Launch Maya and submit job and the new task timeout will be set to 360 minutes by default for every job.

Hope this helps the folks out there struggling with the timeout in BackBurner.