Realistic break-apart effect in Photoshop

There are a lot of tutorials on the web about break-apart effect. But for sure your not that old because anyone who stop’s learning is old, whether at twenty or eighty.

.net Naming Conventions (Part 2)

.net Naming conventions covers a great topic when naming windows controls. It will give you a wide range of ideas and options to promote readability and integrity for your next project.

To Build a Bridge

This story is one of the best I have ever read. Imagine a man who can only move one of his fingers yet he was still able to pursue and achieve his dream. Inspiring isn't it?

14 June 2011

To Build a Bridge

The Brooklyn Bridge that spans the river tying Manhattan Island to Brooklyn is truly a miracle bridge. In 1863, a creative engineer named John Roebling was inspired by an idea for this spectacular bridge. However, bridge-building experts throughout the world told him to forget it; it could not be done.

Roebling convinced his son, Washington, who was a young upand coming engineer, that the bridge could be built. The two of them developed the concepts of how it could be accomplished and how the obstacles could be overcome. With un harnessed excitement and inspiration, they hired their crew and began to build their dream bridge.

The project was only a few months under construction when a tragic accident on the site took the life of John Roebling and severely injured his son, Washington. Washington was left with permanent brain damage and was unable to talk or walk. Everyone felt that the project would have to be scrapped since the Roeblings were the only ones who knew how the bridge could be built.

Even though Washington was unable to move or talk, his mind was as sharp as ever, and he still had a burning desire to complete the bridge. An idea hit him as he lay in his hospital bed, and he developed a code for communication. All he could move was one finger, so he touched the arm of his wife with that finger, tapping out the code to communicate to her what to tell the engineers who were building the bridge. For thirteen years, Washington tapped out his instructions with his finger until the spectacular Brooklyn Bridge was finally completed.

Coffee for a thought?

A group of alumni, highly established in their careers, got together to visit their old university professor. Conversation soon turned into complaints about stress in work and life.

Offering his guests coffee, the professor went to the kitchen and returned with a large pot of coffee and an assortment of cups - porcelain, plastic, glass, crystal, some plain looking, some expensive, some exquisite - telling them to help themselves to the coffee.

When all the students had a cup of coffee in hand, the professor said: "If you noticed, all the nice looking expensive cups have been taken up, leaving behind the plain and cheap ones. While it is normal for you to want only the best for yourselves, that is the source of your problems and stress.

Be assured that the cup itself adds no quality to the coffee. In most cases it is just more expensive and in some cases even hides what we drink. What all of you really wanted was coffee, not the cup, but you consciously went for the best cups... And then you began eyeing each other's cups.

Now consider this: Life is the coffee; the jobs, money and position in society are the cups. They are just tools to hold and contain Life, and the type of cup we have does not define, nor change the quality of life we live.

Sometimes, by concentrating only on the cup, we fail to enjoy the coffee. Savor the coffee, not the cups! The happiest people don't have the best of everything. They just make the best of everything. Live simply. Love generously. Care deeply. Speak kindly.

09 June 2011

Faith

An Atheist Professor of Philosophy was speaking to ...his Class on the Problem Science has with GOD, the ALMIGHTY. He asked one of his New Christian Students to stand and . . .

Professor : You are a Christian, aren't you, son ?

Student : Yes, sir.

Professor: So, you Believe in GOD ?

Student : Absolutely, sir.

Professor: Is GOD Good ?

Student : Sure.

Professor: Is GOD ALL - POWERFUL ?

Student : Yes.

Professor: My Brother died of Cancer even though he Prayed to GOD to Heal him.

Most of us would attempt to help others who are ill.

But GOD didn't. How is this GOD good then? Hmm?

(Student was silent )

Professor: You can't answer, can you ? Let's start again, Young Fella.
Is GOD Good?

Student : Yes.

Professor: Is Satan good ?

Student : No.

Professor: Where does Satan come from ?

Student : From . . . GOD . . .

Professor: That's right. Tell me son, is there evil in this World?

Student : Yes.

Professor: Evil is everywhere, isn't it ? And GOD did make everything. Correct?

Student : Yes.

Professor: So who created evil ?

(Student did not answer)

Professor: Is there Sickness? Immorality? Hatred? Ugliness?
All these terrible things exist in the World, don't they?

Student : Yes, sir.

Professor: So, who Created them ?

(Student had no answer)

Professor: Science says you have 5 Senses you use to Identify and Observe the World around you.
Tell me, son . . . Have you ever Seen GOD?

Student : No, sir.

Professor: Tell us if you have ever Heard your GOD?

Student : No , sir.

Professor: Have you ever Felt your GOD, Tasted your GOD, Smelt your GOD?
Have you ever had any Sensory Perception of GOD for that matter?

Student : No, sir. I'm afraid I haven't.

Professor: Yet you still Believe in HIM?

