Thursday, November 18, 2010

Normalmaps

Since I am a Zbrush lover now I decided to do more research on when I can use normal maps and displacement maps. Normal maps don't seem to be used in full animations and more often in games due to the in-ability to render AO passes properly but I figured using it for low level details like fabrics and generating a normalmap for that would be awesome.

Best tip of the day in that tutorial -

Baking - hybrid smooth/unsmoothed tangents using vertex normals (xNormal, maya) / smoothing groups. (max)

1. UV borders should generally be converted to hard edges, this dramatically reduces smoothing errors. (with no seam problems)

2. To reduce smoothing errors in an area, you can either split the uv map and introduce more hard edges - or manually round the geometry.

3. Experiment with your baking package to see how far you can push it - xNormal bakes for example have less smoothing errors than 3ds max bakes.


Here is a link to a good tutorial and a snippet I think I should keep in mind.

Thursday, September 9, 2010

BRDF Type for Vray

My brain fucking hurts. My world is no longer what I remember. I was reading up on material BRDF on Vray trying to get more information. And it is not what I/we remember.

Apparently, this might be the new world order. Say hello.

Blinn= Matte
Phong = Glossy
Ward = Metal

Sunday, September 5, 2010

Vray Renderfarm

Change License Settings
Type the IP address of the computer that has the dongle to link to it.

Launch V-Ray license Server
Launch this on the machine that has the dongle so that other machines will link to it and call up the license.

Launch V-Ray render slave
For distributed rendering after clicking on the distributed button in the scene. All machines with this will handle a bucket square.

Backburner
Manager
Distribution machine launches this application.

Monitor
Distribution machine will also require this to keep track of renders.

Server
All rendering machines will launch this and link the IP address to the appropriate server machine.

*Important
Setup a hard-drive for all computers to have complete access. No passwords and usernames.

*Possibility of workgroup, username and password may need to be the same.

Thursday, September 2, 2010

Zbrush Pipeline

Been testing my Maya 2010 -> Vray 1.5 with Zbrush 4 pipeline. Results haven't been completely stellar but we are getting there. Typing out my solution to remember.

Model a standard polygon model in Maya and maintain quads. If there is a hole in the model. Go to Tool -> Geometry -> Crease

Subdivide once if geometry has triangles to turn model into a 100% quad model. Use this subdivided version as level 1 now if this has been done.

Now -
Tool -> UV Map -> Delete UV
Tool -> UV Map -> AUVTiles

Do you painting and export the lowest level mesh as .obj
Now go to your lowest level of the model and to create the displacement map

Tool -> Displacement Map (use adaptive and smooth UV options on)

Now in photoshop
Edit -> Color Settings -> Gray -> Gray Gamma 2.2
(If done right. The gray value in the background areas of that texture will be kept at 129.)
Image -> Image Rotation -> Flip Canvas Vertical

Now Save the file with options "As a Copy" & check the "ICC Profile: Gray Gamma 2.2"


Links below included a reply from Cgbeige -> this allows you to scale the model and have the displacement maps hold up.

Wednesday, August 11, 2010

Cloth Galore - SYOG

Okay so we just almost wrapped up the Singapore Youth Olympic Games project. We provided quite a bit of the actual game day graphics and there was a big part of cloth, clouds and after effects involved. I will post the results but there are a lot of questions I have about cloth that has been left un-answered. Leaving this post here for me to remember and fill it up.

Most of the problems came from caching, projection of UV's after the fact and also the use of the animate along path. I think there is a bug somewhere in the process. SOMEWHERE!.


Wednesday, July 21, 2010

Seemingly Unrelated Links

They seem unrelated cause they aren't. Personal good stuff for myself to keep in mind.

White Papers
*This white paper explains how to use the Maya render pass framework. The covered topics include: rendering pipeline efficiency, configuring and customizing render passes, and how to composite render passes. The examples show how to leverage render passes to achieve efficient compositing workflows for common rendering, lighting and look tuning tasks.

Mac Batch Privilege/lock conversion tool.
*I do love apple. Even freeware for it is awesome. Simple rights management conversion tool for locked file systems due to files carried from user to user.

