Monday, 28 October 2013

Grass tutorial in Maya

Open Maya and create NewScene. I use the HotBox coz this is the best solution for me to navigating through Maya interface.
Next we need to create sum geometry to paint on it, coz PaintFX will be created on curves on surface. Create NurbsPlane. Scale it a little bit so ya get sumthin' like that.
There are few diffrent ways to create PaintFX. Ya can paint direct on surface using Brush tool, then brush tool will create curve on surface or you can create curve on surface and attach brush to curve. In this tut I choose second way.
To make surface live, select it and click big red magnet on status line.
Now the surface is live and you can draw curve on it.
Choose Create - CV Curve Tool and click little box near it. This is an option box. Now in CV_Curve_Options click ResetTool and Close it. This was for setting 3 degrre cubic curve.

Now you get the diffrent pointer. So draw the curve on surface. Make it 8 spans or sumthin' near that number.
You should get something like this on pic.
Click again MakeSurfaceLive, I mean BigRedMagnet and you'll back to normal shaded mode.
Now it's time to select proper brush. We wanna create grass. So open up the Visor and look around what kind of grass there are. Visor is in: Window-GeneralEditors-Visor.

And here ya got Visor.
With brush selected, select curve on surface.
When ya choose brush from Visor ya'll get diffrent kind of pointer, sumthin' like red circle. This means that you are now in PaintFX mode. But if you wanna select curve on surface you shoul back to normal pointer mode. For that just click "Q" button on your keyboard and if you wanna back to PaintFX pointer just click "Y" on your keyboard.
If you got problems with curve selection coz this is curve on surface and you can select both curve and surface, solution are SelectionMasks. You'll find'em on StatusLine, look at pic.
Click: PaintEffects-CurveUtilities-AtachBrushToCurve. So now stroke curve with selected brush is on curve on surface. If it liitle to mass to understand you can open up Hypergraph to see all conections, like on pic:
Tips: if after attached brush to curve. Your grass is really tiny then ya should do sumthin' like this: you should see PaintFX pointer - red circle. If don't see it click "Y" on your keyboard. Than press ans hold "B" key and move your mouse, this is an interactive size changing for FX pointer. So make it bigger and try to attach your brush again to curve.
You can find Hypergraph in: Window-Hypergraph or just make a hotkey for that. I got hothey for Hypergraph under alt+G buttons. It's depend on you.
In Hypergraph select: grassWindWide1 node -this is your brush- and open the AttributeEditor.
In AttributeEditor change the values like here: BrushWidth: .8, StampDensity:12, Segments:12.
There is about 300 parameters in PaintFX, so don't panic if your first grass looks so simple but with sum patience you'll get more knowledge about that powerfull tool.
Well, I think it's good moment to make prewiev render. So open the RenderGlobals and set sum of the attributes.


RenderGlobals window. Now create the SpotLight. Choose menu: Create-Light-SpotLight and bring AttributeEditor to see it attributes.
Set the camera in proper place and Render scene. You should know where the Render button is if not check the Maya's docs. You should get sumthin' like this. Not bad for dumb maximum simple grass huh.
You can also add sum environment to your scene, sum fog or sumthin'. So open once again RenderGlobals and set attributes like that.
Then click black arrow on the right near EnvironmentFog. Set like this one.

Now ya should get similar to this one. Don't worry if your stuff doesn't look like this coz this is just brief overwiev of PaintFX. The main reason for making this tut was make ya a little bit unappreciated with Paint FX techniques.
R ya still there?? Don't sleep? Ok. So we got simple grass. Oh I forgat about rendering, the render time is: 49s on 640x480 with ProductionQuality. Next we add some dynamics to our grass and will animate it.
In GrassWindWide1 node go to Turbulence tab and set attributes like on pic below or close these values.
This added sum wind turbulance to grass. Just click Play on timeline and see what happend.
This added sum wind turbulance to grass. Just click Play on timeline and see what happend.

"MASKING" in Photoshop

This one will show how to easy extract some part of image. We'll try to leave only the car and swap whole background.
First we need to make layer from backround. Simply choose "layer/new/layer from background.." from the menu and click OK with default options.
Now have to switch to quick mask mode by clicking icon on the left (hotkey: "q")
Now when we're editing image in quickmask mode we need to paint with all useful tools (brushes, fills) on part we wanna save (a whole car in my case). Painted areas are turning red, notice you can use eraser tool also
Whith bigger and smaller brushes I finished covering whole object.
Now we have to quit quick mask mode by clicking on appropriate icon (or pressing "q" key again) -our quick mask will turn into selection.
Notice we have selected all except masked area so there's nothing left to do then press "delete" key to get rid off unwanted part. And here's what we get -separated car.
And that's it. Now you can create layer below current and design a new composition. Something like this for example..




Tuesday, 8 October 2013

Realistic Bump Map


I will show you a simple way to create correct bump map for textile material.You are able to create any bump/displace surface using this way.
1. Create a Circle spline in Front View. By using Break command split it into two parts.
2. Grab bottom part and using snap, move it as you see on image. Weld connection points to get continuous spline.
3. Repeat last step few times.
4. By using Clone Instance tool and Rotate make grid like on image.
5. Select one spline and select Enable in Renderer and Viewport in Modify Panel.
6. Create camera sheer to splines. Select Orthographic Projection in Modify panel. Measure distance min and max as i show on picture. You can do that by using Create -> Helpers -> Tape
7. Go to Camera View. By using FOV parameter set range of view.
8. Go to Rendering -> Render -> Render Elements and add Z Depth. Input Z Min and Z Max bellow.
9. After rendering you should get black&white image that you can use for creating displace or bump. You can play with Z Min&Max parameters for get better result.