Student : Yes.

Professor : According to Empirical, Testable, Demonstrable Protocol,
Science says your GOD doesn't exist. What do you say to that, son?

Student : Nothing. I only have my Faith.

Professor: Yes,Faith. And that is the Problem Science has.

Student : Professor, is there such a thing as Heat?

Professor: Yes.

Student : And is there such a thing as Cold?

Professor: Yes.

Student : No, sir. There isn't.

(The Lecture Theatre became very quiet with this turn of events )

Student : Sir, you can have Lots of Heat, even More Heat, Superheat, Mega Heat, White Heat,
a Little Heat or No Heat.
But we don't have anything called Cold.
We can hit 458 Degrees below Zero which is No Heat, but we can't go any further after that.
There is no such thing as Cold.
Cold is only a Word we use to describe the Absence of Heat.
We cannot Measure Cold.
Heat is Energy.
Cold is Not the Opposite of Heat, sir, just the Absence of it.

(There was Pin-Drop Silence in the Lecture Theatre )

Student : What about Darkness, Professor? Is there such a thing as Darkness?

Professor: Yes. What is Night if there isn't Darkness?

Student : You're wrong again, sir.
Darkness is the Absence of Something
You can have Low Light, Normal Light, Bright Light, Flashing Light . . .
But if you have No Light constantly, you have nothing and its called Darkness, isn't it?
In reality, Darkness isn't.
If it is, were you would be able to make Darkness Darker, wouldn't you?

Professor: So what is the point you are making, Young Man ?

Student : Sir, my point is your Philosophical Premise is flawed.

Professor: Flawed ? Can you explain how?

Student : Sir, you are working on the Premise of Duality.
You argue there is Life and then there is Death, a Good GOD and a Bad GOD.
You are viewing the Concept of GOD as something finite, something we can measure.
Sir, Science can't even explain a Thought.
It uses Electricity and Magnetism, but has never seen, much less fully understood either one.
To view Death as the Opposite of Life is to be ignorant of the fact that
Death cannot exist as a Substantive Thing.
Death is Not the Opposite of Life: just the Absence of it.
Now tell me, Professor, do you teach your Students that they evolved from a Monkey?

Professor: If you are referring to the Natural Evolutionary Process, yes, of course, I do.

Student : Have you ever observed Evolution with your own eyes, sir?

(The Professor shook his head with a Smile, beginning to realize where the Argument was going )

Student : Since no one has ever observed the Process of Evolution at work and
Cannot even prove that this Process is an On-Going Endeavor,
Are you not teaching your Opinion, sir?
Are you not a Scientist but a Preacher?

(The Class was in Uproar )

Student : Is there anyone in the Class who has ever seen the Professor's Brain?

(The Class broke out into Laughter )

Student : Is there anyone here who has ever heard the Professor's Brain, Felt it, touched or Smelt it? . . .
No one appears to have done so.
So, according to the Established Rules of Empirical, Stable, Demonstrable Protocol,
Science says that You have No Brain, sir.
With all due respect, sir, how do we then Trust your Lectures, sir?

(The Room was Silent. The Professor stared at the Student, his face unfathomable)

Professor: I guess you'll have to take them on Faith, son.

Student : That is it sir . . . Exactly !
The Link between Man & GOD is FAITH.
That is all that Keeps Things Alive and Moving.

*************************************************

I believe you have enjoyed the conversation, and if so,
you'll probably want your friends/colleagues to enjoy the same. Won't you?
Forward them to increase their knowledge, or FAITH.
That student was Albert Einstein. =)

.net Naming Conventions (Part 2)

The part two of the article will be a little bit tricky. I may not be able to suggest a concrete idea for you on how to name some of the controls on the windows form. All I can do is to give you ideas about the pro’s and cons of the name you will give to the control. Well, let’s start with the easy ones.

Windows forms
I used the prefix “frm” followed by the name of the form with the first letter of the word capitalize. Very easy to read. Easy to search on intellisence grouping and you can easily identify your forms with their prefixes.

Examples:  frmHome      frmProducts       frmLogdetails


Well now enough for the easy part. Let’s get to the hard part. Well be talking about these controls first the Label, Textbox, Buttons, Combobox and Panels because these controls are what I used the most and has the most conflict.
When I was just starting out vb.net it was very easy for me to name this controls. See the example below:


Now the first con with these is when you have to change control type. At first you only expected to put names on Textbox right? But how about the issue regarding the returning students? To solve the issue you decided to change it to a combobox instead so that if the name already existed you just have to enable his account again. What if there are 20 statements in your code using the control txtName? It would really take time to change those names to cbxName right?
Here is a possible solution to the problem:


With this type of naming convention you can easily change control types without having difficulty to change their occurrences on your code. Let’s use the problem that we had above. At first we were using a textbox for our name. With this convention we use the NameField as the name for our textbox. If we decide to change it to a combobox we will just delete the textbox control then add a combobox control and give the combobox the same name because it has the same purpose on the form. It is a field for our Name.

