Using multiple UV sets in Maya

I can’t believe I have been missing out on this useful technique all this while.

This is most useful when you are using a Layered Texture (e.g. to plug into the color node of your MR / Vray shader), and would like the texture file nodes of each layer to be affected by a different UV layout.

Here’s a tutorial by Parker Davidson on Lesterbanks (a place for great 3D resources!) that gives a good explanation of how to use mutiple UV sets together with the layered texture.

http://lesterbanks.com/2013/10/using-mayas-layered-shader-and-multiple-uv-sets-to-facilitate-texture-detail/

In summary, to create mulitple UV sets for a single object,

- Go to the UV texture editor, under the Polygons menu > Copy UVs to UV set > Copy into New UV set (or just create an empty UV set)

- Name your UV sets, and you can switch among them under the UV Sets menu

- You can freely edit the UVs of each set or reapply certain UV mappings without affecting the other sets.

To link a texture file node to a specific UV set:

- Go to Relationship Editor > UV Linking > Texture-Centric

- Select the file node on the left, select the corresponding UV set you would like to use on the right

How is this useful?

Imagine that you are adding in details to a just a small corner of your object. Your texture resolution has to be really big in order for the details to be sharp. However, if you use a layered texture to add in the details to your base color / texture, by using multiple UV sets, you can scale up one of them without affecting the rest and thus use a much smaller texture resolution. You can now also have the freedom to move the details around by shifting the UVs in its UV set.

 

 

Tagged ,

C4D Mograph Animation to Maya

Cinema 4D’s mograph tools are really powerful, and I was looking at its rigid body simulation capabilities (using the mograph tools) which seems like a very good alternative to Maya’s native rigid body dynamics, which can be slow to calculate or produce some crazy results when you are trying to simulate a large group of objects at one go.

Thus I was researching on ways to bring C4D’s mograph animation into Maya, and I was pleasantly surprised to find that it can be done really easily with the new alembic format support in C4D R14. All you need to do is to export your mograph cloner in the Alembic format in C4D, and then from Maya’s Animation menu, go to Pipeline Cache > Alembic Cache > Import Alemic, select your file and you are done!

If you wish to have further control in Maya, such as the ability to modify the keyframes of each cloned object (for effects such as bullet time or simply to move or hide a particular clone), one method will be to bake the mograph animation in C4D first before exporting it in the Alembic format.

Here’s a useful tutorial I’ve found on how to bake your mograph animation in C4D: http://www.youtube.com/watch?gl=SG&hl=en-GB&v=b-CnSGjkp68. It also shows the process of setting up a rigid body fracture animation using mograph, then baking the animation so that you will have editable keyframes for each individual cloner.

After you import the Alembic file into Maya, bake animation for all the objects and you will have editable keyframes in Maya too!

This method of baking animation in C4D is more of a work-around and thus it does seem a little inefficient. I would be happy if anyone can share a better method to do so :)

 

 

Tagged , ,

Maya Particles Random Rotation

I wrote a post about giving some random rotation to maya particles previously … and this is another method I’ve found that is more straightforward (useful when you are rushing for time and doesn’t need that much of control).

This is from a youtube tutorial by Stuart Christensen who learnt it from Eric Keller (http://www.youtube.com/watch?v=aGy0BqExwaI)

1) After setting up your emitter and particle instancer, go into the particleShape node ‘Per Particle (Array) Attributes’. Add a new ‘General’ Attribute (name it RotateMe for e.g,). Make sure the Data Type is ‘Vector‘ and Attribute Type is ‘Per particle (array)‘.

2) Add a new ‘creation expression’:

float $rotRand=rand(180);
particleShape1.rotateMe=<<$rotRand,$rotRand,$rotRand>>;

(This expression gives your particles a random starting orientation)

3) Add a ‘runtime before dynamics’ expression:

particleShape1.rotateMe +=5

(This expression gives your particles a rotation value as you play the simulation. Adjust the numerical value to control the particles rotation speed accordingly.)

__________________________________________________________

And to add on, if you want your particles to stop rotating as they rest onto a surface, edit the ‘runtime before dynamics’ expression to something like this:

float $addRot=particleShape1.velocity/2;
particleShape1.rotateMe +=$addRot;

(With this expression, when the particles stop on a surface, their velocity will decrease to zero and thus, the rotation will stop too. Again, adjust the numerical value to control the particles rotation speed.)

Tagged ,

