Tutorials about HTML, CSS, PHP, Javascript, and Photoshop

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that has been used in the blog.
  • Archives
    Archives Contains a list of blog posts that were created previously.
  • Login
Ten20Five Editor

Ten20Five Editor

Ten20Five Editor has not set their biography yet

After studyingVim for BeginnersYou’ll have seen that the relative line numbering for your files do not survive a reload. Though this behaviour can be defined in the Vim configuration file

The .vimrc File

All ofVimConfiguration information is in theVimrcFile found in the home directory. You can open it with the edit file command from insideVim:

:e ~/. Vimrc

This file is empty because it has not been used. This tutorial will show you how to use it

Commenting Code

You should document what is done, Before you insert any code. You might know what you are doing right now, but a month from now is a different matter. Always comment the code so that when you come back to it you’ll be reminded of why you coded something

For theVimrcAnything after a double quote to the end of a line is not used, file. Therefore, you can put anything there to help you remember what you did

Set number  "This turns on line numbering

Now you will always know that theSet numberCommand turns on line numbering.  

Options and Variables

You need to put this in to the , To turn on line numbers and relative numberingVimrcFile:

Set number          "This turns on line numbering
set relativenumber  "This turns on relative numbering

Save that and you no longer have to think about it. Every time VimOpens a file, it will now show relative line numbers. TheSetCommand sets any option that is inVimAn option is turned off by setting the opposite option. Opposite options are the same as the option withNoIn front

Use the following to turn off line numbering and relative numbering:

Set nonumber            "This turns off line numbering
set norelativenumber    "This turns off relative numbering

Don’t put both sets in to theVimrcFile. That will turn it on and back off. I will show you how to do that more programmatically, In a little bit

Toggling the option is another way to set the option, If you already know the state of an option. Options are toggled by putting aAfter the option name. This toggles on/off the options:

Set number. "This toggles the value of number
set relativienumber. "This toggles relative line numbers

Use a, If the current state of an option is neededAfter the option name. InVimType:

Set number

It will returnNumberThis enables you know the state of the option

You can set the, If you want to change the number of columns that the line number area showsNumberwidthTo a value. The following will set the column width to 4:

Set numberwidth=4       "Set the line numbers to 4 spaces

Try it out and see how many spaces you like and set that in to the VimrcFile

If you need a variable, variables are created using theLetStatement. For example:

Let name = "Richard Guay"   "Set my name in to the name variable

When you save that in the VimrcIt can displayed in command mode with, file (but use your own name):echo name

Seeing the Variable name

Options are treated as a variable by prefixing the option with an&Options can be printed by:

:echo &numberwidth

TheEchoCommand is only for variables, but the prefixing an option with an&TellsVimTo treat the option as a variable. This enables you to use the option’s value in math. Therefore, to increase the line number area width by one is done by using

:let &numberwidth = &numberwidth + 1

AnEcho &numberwidthShould now show5

All variables have their scope as well. Scope is defined by a letter:And the variable name. Undefined scope is treated as global scope. The different scopes are:

B:Buffer scope—Only usable from within the current buffer
W:Window scope—Only available from the current window
T:Tab page scope—Only available in the tab page
G:Global scope—available everywhere
L:Local scope—available locally to that function defined
S:Source scope—available only within the sourced file
A:Argument scope—only available within the function
V:Global scope—used to refer to a variable defined and used byVim

The proper definition for the name variable using global scope is:

Let g:name = "Richard Guay" "Set my name in to the name variable

Getting Information

You might wonder how do you find out the different options, Now that you know how to set options and variables. Searching the web is one option, but the information is inVimType:

:set all

AndVimWill show every option in the program. Typing the:letAnd an enter will show all of the variables

The:helpCommand is used to lookup the extensive documentation built intoVimTo get out of:helpUse:qInHelpMode, this does not exit the program, but puts the editor in to normal mode


Functions are very useful in theVimrcFile. Since theVimI will from here out refer to it’s true name:, ’s configuration files use a full programing languageVimScript