Tuesday, July 20, 2010

Turn off render - Primary Visibility

Z wrote this. Enjoy. =)


string $things[] = `ls - sl`;

for ($lol in $things){

setAttr ($lol + ".primaryVisibility") 0;


}

Monday, July 5, 2010

Vray - FlickerFree Steps

Render Settings

Indirect Illumination Tab
GI - On
Primary Bounces - Light Cache
Secondary Bounces - LightCache
Light Cache - Calculation Parameters - Subdivs (range 2000*)
Light Cache - Calculation Parameters - Show Calc. Phase
Light Cache - Mode - Mode - Fly-through

Vray Tab
Image Sampler - Sampler type - Fixed Rate
Lighting - Uncheck Default Lights
GI - Tick Don't render final image

It stats in the tutorial to use screen if the scene is really large but generally world scale is ideal for animation. Based on the size of the samples taken during test renders. We will guess what is ideal sample size.

VRay Common - By Frame ( Set appropriate number. 5-30 frames depending on camera speed)

Irradiance Map
Indirect Illumination - Tick Show Calc Phase (should already be ticked)
Mode - Mode - Multiframe Incremental

Vray Tab
GI - Tick Don't render final image

Wednesday, June 9, 2010

Transfer UVs - Maya is retarded

Okay seriously, a mel script just to copy UVs? I thought it would be simpler by now. There must be a solution and i'm the retarded one. Anyway till I find the solution. Select Source followed by Target and execute the mel script.

On maya 2010 but it seems to work from Maya8 onwards.

string $cSelection[] = `ls -sl`;
int $pCount[] = `polyEvaluate -f $cSelection[0]`;
int $i = 0;
while ($i < $pCount[0]) { polyClipboard -cp -uv ($cSelection[0]+".f["+$i+"]"); polyClipboard -ps -uv ($cSelection[1]+".f["+$i+"]"); $i = $i +1; } warning "DONE!!";



Okay, so I was retarded instead. The other solution is to use the Mesh -> Transfer Attributes(options) -> Use component mode under attribute settings.

Thursday, May 27, 2010

3d Max & Krakatoa

I hate 3dmax with malice. Nonetheless, it produces pretty stuff and I should keep it here and find a way to translate this to maya.


Combining 2 Particle Groups

//this procedure adds particles from one particle object to another.
//first select the object to add from, then add-select the object to add to.


global proc addParticles(){

string $particleObjs[] = `ls -sl`;
float $addPositions[] = `getAttr ($particleObjs[0]+".position")`;
int $countToAdd = size($addPositions)/3;;

string $emitCmd = ("emit -object " + $particleObjs[1] + "\n");
for ($i = 0; $i < $countToAdd; $i++){ int $xComp = $i*3; int $yComp = ($i*3)+1; int $zComp = ($i*3)+2; vector $addPos = <<($addPositions[$xComp]),($addPositions[$yComp]),($addPositions[$zComp])>>;
$emitCmd += " -pos "+$addPos+"\n";
}

eval($emitCmd);
}
________________________________

So, open a text editor and paste the code in there and save the file as "addParticles.mel".
Place the file in your maya scripts directory.
On Windows the default place would be:
C:\Documents and Settings\\My Documents\maya\scripts\

Then start or restart maya. In the outliner select the particle object you want to add from, and then add-select the particle object you want to add to. Then type addParticles in your MEL command line and hit enter. Done.

The particles from the first object are added at the same positions they had in their own object. And the original object is not deleted, but you can do that or hide it to verify that the first object now includes all particles.

Cgtalk

Monday, May 17, 2010

Cel Shading in Maya Software Renderer

Given my recent foray into V-ray. I better put this tutorial I found up that reminds me it ain't about the software but the user. ;) Pretty damned good results

Tutorial: Cel Shading in Maya with Christophe Desse

Sunday, May 16, 2010

Vray is my jungle.

video
O.M.G.
video


So further development into the relationship. Been stress testing vray to see if it can handle previous jobs done with MentalRay. Sure seems like Vray plays way friendlier.