Final Gather Flicker

Watched a Digital-Tutors tutorial on flicker-free final gather recently and one tip that left the deepest impression in me is that using luminescence planes to illuminate your scene is one major cause of final gather flicker (i.e. Using a polygon plane with a surface material or a material with incandescence to provide indirect illumination to your scene through final gather).

It was quite a big shock as many tutorials love to use these luminescence planes to demonstrate the effect of final gather, so I’ve never knew that such lighting setups are really prone to flickering.

And coincidentally I encountered such a scene a few days after. With the use of luminescence planes, there was persistent flickering even after I increased my FG accuracy to 1000, point density to 2, and point interpolation to 30 (it’s possible to go higher with these values still but it was really increasing my render times). After changing my lighting setup to use maya lights instead, the flickering almost entirely disappeared with just an FG accuracy of 300, point density of 1, and point interpolation of 10.

If you would like to maintain the reflections cast by your luminescence planes, you can still use the planes, but uncheck ‘Final Gather Cast’ & ‘Final Gather Receive’ under the mental ray tab of its shape node.

My friend also gave me some tips that could be helpful – increasing the ‘Filter‘ value under the final gather quality tab to 1 (helps to average out your final gather results), and changing the final gather mode under the final gather tracing tab to ‘Optimize for Animation‘.

And lastly, a tip also from digital tutors – Increase accuracy when you have blotchiness in the open areas where there isn’t really any geometry, and increase point density when you notice flickering on/underneath your geometry esp. at where the contact shadows are.

 

Final Gather flicker is such a big headache …

 

 

Tagged , ,

3D Reel Summer 2013!

Updated my 3D Generalist Reel with a few new shots :)

View the Shot Breakdown here

-

-

Tagged ,

Vray Proxy (in Maya) Tips

Was researching a little about Vray Proxies a while back and found some tips regarding its use. Decided to document them here before I forget them all.

  • Before creating the proxies, make sure your geometry is final and also set up all the shaders needed.
  • Make a duplicate of your geometry as backup.
  • Combine all the geometry into 1 mesh. Delete history and freeze transformation.
  • Select your object, go to the menu Create|VRay|Create Proxy. Set up the path, filename, faces in preview, and make sure  “Automatically create proxies” option is checked.
  • Your object is now a vray proxy, and it has a “vraymeshmtl” node to which all its materials are connected to.
  • Select the proxy node in your outliner, export selected as a .ma/.mb file.
  • When you need to use the proxy, import the .ma/.mb file into your scene. (This is to ensure that your proxy doesn’t loses its vraymeshmtl node and thus it’s materials)
  • Duplicate your proxy as instancers if you need multiple copies (do not import it again as that means maya will have to load and read the proxy vrmesh file for all copies instead of just 1)

-

-

Tagged , ,

Maya Particle Instancer to Geometry

Found a potentially life-saving python script by Sagroth that coverts your particle instancer into individual animated geometry.

Great for making minor tweaks such as removing intersecting geometry and adding/reducing rotations etc …

Download it from actual site: http://www.sigillarium.com/blog/lang/en/726/

-

-

Tagged ,

Random Rotation for Particle Instancer

Found a method to give maya particle instancers some random rotations in various directions and speeds.

This is from a very interesting Maya Wiki section of the Tokeru Publishing Website

(I actually wanted to quote this but it messes up all the formatting … so all credits go to the original author MattEstela ~)

1. Create new custom dynamic attributes for your particle:

particleShape1.rotMax (scalar, float)
particleShape1.axis (float PP)
particleShape1.rot (vector PP)
particleShape1.rotMaxRand (float PP)

2. CREATION expression:

particleShape1.axis = floor(rand(3));
particleShape1.rot = <<rand(360),rand(360),rand(360)>>;
particleShape1.rotMaxRand = rand( 0 – particleShape1.rotMax, particleShape1.rotMax) / 1000;

3. RUNTIME expression:

if (particleShape1.axis == 0)
particleShape1.rot = particleShape1.rot + << particleShape1.rotMaxRand, 0, 0 >>;
else if (particleShape1.axis == 1)
particleShape1.rot = particleShape1.rot + << 0, particleShape1.rotMaxRand, 0 >>;
else
particleShape1.rot = particleShape1.rot + << 0, 0, particleShape1.rotMaxRand >>;