InVimScriptDefine a function using:

Function <function name>()
    <function body>

I love the line numbering and relative numbering, but sometimes you do not want relative numbering. Typing the full string:set norelativenumberOr even:set relativenumberIs a lot of typing. A function to turn it on and off would be good

Function TRelative()
    set relativenumber. Endfunc

A function is run with the:callCommand

:call TRelative()

TheFunctionCommand does not allow you to overwrite an already defined function. If that function was already defined somewhere else or you tried to reload the file againVimWill error and stop processing the file at that point. If you use theFunctionCommand, it will overwrite the function without an error. It is good programming practice inVimScriptTo mostly useFunction

A function can be created to do that and it’s opposite, To turn off all numbering. Add this to the Vimrc:

Function. NoNumber()
    set nonumber
    set norelativenumber

function. Numbers()
    set number
    set relativenumber

You place a variable name inside the parenthesis, To pass parameters to a function. For example:

Function. Hi( name )
    echo "Hello" a:name

You have to scope variables that are arguments of a function, As you see. You will get, When you call the function now with a name

:call Hi( "Richard" )
Hello Richard

Basic Key Mapping

One of the most important uses for the configuration file is to setup key mappings. For example, you toggle relative numbers on and off a whole lot. Instead of typing:call TRelativeAll the time, a hotkey is much faster. The, To do thatMapCommand will help

Map <c-t> :call TRelative()<cr>

With this line in the VimrcFile, you can now typeControl-TAnd the relative numbering will toggle on and off. Try it out by making a mapping for toggling all line numbering

But for every mode, Key maps are not just for normal mode. It will map the key for that mode, If you prefix the command with the first letter of a modeNmapAlso maps forNormal modeVmapMaps forVisual modeImapMaps forInsert mode

Now that you know these command, forget them. These commands can be dangerous. It will use the new mapping and can create an infinite loop in the mappings, If you remap a key again

To prevent that happening, you need to addNoreAfter the mode and before the map. ThereforeNmapIsNnoremapVmapIsVnoremapAndImapIsInoremapThese use the default mapping for any key command you reference in the macro. These are much safer to use in the configuration file


In this tutorial I have shown you the basics of creating aVimConfiguration file. Set/unset options and variables, create basic functions, I have shown you how to: comment the configuration file, and mapping keyboard shortcuts. The best way to remember is by practicing

Continue reading

Web apps are a great way to interact with your customers. To non-web developers, they can be a really daunting task to create, However. The folks at Stamplay have aimed to make the creation of web apps a breeze with their service that automates the web app development process by giving you a simple step-by-step process on creating apps, Luckily for those users

StamplayDropbox, can be used to make web apps that integrate with services like Facebook, Google, and loads of other apps. You don't have to go out and find the APIs for each respective service—you just drag it in, when using Stamplay, This is nice because

I'll show you how you can create your first social network powered app, using Stamplay, from scratch, In this tutorial

Creating Your First Web App

Creating a new web app from the home screen

Head over to Stamplay's website and create an account by clicking on the green , To startStart Now button that's located towards the center of the screen. You can then sign up for an account using either your email address or your Google Account

Choosing a name for your new app

You'll now be brought to your app library. You can use this page to both view your old apps as well as start the creation of new apps. Look towards the upper right-hand corner of the screen and click on the blue , To create a new appCreate app button. A pop-up window will then appear asking you to name your new app. After confirming your app's name, you'll be brought to the Components page


You can choose how you'd like your user to interact with your new web app, In the components page. Fill out a simple form, For this example, I'm going to create an application that lets a user sign-in with Facebook, and have an email sent to their inbox

Selecting a sign up service for your app.  

To start, click on the blue User button from the top of the window. To add Facebook login to your app, click the Blue Add button from the right-hand side of the window; a popup window will appear asking you to choose a login service. For this tutorial, I'll be selecting the Facebook option

Adding components to your web app in Stamplay