Now, due to larger demands for friendlier and better GUI, we also have to come out with more uses with our controls. Make something different from what most control usually do. Just like the example below.
You can’t make those buttons by simply using the default button control so I used panels for those buttons because panels support transparent backgrounds and able to contain images. With the naming convention that we used above, we can simply name the panel CloseCommand and MinimizeCommand without having any problems identifying its purpose. We don't even have to emphasize on the name that it is panel because we don't use it as a panel in our form. It is a command button.

If you feel that it’s getting clearer now, well it’s not. Let’s take a look back with what we are missing here. Ok I remember, how about the picturebox? The checkbox? In short the other controls. What kind of suffix shall we give them? This is the point where it gets really tricky.

I’m a developer who promotes readability and integrity, even if your not that good at programming I want you to be able to understand what the program is all about. I would not say that the solution I made is the one you should follow, as I said before it really depends on your team what conventions to use to promote readability and integrity on your project.

Here are some examples of the names I used for the controls since I stick with the “frm” naming for my forms:

NameTextbox     SubmitButton     LogoPicturebox     ActiveCheckedBox     BackgroundPanel


I used the names above for the controls that are used just the way they are supposed to. Now for the controls that are used in other ways:

ClosePanel_Cmd      MinimizePanel_Cmd


I put an underscore plus the abbreviate description of what it will do as a suffix to its name and control type. Through this method you can easily identify that the panel has other purpose on the form.

You might be thinking now, how about the change in control scenario? Do we have to waste a lot of time to renaming the deleted control with the new one?

I found two ways to solve this.

● Using quick replace

  1. Change your control type from textbox to combobox then give it a name.
  2. Go to your code, then press ctrl + F and the Find and Replace diaglog box will appear.
  3. Click the quick replace tab, type the name of your deleted textbox in the “Find what” field then type the name of your combobox on the Replace with Field.
  4. Then click replace all. You’re done.

● Using rename

  1. Go to your code and right click on the name of your textbox control.
  2. Choose rename, and then type the name you want for your combobox control.
  3. Now delete the textbox control on your form. Replace it with a combobox and name your combobox   with the name you choose to rename the text box in the code.
  4. That’s it you’re done.

I made all this adjustments on the names based on my experiences, it's working great for me when I'm doing vb.net projects at school. 

I hope you learn a lot from this article. I'm not really sure if I could still make a part 3 of this since I'm already running out of idea on naming conventions. But if you have questions, clarifications and suggestions feel free to leave a comment below maybe then we could compile your comments to create a part 3 of this article as a close up on .net naming conventions. 

05 June 2011

Realistic break-apart effect in Photoshop

In this tutorial I will show you how to make a break-apart effect on an image. We will be using several techniques like layer blending, masking, using pen tool and also adjustments layers. We will also make retouches on the subject image to give it more details.

There are a lot of tutorials on the web about break-apart effect. But for sure your not that old because anyone who stop’s learning is old, whether at twenty or eighty. So it would not really cost you much to learn more and review some of the basic yet great techniques in Photoshop. I will be giving details on each step so that you can experiment on it and get your desired effect especially if you’re using another image for this tutorial.



Here is a preview of my original image:



















To start this tutorial you need to download and extract the files to your computer.
Download Me

Step 1
Open the extracted image into your Photoshop. Double click on its layer and press enter to make it a normal layer. Create a new layer below it and name it background then fill it with color white. The layer will serve as your background.

You will have something like this on your layers palette:






Step 2
Grab the pen tool. Make sure the path is active.






Make a working path around the image.

















Right click inside the working path and choose “make selection”.












Keep the feather radius to 0 and check anti-aliased.












It will look the same as below:



















Step 3
Press ctrl + C to copy the selected path.
Create a new layer and name it model.
Press ctrl + P to paste the selection. Then erase the parts between the arms of the subject.
Make two copy of the model layer.
Name the first duplicate “Model Linear Burn”
then “Model Screen" for the second layer.
Your layers palette would now look like this:













Step 4
Hide the original and model screen layer by clicking the eye icon located at the left side of each layer.
Activate/choose the “Model Linear Burn” layer.












Change its blending mode to linear burn.























The image will look a little more detailed but there are parts that are very dark.
Let’s add a layer mask to remove those parts.
Pick a soft brush and set black as your foreground color.
Simply paint on the parts inside the red line as shown below.



















Now unhide the Model Screen. Change its blending mode to screen.
You will notice that the image look so bright.
But we only need the bright side to where we want the break effect to happen.
Add a layer mask to this layer to remove the unwanted parts.
Use a soft brush then paint black inside the red line as shown below.

















