Headlines

Shattering a glass

January 31, 2012

             Ncloth is a very powerful tool in Maya. It is not only used to do clothing but also doing special kind of effects. Some great rigid body dynamics can be achieved through ncloth dynamics very easily. If you set up things correctly you can do a very big amount of rigid body dynamics with Maya ncloth without compromising the quality. We already did some nice ncloth effects early.

         In this tutorial I am showing the capabilities of ncloth for doing shattering effect of a glass after hit by a cricket ball. The very same technique can be used to create cracking of wall/earth etc... This can be achieved by mapping certain parameters of ncloth via ramp and animating the ramp accordingly. Using your favourite compositing software you can nicely blend these effects with your video.

Topics covered.

glass cracking
  • Creating the shatters using rockit shatter plugin.
  • Doing the dynamics with ncloth.
  • Preparing for the rendering.
  • Final compositing with After Effects.

1. Preparing the scene.

This is the crucial step in doing ncloth rigid body dynamics.
You have to plan about your mesh. The number of pieces must be optimum for your scene i.e. not more or less amount of chunks.  If you create too low amount of pieces the dynamics will look weird. And if you create too much amount of chunks the system will slow down and even crash while doing the dynamics. You have to think about the capabilities/weakness of your system while doing these kinds of effects.
Another thing the created chunk should not overlap each other .Even touching slightly will create problems. So I used the plug in named rockit shatter. It has the built in capabilities of creating the chunk with desired amount of offsets and smoothness.

While creating the shatter chunks please ensure the following for better and faster result.

  • The source plane should have minimum vertices. So I kept 1, 1, 1 divisions.
  • Delete the history.
  • In the rockit shatter plug in box turn of the smoothness option and reduce the offset amount.( keep in mind the optimum policy)
  • Never increase the amount of pieces more than 15 because creating that much amount of shatters at a time will eat a lot of resources. So do step by step.
  • After creating the chunks select them in viewport and do combine and delete the history. Delete the unwanted group nodes in the outliner.
  • We have created three boxes because I need them. One for shatters, other for the original glass and the last one for doing the mate while comping.
  • The ramp texture controls the dynamics as well as matting. (We will do it later).
  • Combining the chunks will reduce the resources needed and ensure clean workflow while doing the ncloth dynamics.

2.Doing the Dynamics


  • You have to increase the solver attributes in nucleus. When you keep it default some mesh trapping may occur.
Sub steps=12
Max collisions= 16
  • You have to set the start frame to desired amount for avoiding unwanted calculations.
  • In the ncloth object (both active and passive) adjust the collision/self-collision width.
  • Increase the stretch/compression resistance accordingly.( Keep the optimum policy). Do trial and error method.
  • Increase the mass to something about 5.( do trial and error).
  • Also increase the input mesh attract to 1.
  • Attach the animated ramp crated early.
  • If you face mesh trapping problem select trapped check. Adjust the parameters.( Not necessary).