You'll now be asked to provide an App ID and App secret. These can be acquired on Facebook's devleoper page and are used to identify your app with Facebook's servers

Now, click the blue Plus button that's located to the right of the user logo. You'll now be able to add more components to your app. Click on the , Since we want to send an email to our usersEmail option. Then, click the Plus button again to be brought to the selection screen again. This time, click the Form button

Creating fields for your form

You'll be able to set up your form by giving it a name and adding fields, Look towards the center of the screen. Look to the bottom of the window under the , To add fieldsFields header. Use the Field Name text box to give your field a name. To the right of this text box you'll find a drop-down menu that asks what type of field you'd like to add

For this tutorial, I'm going to be using the form to ask users what smartphone operating system they use. To do this, so I'm going to choose , I'll have the user check what phone they useRadio button from the drop-down menu

You'll now be be brought to a menu that lets you input your form's options. You can add your button names to the list, In the case of radio buttons. For my form, I'll be adding the names of smartphone operating systems to the list

Make sure you turn the , If you'd like to make a part of your form requiredRequired on/off switch to the On position. To add multiple forms to your app, click the + Add Form button from the top of the window


Configuring the email that will be sent to your app's users.  

Now that you've created your form, it's time to use the Tasks tab to configure the email we're going to send to our user. Click into the Tasks Button from the side-bar. Then, look towards the upper right-hand corner of the window and click the New Task button

Configuring a task in Stamplay

You can now choose your trigger component and action component. Your trigger component is what triggers the action component to do something. Underneath each component, you can choose how said component will be triggered. For example, you can set your trigger component as your user and have it trigger the action component when it signs into Facebook

For this example, I'm going to set the trigger component to the User and the action component to EmailI'm going to make it so when the user signs into the app, Additionally, an email is sent to their inbox

Filtering who your app sends an email to.  

Click the blue Continue button and you'll find a header labeled Tune UserYou can use this section to finely tune the User trigger, for example, if you'd only like the email sent to the user if their email ends with Gmail accounts, you can do this by clicking the Add filter button and choosing Email From the Select a Property drop-down and (Text) Ends with from the drop-down menu. You can then Type "@gmail.com"Into the condition box and click the Blue plusButton to add this filter to your app

Configuring the email that will be sent to your app's users.  

You'll now be prompted to setup your email options. Look towards the right-hand side of the window under the Login trigger data header--you'll notice quite a few options. These options are information collected about your user in the Facebook sign-in process. To use this information in your form, just click into a text box and then click on its respective piece of information from the right-hand side of the window.  

Something you'll want to do for your return email address and email body, You can also manually type information into your email as well. Click the , Once you're done setting up your emailCreate Task button that is located towards the bottom of the menu


It's time to build your app's front-end, Now that you've created your tasks. Click into the , To do thisLayout tab from the sidebar and look towards the upper right-hand corner of the window. Click on the button labeled Change theme

Choosing a new theme for your app

Take a look at each of the included themes, From the theme selection window. When you find one you like, hover over the theme and click on the View Demo button to preview the theme. Click the , If you decide you like your new themeInstall Theme button

Customizing Your Layout

Now, look to the left-hand side of the window and click on the Pages drop-down menu. You will now be shown all of the HTML files that make up your web app. If you'd like to add content to your app, you can edit the HTML files to do so

In this article, I'm using the standard Stamplay theme and have edited the home-page (index. Html) to remove sample text

Adding The Facebook Login Button

Copying Facebook login div tags.  

Now it's time to start edit the front-end of our web app to display the Facebook log-in button to the home-page. To do this, look to the left-hand side of the Stamplay window and click on the drop-down menu labeled WidgetsClick the , ThenAuth. Login. Hbs. Html button and look towards the center of the page

Look towards the center of the Stamplay window at the HTML document. Scan this document until you find a line that starts with Facebook LoginAnd copy it. Open index, Then. Html document from under the Pages drop-down menu