The first image was a close up of the tree proxies. There is about 14 trees at 50k polygons each. One tree. Vray was steady as hell.

Second image, if I am not wrong, took 10:32 hours to render but the resolution is 1080HD which is pretty much 2k for the second image, I tried to calculate the number of polygons but my calculator started giving me *to the power of* digits. But its around the range of 6k trees at 50k polygons each.

Lastly, the video clips. Started testing to see if I can have a flicker free solution. Good folks at Cgtalk pointed me in the right direction on this one. Rendering Walk-through animations & more info on the Image Samplers. The final equation was Irradiance Map for primary bounce and Light Cache for secondary bounce. I am very happy right now.

The last clip just had my jaw drop. Bucket rendering over 3 render slaves at a speed of 11min a frame. Sadly, as short as that sounded, 50 frames meant approximately 6 hours.

Saturday, May 15, 2010

Vray is Love.

I am literally in love with Vray. I have invested countless months reading and expanding my knowledge on MentalRay. Yes MentalRay is powerful and yes it can do wonders but damned. Vray just works. It works like a freaking box of color pencils. It is obvious and it is fun. It has put a smile back on my face.

I will still use MentalRay when I have too while I slowly let the knowledge i've invested in it for linear workflow, deex render passes etc etc die.

The framebuffers / renderpasses from Vray are a freaking godsend. I am currently using the evaluation copy of Vray. But I am pretty damned sure I am going to make this purchase.

Last thing to look into is what to use for my render management. It will be a little trickier as I need to keep cost low. But still!

Vray is love.

Sunday, April 18, 2010

Modeling Basics - Grant Warwick - Hard Surface Essentials

3D modeling is problem freaking solving. Please watch and absorb this nuggets of gold. They are intelligent basics but many people seem to lack it.

Grant Warwick - Hard Surface Essentials

Wednesday, March 17, 2010

RenderPasses Done Right

Been doing research in Puppet Shaders & Deex Shaders. Trying to use both and turn it into something usable here at cum. m+d for future projects. It is sad that Maya2011 has solved the issue of render passes without shadows for Mia_materials but I can't and don't trust in Autodesk so I guess custom frame buffers might be the way to go.

So far, results is to render both Raw & Level of each pass and when multiplied together will produce the Result. Which also can be rendered directly.

I am using the deeX_Buffers_pass connected to the transform of a "dummy" cube to allow the rendering of the passes into an OpenEXR file at 32bit. Whilst using the DeeX_Mia_material to achieve the Mia_material look and using the script below to quickly swap all Mia_X materials to DeeX_Mia_materials.

As for the Z-depth, setting up a separate pass and attach the z-buffer puppet shader worked out better then using the built in Deex one apparently.

Lastly, by enabling these specific passes in the dummy cube attached to a "deex buffer writer" and following the tutorial written here Classroom, I get a perfect composite with all the control I need, and I get right back to the final result which is awesome. Minus the separate shadow pass which isn't available.

To Convert All Mia_x materials to DeeX_Mia_materials

string $malistes2[] = `ls -type "mia_material" -type "mia_material_x" -type "mia_material_x_passes" `;
string $montruc;
for ($montruc in $malistes2 )
{
AEdoMiShaderConversion $montruc deeX_mia_material _deex;
}

Saturday, March 13, 2010

Mib_FG_Occlusion


Note to self
For Occlusion Pass -

Mib_fg_occlusion works with cutout opacity.

Maya2010 *i've heard rumors of this problem being solved the standard way on Maya2011


Sunday, February 28, 2010

Nuke .chan to .fbx converter

Good folks at Cmivfx released this converter to allow us to track in nuke and import that into Maya. Good converter though hard to locate on their website. Here is a general link including mac, windows & linux versions.

http://www.fxmogul.com/Search.aspx?Query=cmiAPPS

Friday, February 26, 2010

Cherry Blossom Drop


Had a project involving cherry blossoms. Couldn't help but do this.
Maya 2010 and Mia_x_passes Materials


Attaching Cherry Blossom Geometry to a Tree with Tree Wind turned on -