Step 5
Add a new adjustment layer.
Layer > New adjustment layer > Black and White.
Then adjust the values based on the settings below.


















I want to preserve the color of the lips of the subject.
We just have to click on the layer mask of the adjustment layer.
Then pick a small soft brush with black foreground and paint on the lips to reveal its color.


















Add another adjustment layer.
This time choose curves then adjust the curves same as the settings below.

















Preview of the effect so far:


















Step 6
Now let’s move to the break-apart portion of the tutorial! Load the “Debrish Brushes” that you have extracted from the source file into Photoshop.

Create a new layer called “break apart” on top of all other layers:


















Grab one of the brush in the “Debris Brush” set, use a color match the background color (in this case it’s white), then use the lasso tool with 100px feather to draw a selection in the area you would like to break apart, simply paint over it. As you paint over the image you will notice that some parts of the body are slowly disappearing. Continue painting until you get your desired effect.













Now to create the break apart particles
create a copy of the break apart layer.
Then press Ctrl + I to invert the colors of the layer.















Now to lessen the density and to make it look like break particles.
Add a layer mask. Grab one of the debris brushed, set the foreground color to black. Paint until you get your desire effect or something that looks like this.










To make an effect that it’s blown up
away from the body.
Press ctrl + T to transform the image,
then right click and choose warp.
Then adjust to handles to make a motion.








If you want to create the same effect on another part of the body just repeat the procedure from step 6.

To add colors to your effect just create a new layer on top of other layers.
Set its blending mode to overlay or soft light. Pick a large soft brush then start painting.

You can also try and experiment with the other filters for your image or add additional adjustment layer to enhance the output. Add more text to make it more descriptive.

Here is the preview of my final output. I made several adjustments and added filters to enhance the colors. I also added another break-apart effect on the left side of my image and text for signatures..

Watch out for the next Photoshop article
on creating stylish cloud watercolor
background effect.













I hope you enjoy the whole tutorial! Feel free to leave a comment if you have questions.

01 June 2011

.net Naming Conventions (Part 1)

What is .net Programming Standard for Naming Convention?
There are a number of Naming Convention that programmers used this days and this has always been a controversial topic if which one of this Naming Convention is the standard one. There have been a lot of arguments regarding the use of Hungarian Notation of Naming Convention and the combination of Pascal Casing and Camel Casing as the Programming Standard for Naming Convention (Too bad I can't enumerate them all here!). To cut down all the ideas, it's really up to the preferences of the team who will be building the program which Naming Convention they will be using to promote readability and integrity of their codes

All the Programming Naming Conventions that you will see here are all my personal preferences. I will only include those types that I used the most so that I can provide enough reasons why I preferred this conventions. I'm just a class newbie so don't expect much of a techie explanation from me.


Classes
I put the prefix "cls" after a noun when naming my classes. This can help me identify the classes from the other items in my solution. It also helps a lot in intellisense grouping. You only have to type "cls" then after that you will have the list of all the classes that you made in your solution. Try to avoid abbreviations, and try to always use nouns. Always use a capital letter on the first letter of each words. If you want to create a class calculator then use "clsCalculator" and not "clsMyCalculator". When you want to add an adjective to the name of your class, I prefer putting the adjective between the prefix and then the noun. Use "clsScientificCalculator".

Public Class clsCalculator
Public Class clsSettings
Public Class clsAdminSettings

Subs and Functions
I prefer Pascal Casing for my subs and functions. No underscores except for the event handlers. Avoid abbreviation and stop being too lazy. Try to promote readability on your codes. Be descriptive on the names of your subs and functions and use verbs to describe what it will do.

Sub DoSomething()
Sub CalculateAverage()

Class-level Private and Protected variables
For this variables I just put an underscore before it's name in Camel Case. I find this very useful because of it's uniqueness and you can easily individualize those private variables from the other variables in your class.

Private _studentID As Integer
Private _productCode As String

Properties and Public Member Variables
Pascal Case, No underscores and abbreviations. This convention is consistent with the .NET Framework and is easy to read.

Public Property Gender As Boolean
Public Property Age As Date

Parameters
Parameter can either be an input type or an output type. For input type I put the prefix "pi" which stands for parameter input and use the prefix "po" which stands for parameter output. Most programmer use Camel Case for naming their parameters. But I put prefixes on my parameter's to know that it is a parameter type variable and also to avoid the possible misapply of the said variable.

Byval piLastname As String
Byref poAverage As Double

Procedure-level variables
Camel Case. It's easy to read and this variable does not really need that much particularity since it will only be used inside it's procedure.

Dim ageLimit As Integer
Dim contractSalary As Double

As you can see I don't really follow just one single Naming Convention. I used different conventions on different types depending on the situation so that my codes will be as readable and integrated as possible. On my next blog I will be sharing with you the naming conventions that I used for my controls and other items that you can add in your windows solution explorer.

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More