From the index. Create a new <p> tag, html page, paste the Facebook Login code, and close the <p> tag (</p>). Look towards the upper-right-hand corner of the Stamplay window and click the , NowGo To App button. Your web app will now appear in a new tab

Copying Facebook login div tags.  

Click the new Login button and login with your Facebook account, From your app. You should then see your Facebook name and profile picture at the upper-right-hand-corner of the app. Additionally, if configured properly, you'll notice that the email we setup earlier has landed in your inbox, check the email account associated with your Facebook account

Adding A Form To Your App

Adding the form div tags to your app

Remember the form we created earlier. It's time to add that to the front end. Click into the , To do thisWidgets drop-down menu and click the Form. Display. Hbs. Html button to be brought to your form's HTML code. Look towards the top of the menu and copy-and-paste the first div tag your the index. Html document

We're not quite done yet, However. You'll see an area to input your form's ID that was set when creating your table, If you look towards the end of the tag. If you're unsure of your table ID, you can view it by clicking on the Table button in the Components tab and looking towards the center of the window

Testing Your App

Now that your app is ready to go, test it by opening it in a new tab. You can retrieve your application's URL by clicking into the Settings tab on the left-hand sidebar and looking under the Domains header. Copy and paste this URL into a new tab and give it a whirl

The Admin Tab

Once your app is live, you can go to the Admin tab to view responses to your form. Click into the tab and, click the , from the drop-down menuForm button. From the center of the window you can view resposnes to your form and the email addresses provided by the user's Facebook account. If you click the , AdditionallyUsersYou can view the name and email of every user that's used your app,  button

And that's a wrap!

You can now use Stamplay to make simple web apps to interact with your users and customers. Link us to your new web app—or let us know if you need any help using Stamplay, In the comments

Continue reading

Perhaps to a professional or—dare I say it—even a Hollywood level, you're most likely wanting to up your production game, If you're reading this tutorial. So where better to aim than for the very top

And explain how to create a depth to this basic idea worthy of the big screen, This tutorial will examine a simple percussive pattern, inspired by a recent Hans Zimmer score

Compositional Consideration

Loosely based on the rhythmical feel of the Hans Zimmer score for 2013 film "Man of Steel", To demonstrate just how effective this treatment can be, we're going to start with two simple rhythms

After the iconic Superman theme John Williams left us humming for decades, One can only imagine how difficult scoring this film must have been. Zimmer's approach for this soundtrack was unique, to provide depth and basic humanity, basing the most complex ideas in the score in rhythmical arrangement. This was a bold and contemporary move, For a film and score previously known for it's iconic melody

We're going to look at two rhythmical patterns, both of which we will voice on floor toms / low toms. To demonstrate diversity, the other with much more aggression, One pattern will be played softly

The key element of composition here is the idea of stacking drum/percussion voices. We're going to use the same rhythm over and over but build this up over multiple drum voices. This technique gives us simplicity but delivers a lot of power

1. Soft Toms

Setting Up

Note:This tutorial is based in Pro Tools but you can apply the concepts to any other DAW of choice

As you can see in the screenshot below, I have loaded BFD2 onto an Instrument track, and chosen three floor toms to represent the three drummers I imagine would be playing together. The three drummers will be playing the same rhythm to help build scale within the music. As you can see below:, These have been loaded into the tom parts of the virtual instrument

Hans Zimmer employed 10+ drummers to play simultaneously, albeit scaled down a little, so this is our virtual version, In the real score for "Man of Steel"

Instead of using a stereo output to process all three toms, Within the in-built mixer in BFD you can see I have routed the three tom channels to three mono tracks within Pro Tools, for mix balancing

As you can see below, I've not touched any of theOverheadRoomOrAmbienceSend levels on the toms. I want to keep the sound as organic as possible for processing at a later stage

This really is as basic as you can get

It's now time to program the first pattern, So with BFD all set up

Clicking In

"Clicking-in" a drum pattern might seem like a particularly stagnant way of creating a dynamic drum sound. Efficient and accurate way of getting the rhythm we require here, However it is a very quick