4. In the Att Editor for particleShape1 -> Instancer -> Rotation Options -> Rotation = rot

  • Change the value of particleShape1.rotMax to control the speed of rotation. Each instance will start out with a random rotation, and each will rotate in a different direction at its own speed.
  • If consistency is a problem, like if it never plays back the same way twice, you may need to make a general expression using the “seed” function. For example: if (frame == 1) seed(10);

________________________________________________

Just some minor notes:

  • particleShape1.rotMax is a scalar attribute so you can find it in the channel box when you have your particleShape node selected
  • it seems like I need to give rotMax a really huge number in order for there to be visible rotation (I guess it’s probably because of the “/1000″ in the expression for particleShape1.rotMaxRand)
  • the expression above only gives each particle rotation in 1 axis (x,y,or z) … if you wish to have rotations in more axes, modify the RUNTIME expression to something like this for e.g.

if (particleShape1.axis == 0)
particleShape1.rot = particleShape1.rot + << particleShape1.rotMaxRand, particleShape1.rotMaxRand/2, 0 >>;
else if (particleShape1.axis == 1)
particleShape1.rot = particleShape1.rot + << 0, particleShape1.rotMaxRand, particleShape1.rotMaxRand/2>>;
else
particleShape1.rot = particleShape1.rot + <<particleShape1.rotMaxRand/2, 0, particleShape1.rotMaxRand >>;

________________________________________________

Visit the actual website for a lot more maya tips and tricks!

 

 

Tagged ,

Rendering stills in Maya for print

3D artists without access to render farms often run into memory issues when they need to render out huge still images meant for print. If your scene is heavy with geometry and textures / displacement, sometimes you can’t even render out an A3 size image at 300 ppi. It is not a matter of render time, but your render simply gets stuck halfway and never completes.

My colleague found an easy solution for me, which is to render in regions. This reduces the amount of memory needed to load the information in your scene at one go.

Our workflow is to set our maya renders in DOS mode outside of maya (creating a new text document and changing the extension to .bat – which is more straightforward to me than setting it through the command prompt) (if you wish to read up more on rendering Maya in DOS here’s a good tutorial by Paul DiPierro: http://www.pdipierro.com/tutorials/MayaDOSRenderTutorial.html)

To region in regions through DOS, the command would look something like this:

render -r yourRenderer -x imageWidth -y imageHeight -reg startWidth endWidth startHeight endHeight -im imageName filename.extension

Here’s an example of my batch file to render an A0 size 300 ppi image (I was afraid that my render will crash halfway through the night so I really separate it into many sections)

render -r vray -x 9933 -y 14043 -reg 0 3500 0 3000 -im section1 filename.mb
render -r vray -x 9933 -y 14043 -reg 3500 7000 0 3000 -im section2 filename.mb
render -r vray -x 9933 -y 14043 -reg 7000 9933 0 3000 -im section3 filename.mb
render -r vray -x 9933 -y 14043 -reg 0 3500 3000 6000 -im section4 filename.mb
render -r vray -x 9933 -y 14043 -reg 3500 7000 3000 6000 -im section5 filename.mb
render -r vray -x 9933 -y 14043 -reg 7000 9933 3000 6000 -im section6 filename.mb
render -r vray -x 9933 -y 14043 -reg 0 3500 6000 9000 -im section7 filename.mb
render -r vray -x 9933 -y 14043 -reg 7000 9933 12000 14043 -im section15 filename.mb
render -r vray -x 9933 -y 14043 -reg 3500 7000 12000 14043 -im section14 filename.mb
render -r vray -x 9933 -y 14043 -reg 0 3500 12000 14043 -im section13 filename.mb
render -r vray -x 9933 -y 14043 -reg 7000 9933 9000 12000 -im section12 filename.mb
render -r vray -x 9933 -y 14043 -reg 3500 7000 9000 12000 -im section11 filename.mb
render -r vray -x 9933 -y 14043 -reg 0 3500 9000 12000 -im section10 filename.mb

It looks kind of scary at first glance but it’s not hard to setup once you understand how it works~

-

-

Tagged ,

Transferring your Maya hotkeys to another computer

To transfer your custom Maya hotkeys to another computer, copy userHotkeys.mel, userNamedCommands.mel, and userRunTimeCommands.mel (in the documents/maya/version number/prefs folder) from the source to the destination computer.

The autodesk services & support site suggests to only copy the first 2 … but somehow it only works for me when I copy all 3.

-

-

Tagged ,
Follow

Get every new post delivered to your Inbox.