3.Preparing the render

    4.Doing the Compositing with After effects

    Crater texture

    January 24, 2012
    High quality free texture of Crater.
    Maps included
    Diffuse/color map
    Bump Map
    Displacement Map
    Normal Map
    Specular Map
    You can use this texture in commercial, non commercial projects. Do not upload it in websites and do not distribute it.
    crater texture normal
    crater texture color
    crater texture bumpcrater texture displacement
    Do the following action to get the download link. Downloads are saved in 7zip format. You must have free 7zip application to extract the files.
    Get the download link by clicking and sharing one of the button below.
    Nice, you found it!














    Leaf_1_texture_diffuse+normal_displacement+specular+bump map free high quality

    January 21, 2012
    Maps included
    • Diffuse/color map
    • Bump Map
    • Displacement Map
    • Normal Map
    • Specular Map
    You can use this texture in commercial, non commercial projects. Do not upload it in websites and do not distribute it.

    High quality free texture of Leaves.
    Do the following action to get the download link. Downloads are saved in 7zip format. You must have free 7zip application to extract the files.
    Leaf texture color
    Leaf texture specular
    Leaf texture normalLeaf texture specular

    Leaf texture displacementLeaf texture diffuseLeaf texture normal
    Leaf texture displacement



    Get the download link by clicking and sharing one of the button below.


    Nice, you found it!


















    Cloth textures high quality free download

    January 17, 2012
    High quality free texture of Cloth.
    Maps included
    Diffuse/color map
    Bump Map
    Displacement Map
    Normal Map
    Specular Map

    You can use this texture in commercial, non commercial projects. Do not upload it in websites and do not distribute it.


    View album




    Get the download link by clicking and sharing one of the button below.


    Nice, you found it!

















    Concrete Lined Texture Specular+Normal maps

    January 17, 2012



    Get the download link by clicking and sharing one of the button below.


    Nice, you found it!

















    Wet Concrete Rusted Tile able

    January 17, 2012
    High quality free texture of Crater.
    Maps included
    Diffuse/color map
    Bump Map
    Displacement Map
    Normal Map
    Specular Map

    You can use this texture in commercial, non commercial projects. Do not upload it in websites and do not distribute it.
    View album



    Get the download link by clicking and sharing one of the button below.


    Nice, you found it!

















    Wet Rusted Concrete Texture

    January 17, 2012
    High quality free texture of rust.
    Maps included
    Diffuse/color map
    Bump Map
    Displacement Map
    Normal Map
    Specular Map

    You can use this texture in commercial, non commercial projects. Do not upload it in websites and do not distribute it.
    View album



    Get the download link by clicking and sharing one of the button below.


    Nice, you found it!

















    Render pass-compositing

    January 12, 2012
    vfx
    Better rendering needs better compositing. All the passes should be properly arranged, corrected and blended in your favorite compositing software.

    • Open your favorite compositing software here After effects. Import all the layers.
    • Drag the diffuse layer to the time line.It will create a comp according to the size of the image.
    • Drag all the layers in the order
    • Reflection Diffuse  Shadow Specular Occlusion Depth (In normal case reflection will be top of the diffuse.Here the reflection is at the bottom)

    Now change the layer mode of following layers to
    Reflection= normal
    Shadow=Normal
    Specular=screen
    Occlusion=multiply
    Turn off the visibility of depth layer.

    Now create a white solid at the bottom.( you can change the color as you wish).
    imageNow we need to blur the shadows. Select the shadow layer and go to effects and get directional blur. Direction 0x 15      blurriness = 19
    Change the opacity of shadow layer to 55%   (press T on the layer).
    image
    Now select the reflection layer and add a Gaussian blur to it. Blurriness = 5
    You can reduce the opacity of occlusion if you need.
    Now select the adjustment layer and do effects> blur and sharpen>lens blur.
    Select the depth.tga in depth layer,depth map channel to luminance,Iris radius to 8.0
    image
    The reflection layer wont blur accordingly because it hasn’t the depth information.You can cheat it with another blur.
    diffuse (0-00-00-00)
    Hope you have learned something new.

    Maya render passes

    January 11, 2012
                  Rendering is the most final thing in the 3d animation package.Setting the render is not that much easy as it seems.Simply clicking the render wont give the perfect image even if you did lighting texturing everything correctly.OK I agree if you set the render settings correctly you can get the desired output! But if you know about composting? Why composting is the necessary part for every animated film?Simply because it gives more control over your final image.Even if you know composting you have to get the different layers/passes correctly.In Maya it is simple and very comfortable if you know the technique.In advanced layering Maya lacks some special features such as object/shader ID pass,rgb pass,UV pass etc.

    Here I am explaining the basic render layering technique for diffuse,specular,shadow,occlusion,reflection and depth map.I also explain the compositing techniques with After effects.(Even Photoshop will do the trick).Even for node based compositing software the technique will be the same but you have to refer the software manual to arrange the things correctly.

    I assumes you have the basic working knowledge with Maya and After effects.
    Here we starts.
    Create a basic set up like this .
    I have a text mesh called text(if you don't know how to create a text visit one of my tutorials Text or ncloth text),a base plane called base, a directional light called key light with intensity 1 and an ambient light called fill with intensity 0.4.Of course a camera called rendercam.

    image
    Assign a phong material to the text and give color(you can assign different materials for different text but keep the phong material with default settings.)We need reflection for this material.
    Assign a blinn material with white color to the base plane.
    Position your keylight (x=-4,y=8.5,z=15: x=-22’,y=-41’,z=0’) >You can adjust the values according to your scene size.
    Position the fill light also (x=0,y=7.5,z=-6.5: x=-0’,y=-0’,z=0’)
    Now create a camera and rename it to rendercam.Position the camera something like this.
    image
    OK now we need to set the render settings.Go to render settings do image size as 640x480 and the renderable camera to render camera. Set the image format to tga.Right click on file name prefix and choose <renderlayer>(this will automatically rename the rendered images according to the render layer we set.)
    Now go to Maya software tab and change the quality to production.Turn on the ray tracing and leave the rest as it is.
    If you want a render select the keylight and simply turn on the raytraced shadows and leave the settings as it is. (we render the shadows separately with depth map filter). This step is for visual sake only.
    You get something like this
    beauty
    Okay Now we get the desired look.But we are here for render layers. So select all the objects including lights (deselect all the objects and right click the empty area in viewport will give the option select all) and go to the renderlayer tab under channel editor.You can see a master layer there. Click on the layers and chose create layers from selected.Now you will get a layer named layer1.Select the layer 1 and click layers>copy layer.Create total 6 layers like this way.Now double click on each layer (except master layer ) and rename them respectively as follows .Diffuse,shadow,specular,reflection,occlusion and depth.
    Now do the things carefully. We have render layers but no settings for them.
    Select the layer named diffuse and select the base plane.Assign a use background shader and change its parameters as follows.
    Specular= black
    Reflectivity=0
    Reflection limit=0



    Now select the layer named specular and right click on it.Select attribute( In Maya 2009 and below this step may differ.)Now an attribute window with specular will open.Click on the preset tab and chose specular.
    image
    Now select the layer named shadow and do the same step and chose shadow.
    Select the key light (still in shadow layer) and go to attribute editor and turn on depth map shadow and change the resolution to 1024. Leave the rest unchanged.
    Now select the layer named reflection (here you can't get the preset because Maya doesn't have a preset for reflection in software render).Here we need to create some shaders.
    Select the base plane and assign a use background material to it.Change the parameters as follows.
    Specular color to white, reflection limit to 10, shadow mask to zero.
    Now do a render.
    ref_1

    But we don't need the text, we need only the reflection. so select each letter and turn off the primary visibility.Use attribute spread sheet for a faster work flow.
    Do a render again.
    ref_2
    Now we got things correctly.
    Now select the layer occlusion.Do attribute>preset>occlusion.
    Do a test render.
    occ_1
    You will get something like this. But we have to adjust it little bit. Select the newly created surface shader( if it is in the attribute editor go to hyper shade and select) . Now click on the out color and you will get mib_amb_occlusion_1 tab.Change the parameters as follows
    Samples= 64,  max distance to 2.
    Rerender.
    occ_2
    Okay now we get some thing like this.
    One more layer left Depth.
    Right click on the depth layer and do attributes >presets>luminance depth.
    Do a render.( If you are using Maya 2009 you will get the correct output).
    depth 1
    Everything will be white.It is because some bug in Maya settings. Select the render cam and adjust the min clip to 0.1 and max clip to the farthest distance of your object.( here it is 33).
    Now right click the text and select assigned material and you will get a surface shader selected.Click on the out color connection you will get a set range attribute.
    image
    Now click on select under bottom and do CTRL+A. You will see oldmin and oldmax value have different colors.
    image
    Right click on old max and do break connection and set the value of your max clip value of the camera( here 33).
    Do a render.
    depth3
    Now we have to render all the layers. Select the master layer and click on the x and it will be changed to a green tick mark.We need this master layer for reference.It is not mandatory.
    Now go to rendering mode and do batch render. We set our render range to single layer so the rendering will happen very fast. Once the render get finished you will get following images
    render layers
     
    Copyright © FermiCG. Blog Templates By FERMICG