The rhythm has been clicked in on a MIDI track to "feed" just one tom within BFD, As you can see above

This is what we've got so far:

The part sounds okay. Importantly, It's lifeless but, we've got the rhythm we need


Now let's duplicate the part

This is a simple case of copying and pasting the pattern to trigger the other two tom drums we have loaded into BFD

The reason we are doing this is directly inspired by Hans Zimmer. This "layered" approach means we get the same pattern but played three times to create a sense of depth which is impossible to achieve with simply one voice

So this is what three toms playing the same part now sounds like:

It's not bad and there is certainly more power with all three but it still sounds a little computerized


By utilizing theRandomFeature within Pro Tools, we can shift the programmed notes slightly out of time to create natural "flamming"; a drumming term which means that each hit will be slightly delayed. This is going to create a much more natural flair to the part

This is what the part now sounds like with a Random process of 15% added to our MIDI track:

We've got a lot more feeling in the playing now but as you have seen from the previous screenshots, we haven't touched any of theVelocityLevels so far


Remember, we want to create a very soft tom part. So what we've got so far is particularly over the top and lacking in any kind of variation

By simply dragging the velocity levels at completely random points in theVelocityWe start to create the intricacies a human would inject into playing this part, pane you can see below

After which, this is what we've got:

This is exactly where we wanted to get. We now have an enticing and exciting rhythm which has depth, character and a lot of atmosphere

Most importantly, it sounds real

We now have a great part to add to the score

2. Hard Toms

Now let's take a look at the second tom part. We're going for a particularly aggressive sound here but we'll keep the process identical. I've created a duplicate BFD track so we're now running two instances of BFD at once. You don't need to do this but it keeps things nice and clean for demonstration purposes

Clicking In

So let's start by clicking in the rhythm again:

I've chosen a slightly busier pattern to represent the impact we want from an aggressive part. This is where our hero might be saving the day

Here's how it sounds:


Now that we're happy with the pattern we can go ahead and duplicate the part again, to trigger the other two tom drums we loaded into BFD

Now we're getting some power

This has a lot of impact but we need to do more processing to get the part sounding realistic, As you can hear


Let's use the same trick as before. I've applied a 15% ofRandomTo the MIDI part for realism:

The velocities are still particularly repetitive but let's hear how it sounds at this stage:


Finally, let's change the Velocities within the part. You'll notice that the part sounds a little less harsh than before. We're going for realism and depth - by making the percussion, But rememberTooPowerful we can really lessen the impact we want to create

Here's how it looks:

And here's how it sounds:

It's sounding powerful and almost finished. Let's not leave it there just yet

Additional Elements

To add a slight variation I've added a snare part to round the phrase off. You can go all out and add rolling cymbals, etc - be creative and do whatever works for your piece. We're only scratching this surface here

Here's how the part looks with the snare drum added. I've randomized the part and changed the velocities, to keep the realism we've worked so hard to achieve throughout this demonstration

And here's how it sounds:

Now we've got the finished part

3. Piecing Together

Let's now piece together what we've got

I've routed the outputs of the second instance of BFD to separate channels within my mixer in Pro Tools, As you can see above. Which can be particularly beneficial for controlling levels and keeping the part sounding realistic, This means we can control each tom level during the mix

Now it's time to pan the parts to create width within the mix, as per below

Above you can see the two instances of BFD which are outputting the combinedOverheadRoomAndAmbienceChannels as one stereo channel, along with additionalMonoChannels for the toms and additional snare. I've panned these to place the three drummers around our "virtual-scoring stage"

This is what we get:, If we play both parts together

And there you have it. This is our finished part

4. Mixes

I've put together a basic film score arrangement to demonstrate how these parts might sound in a mix

Here are the soft toms we created:

And here is an arrangement with both the soft and hard toms in the mix:


It's absolutely vital to remember that the most simplistic ideas can often be the most impressive. The approaches we used in this tutorial were exactly that but hopefully yielded results that go way beyond the simplistic nature of the processing we applied