Paint Effects Objects UV changes over time and thus will prevent the use of "djRivet" Script.

Solution. Cached out the Geometry of the paint effects tree after conversion to polygons. UV unwrapped object followed by deleting history and then reapplying the geometry cache information.

After this, we used the "spPaint3d" script to paint instances of the CherryBlossom geometry to litter the branches with the flowers.

note to self

- Since we will not be able to edit the geometry as it has been combined, the best way to help randomize the flowers would be to include a shader for each flower petal thus by editing the colors slightly we are able to introduce randomness without touching the geometry.

- I had to separate the paint effects polygon tree and recombine in order to make it a paintable surface for "spPaint3d". Just one of those things ;)

Lastly unhide the PaintEffects Polygon Geo with geometry cache and then select all CherryBlossom instances and then select the tree and execute djRivet.

Thursday, February 25, 2010

Pivot Point Mode Biatch!

I hate the fact that my Apple keyboards don't have insert. It ain't useful unless your on maya and pivot points are important which THEY ARE.

Here is a link with the list of equivalents:

My Currently Apple Thin USB keyboard
http://support.apple.com/kb/HT1216
All other apple keyboards
http://support.apple.com/kb/HT1167

FYI, Maya 2010, insert is fn+enter on the numpad.
Jesus I even had to waste time googling this up.

Wednesday, February 17, 2010

Another Intern will live to see another day

Just recently, we had a 600 frame scene that required an Ambient Occlusion Pass. We used the MentalRay AO Texture and got optimized the frame to a decent 1min per frame. We were all happy and dandy till we found out that during batch renders...this 1min became 6min per frame.

Do a little math and we couldn't finish it in time. It would take way too long. So we called an Intern and gave him sugar money, and he sat down and rendered using a script in a batch of 10 frames. 14 hours later and loads of movies and coffee...the deed was done.

Then I come along this damned script...might have saved him those 14 hours. Might have been 2 hours but hey, he wouldn't have seen 8 movies that night.

http://www.djx.com.au/blog/2010/02/17/frame-by-frame-command-line-rendering/

Personal Note to self
Maya 2010 - batch render function was attempted and did not work in this case, please try the above .bat file in future.

Wednesday, February 10, 2010

Geometry Random Rotation on Particles

How to create particle instancing with random rotation -

1. create object to be instanced
2. create particles using particle tool
3. in particleShape1 node create two PerParticle (Array) Attributes using the "Add Dynamic Attributes" button under general. They are rotChoose (which is a float) & rot (which is a vector).
4. Be sure to create these attributes under PerParticle(Array) under creation in the expression editor. Use "All Data Types".

particleShape1.rotChoose = rand(360); (float)
particleShape1.rot = <<0,particleshape1.rotchoose,0>>; (vector)


particleShape1.rotChoose = rand(360);
particleShape1.rot = <<0,particleshape1.rotchoose,0>>;

5. Then plug the rotChoose into rot under the rotation options -> rotation

CGTalk Discussion
Rotation Random

Maya 2010 and Maya 2009

Monday, February 8, 2010

Wednesday, February 3, 2010

Backburner not firing all cylinders!? The humanity!

So here is a link where they mentioned that backburner doesn't use all cores. Dear wen hao, note to self, use these bloody command line codes.

I quote the wise people on CGtalk

"I have gotten in the habit of manually setting the memory and thread usage flags in the job setting for MR jobs with Backburner:

-rt
Specify the number of rendering threads.

-art
Enable this option so that Maya automatically calculates the number of threads that should be used to best take advantage of the CPUs (or cores) on your workstation.

-mem
Soft limit for the memory used by mental ray (in MB). A soft limit implies that mental ray may actually use more memory than indicated.

-aml
Enable this option so that Maya dynamically calculates the memory limit prior to the start of rendering. This feature can be enabled at all times to obtain better performance."

CGTalk


Another point to note while using Backburner. Assign small jobs and if the job fails take note as it tends to render over previous files or jam up the render farm. Furthermore, renderlayers are DANGEROUS so keep it to one render layer per file. And save out a brand new file for each render and then dump those later on.