Many more drummers were used, In the Hans Zimmer soundtrack for "Man of Steel". You could go way further and add lots of additional drums and extra percussion too

How far can you take it

Remember—the idea is to keep the rhythm simple but create size and width with building the voicing up with clever layering

Feel free to let me know below how you get on, If you try any of the techniques in this tutorial. Good luck

Continue reading
Final product image
What You'll Be Creating

In this tutorial we will be learning how to render volumetric effects using Mental Ray. We will be using Mental Ray’s Parti-Volume shader to create volumetric light effects like light fog in our scene, and the Parti-Volume Photon shader for volumetric caustics, In particular

 Step 1

The scene we'll be using consists of a simple hallway with some windows. As when seen from inside, We will be rendering the effect of light fog shining into the hallway

Step 2

To get started. Our first goal is to assign some basic materials to the scene. We will assign a simple colored material to the hallway, and a Mental RayArch & DesignMaterial will serve this purpose.  

Step 3

We are now going create aSpotlightThat is going to illuminate the scene. Unlike a Point Light or Directional Light, We will be using a spotlight because a spotlight can help us direct the photons exactly where we want to, which emits photons in all directions

We are going to direct the Spotlight so that it points through one of the windows as shown below

Step 4

We will turn onRay TracedShadowsFor this light and we are also going to set theMultiplierTo10To brighten up the scene a bit. We are going to set the light to emit photons for our caustics effect that we will be generating later.  

To do thisRight ClickOn the light and go toObject Properties > Mental RayTabAnd check on theGenerate CausticsOption

Step 5

Next we are going to set some rendering options, like changing the renderer to Mental Ray and assigning a volume shader to the scene. Press, To set the renderer to Mental RayF10To go to theRendering OptionsAnd then go to theAssign RendererRollout and change theProductionRenderer toMental Ray

Step 6

Next go to theRendererTab and scroll down to theCamera ShadersSection inside theCamera EffectsRollout, and assign aParti VolumeShader to theVolumeSlot. This will be the volumetric shader that shades the light's fog effect. We will be tweaking the shader a little later

Step 7

Now Let’s turn on global illumination for our scene. We will have a dark room, We are doing so because our hallway is going to have only one light source and if we do not have the light bounce off the walls. Press, To turn on global illuminationF10To go to theRender SetupAnd go to theIndirect illuminationTab to EnableGlobal Illumination

We are also going to increase the number of emittedCausticAndGI PhotonsTo200000This way we will have much more detailed lighting in our setup

Step 8

Let’s give the scene a quick render to test out our setup so far.  

We can definitely see the light fog, As we can see above, but the effect is too strong. Now is the time to tweak the Parti-Volume shader to get our desired effect. Let’s now take a look at the various settings in the Parti-Volume shader that we can use to our advantage

We will just take a look at the most important parameters in the shader

Scatter color: Denotes the color of the light fog. Keep in mind that the fog color is independent of the Spotlight's color. Keep in mind that you need to match it with the Scatter Color, So if you change the color of the spotlight. In our case we will leave it at the default white color

 Another important use of the scatter color is that we can use it to control the intensity of the fog by adjusting the whiteness of the color. Since our current setup has a very intense fog effect, we can decrease it to something more manageable like235

Extinction:This parameter controls the intensity of the fog effect. It denotes the amount of scattering the light undergoes when travelling through the environment. Let’s reduce this to something like02And give it a quick test render

G2, r, g1: These three parameters are jointly used to denote the type of scattering that we need. It denotes whether we need an isotropic scattering or forward or backward scattering. Or evenly in all directions, behind them, This has to deal with whether the particles in the environment scatter the light to the front of them. Some preset combinations are shown below:

Rayleigh Scattering: r:0. 50, g1:-0. 46, g2: 0. 46
Hazy Mie Scattering: r:0. G1:-0, 12. 50, g2: 0. 70
Murky Mie Scattering: r:0. G1:-0, 19. 65, g2: 0. 91

The differences between the scattering types are subtle, but can clearly be seen by comparing the various scattering modes in the Ram player

Non Uniform:This parameter can be used to introduce cloudy effects into the light's fog. A value like1While, produces a non-uniform, cloudy shading0Produces a uniform fog effect

Use this parameter with caution since it can directly affect rendering times. You might also not want to overdo the effect (like in the image below), where the parameter is set to1Just for exaggeration

Non Uniform: 1

Height:This parameter is used for simulating ground fog effects and can be activated by setting theModeToFill Only Below HeightIt can be used to shade the light's fog only below a certain height

Minimum and Maximum Step Distance:This parameter controls the accuracy with which the scattering is shaded. While larger numbers can speed up rendering but can introduce some artifacts, Smaller numbers mean more accurate shading at the cost of rendering time. Play with the values until you get the right amount for your setup. A rule of thumb is to set theMinimum DistanceTo be10%Of theMaximum Distance

We can also specify which lights need to be volumetrically shaded using theLightsOption. We will leave it at the defaults, But since our scene has only one light

Up until now we have seen how we can shade light fog in Mental Ray. Now let’s see how we can use the same Parti-Volume shader to shade the photons and get volume caustics

Creating Volume caustics effects

To create volume caustics, we need a particular setup that shades the caustic photons into our scene

The following setup shows how it’s done

First let's turn on Caustics in the Mental Ray setup by going to theRender SetupDialog by pressingF10And navigating to theCausticsSection in theIndirect IlluminationTab. Turn on caustics by checking theEnable box to have caustics generated in our scene

For volume caustics, we need a spotlight that generates photons. These photons pass through the photon collector which specifies which photons need to be shaded for the volumetric effects. These to be shaded photons, now pass through the object that generates the caustics and finally get shaded volumetrically. Let’s see how we can model this setup in 3ds Max

Step 9

For the photon collector we are going to use a simplePlaneAnd aMental RaySo that we can customize the material according to our needs, material. In this case we are going to use it to justShadeThe photons. Let’s see how to do that below

I have assigned a, As you can seeTransmatMaterial to theSurfaceShadowAnd PhotonComponents of the shader. ATransmatShader is nothing more than a dummy shader that tells the main Mental Ray shader to do nothing for the specified component. So we are not going to render the surface, nor any photons from the photon collector Plane, shadow. It’s just going to be a plane that shades the caustics photons that are going to be generated. And as for thePhoton Volume We assign aParti-Volume PhotonShader which is just a Parti-Volume shader designed for photons

Also make sure that you turnOffThe shadows for the photon collectorPlaneSince we do not need it to cast any shadows onto the scene

Step 10

We are going to use aRaytraceMaterial for the glassSphereThat is going to cast the caustics. We are going to set it to be completely transparent and give it someReflectionTheSpecular HighlightProfile can also be changed to get a more controlled reflection on the Sphere

Step 11

Down in theMental Ray ConnectionsFor the shader, we are going to assign aDGSMaterial PhotonShader. This gives the Sphere a volume in which the photons can get refracted and generate the caustics effect.  

Also make sure to check theGenerate CausticsCheckbox for thePlaneAnd theSphereIn theObject PropertiesDialog. Now render the scene. Here I have reduced theScatter ColorOf the light fog to bring out the caustics effect