Backburner 2008.01

Cities - First QTown, now KludgeCity

Okay so for the Sel*etar project (name space is so that when client google up this project they don't find these posts). Anyway during the project...we were looking for ways to break the horizon line with cities. My friend Chia Choon looked into QTown which was one hack of a fantastic Mel Script.

Lately this guy named Ed Whetstone released something called KludgeCity. It is bloody impressive. Please do check it out and he was nice enough to release it for free. Kind intelligent people, gotta love em.

I think Qtown makes good suburbia whilst kludgecity really holds up to close detail with good UVs to boot! Love it!

CGTalk



Both scripts used on Maya 2010 and Windows 7

Mia_RoundCorners

Been a big fan of Mental Ray nodes. Especially those that speed up render time and save me polygons. I haven't tried this in production as I am always worried what it would do to my mattes for compositing.

Mental note - please do test how the mattes work as I can see this used in my productions pretty often.

Mia_RoundCorners - Add bevels without adding more geometry

Tuesday, February 2, 2010

Modeling a Head - Orthographic Vs Perspective

Just did a job for a client where close reference to an actual human character is important. I modeled the character with Orthographic cameras but checked every now and then in perspective.

When it was sent to the client, the replied that the proportions were off and that the model did not look good at all. They also did include a little image which totally did not look like the model proportions I used. The head had lens distortion and did not look right.

I switched the camera to an 85mm lens when close up on the face and she didn't look bad. But it did occur to me I modeled in Ortho and the reference images were probably with an 85mm. So would that fuck things up for me in future?

Please read this tomorrow morning and find out more.

CGTalk Discussion

Backburner Baby

Alright. Also after this project which personally was a little ridiculous given the time frame and number of frames. Totaling 3200 in 20 days including weekends was a little extreme.

So I've got two machines setup on Backburner and it looks like it works quite well. I am hoping the emailing function works as that would really give me peace of mind.

Note to self.
Backburner Manager - Manages All Rendernodes
Backburner Monitor - Allows us to view all available Rendernodes and manages jobs
Backburner Server - Considered a render node

Start Backburner Manager, then Server then Monitor on main machine and Backburner Server on all other machines.


Testing being done on Maya 2010 and Backburner with Windows 7

Sele*tar Project - Issues and Solutions

Creation of Binary Proxy (Assemblies) for Mental Ray

Rendering of massive scene using MR and Binary Proxies

Creation of Signage above key locations with "Compositing Background" setting on. ( Cinema4d term where the image is displayed like a surface shader in Maya un-affected by light)

Issues with file referencing where the scene file took 30min to open

MR Mia_x material causing weird shadowing effect as if an object was blocking the sun.

Use of MR texture -> ambient occlusion to create quick render of scene with gorgeous results instead of using the built-in AO pass.

Flickering for Paint Effects trees and grass. Could not figure out if the issue came from texture details thus the flickering or FG points thought FG caching was done. Further testing will be conducted to get better at FG caching for effective use during productions especially fly-throughs.

A shot took 6min/frame but only 1min/frame when rendering using Viewfinder instead of Batch Render option.

Project information
3200 frames
768x432 Resolution
Maya 2010 & AfterEffects
Duration 20 Days
Maya 2010

BSP2 & a Forest

This was one of the first issues encountered for a fly-through done of Seletar Airport. It is pretty much like an architecture shot with hardly any animation.

We initially couldn't render the files with the huge mess of trees but later learnt BSP2 with Ray-tracing as the render mode combined with Binary Proxy was the way to go. It allowed the computers to flush their memory and keep chugging.

BSP2 and Ray Tracing for rendering mode are settings to be used when combined with Binary Proxy in Mental Ray.

Pretty well documented discussion about the creation of forests.
CGTalk

Other related info

Purpose.

I am setting this blog up as a repository for myself to refer to all the things learnt and all the links associated to the questions that were raised during the process of a project as well as the answers.

The problems aren't big problematic ones but small things here and there that should have been easy but apparently, Autodesk Maya doesn't play nice.