In the above image we can see that the color of the volume caustics is white (same as the Spotlight's color). But we can change the color of the volume caustics in a total of two ways

  • Change the light color of the Spotlight

  • Change theScatter ColorOf the photon volume shader on the photon collector

Changing the Scatter Color
Changing the Spotlight Color

Changing theScatter ColorChanges the entire caustic simulation's color and hence diffuses the green color more into the environment. Since the scene is still lit by the, But it does not affect the environment colorWhiteSpotlight

Changing the Spotlight's Color changes the entire color of the scene and also the caustics effect. But it has a much tighter diffusion of color. And is instead dependent on the, Keep in mind that the light fog is still white since it is independent of the Spotlight colorScatter ColorOf the Parti-Volume shader


Using the above setup we can easily introduce volumetric effects into our scenes to improve the realism and also give some scenes thatWowFactor using light fog. Hope you guys learned something new from this tutorial. And I hope to see you again in another exciting tutorial

Continue reading
Final product image
What You'll Be Creating

Adobe InDesign is a remarkable tool for many print and marketing design projects. It makes it extremely easy to work on publications, and export out for your printer, move design elements around. What happens if your project requires different sizes for each item, However.  

Letterhead is a great example of this. When you design letterhead you have many components from the letter to envelopes and business cards. But with InDesign, In earlier versions of InDesign you would have to create a separate file for each, you can use the handyPage Tool To resize each page within one document. This keeps everything in one easy to access document and dramatically improves your workflow. Let's take a look at the process

This is one of the many things you'll pick up in my courseAdvanced Print Options

1. The Page Tool

You'll find thePage ToolUnder the Direct SelectionArrow in theToolbarYou'll notice the , When you select itProperties BarAt the top changes to revealX and YCoordinate options as well asWidth and HeightOptions. You'll also notice options very similar to the Document WindowThat appears when you create a new document. This is where you'll apply all your page size specs. Let's see it in action

2. Set Up You First Document

Step 1

The first item I create in my letterhead workflow is the main letter. The size of this document is a classicA4 sizeOpen InDesign And select File > New DocumentTo create your first item.  Set Intent To PrintAnd Number of Pages To (we'll add more later).  Deselect Facing Pages.  UnderPage SizeSelectA4.  Set theBleed to. 125InOn all 4 sides.  

Bleed Tip:It's best to set it up this way from the beginning, Even if you don't think you'll design your letterhead with a full bleed. It's easier to design with a bleed and not use it then add it in later.  

Click OK

No you have your first letterhead document ready to go. Instead of saving and adding another InDesign document to the mix, we're going to add the pages for the envelope next right in the same document

Step 2

So we need to add one page, We're only going to design the front of the envelope.  DuplicateThe page you just created by clicking and dragging the page from the Pages PanelTo theNew Page icon just to the left of theTrash canIcon

Now that you have the new page, it's time to resize it with the Page Tool

Step 3

Make sure the second page is active in the PagesPanel and the Select The Page Tool.  You'll notice the page is selected with new anchors around the edges. This allows you to resize by clicking and dragging any one of the anchors. However, We want to be more precise, and will use the properties at the top instead. Change the Width to 9. 5 inAnd theHeightTo4. 125 inThis is the standardNo. 9 envelopeFor letters.  

You'll see the document transform to this new size. Did it affect the letter page we created earlier, However.  Scroll upAnd notice the original page remains the same A4 size we already set. Cool

Step 4

Now repeatStep 3For the business cards. This time you'llCreate two duplicate pagesOne for the front and one for the back of the business card. Select the , Instead of inputting the width and heightCustomDrop down and go to US Business Card.  This will format your page to the standard3. 5 x 2 in business card sizeIf you have a different business card size, you can input it exactly like you did for the envelope in Step 3.  


You end up with an InDesign document that has four different sized pages. One for the letter, one for the envelope and two for the business card. If you Zoom OutYou'll notice that the page sizes are different in the Workspace As well as the Pages PanelThis will help you see what page is what in your letterhead workflow.  

There are many other uses for this handy feature in InDesign. Head on over to my, To see more advanced techniques including how to design letterhead and save out a PDF with multiple page sizesAdvanced Print Options CourseYou'll also discover how to work with Text on a PathAndAdvanced FoldsAnd apply these techniques to two design projects

Continue reading


Thank you so much! We are very happy with our new website. It is easy to use and all of our customers tell us, they love it.

Contact Us

  • 13245 Atlantic Blvd. #4352
    Jacksonville, FL 32225
  • 904-240-5823