Difference between revisions of "User:Hapa/SandBox"

From OpenTutorial
Jump to navigation Jump to search
(New page: thumb|right With '''Photoshop''' one can easily make lightning and other dazzling effects such as sparkles and vortexes. This is tutorial number one in ...)
 
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:pp01LightningFinished.jpg|thumb|right]] With '''Photoshop''' one can easily make lightning and other dazzling effects such as sparkles and vortexes. This is tutorial number one in the "Bert Monroy" series, inspired by the Photoshop master, Bert Monroy's PixelPerfect video podcasts. Bert's video podcast for this tutorial can be found at [http://revision3.com/pixelperfect/lightning PixelPerfect Lightning]
+
Make water droplets using photoshop
  
== Objective ==
+
Using Photoshop you can make realistic looking water droplets by using a few layer styles and a displacement map. This tutorial will guide you through an easy to follow step by step process. This is the second tutorial in OpenTutorial's "Bert Monroy" series, inspired by the Photoshop master, Bert Monroy's PixelPerfect video podcasts. Bert's video podcast for this tutorial can be found at [http://revision3.com/pixelperfect/dropsofwater Drops of Water]
To use Photoshop to create lightning emanating from point source such as a magic wand, a hand or in this case the torch of the Statue of Liberty.
 
  
  
== Setup ==
 
* Choose your image, the image Bert uses in the video podcast is a drawing of a wizard using a magiz wand. For this tutorial I will be using an image of the Statue of Liberty. Dimensions 640x460px [[image:Statue_of_Liberty.jpeg|thumb|right|Statue of Liberty]]
 
* Press "D" on your keyboard to set your background color to white and your foreground colors to black
 
  
 +
== Before You Begin ==
 +
[[image:Pp02WaterDropletsFinished.jpg|thumb|right|Photoshop Water Droplets Finished]] Bert moves rather quickly through this tutorial and packs a ton of information in just a few minutes. This tutorial has been designed to document in an easy to follow manner all the Photoshop magic that Bert uses.
  
== Create the Lightning ==
+
 
* Create a new file in Photoshop larger than the one you are currently using in my case 1000x1000px
+
=== Get the Files ===
* Using the Rectangular Marquee tool make a series of 4 long narrow selections of varying widths from top to bottom fill each one with the foreground color by pressing (Alt-Backspace.)(Opt-Delete) See fig. ???
+
Get the video file and the background files from Bert's Revision3 video podcast site at [http://revision3.com/pixelperfect/dropsofwater Drops of Water]
* Next we apply a some Gaussian Blur which can be found under the '''menu/Filter/Blur/Gaussian blur...''' In the dialog bos set the Radius of the blur to 20 pixels.
+
 
* Next we apply the Polar Coordinates filter '''menu/Filter/Distort/Polar Coordinates''' Make sure that "Rectangular to Polar" mode is selected and click OK.
+
== Photoshop Magic ==
* Now, to create the Lightning we apply the Difference Clouds filter '''menu/Render/Difference Clouds'''
+
* Load the background image
* By inverting the result we get lightning, '''menu/Image/Adjustments/Invert''' or press (Ctrl-I)(Cmd-I)
+
* Create a new layer
* To clean up the lightning and make it more pronounced we adjust the levels of the layer by '''menu/Image/Adjustments/Levels...''' (Ctrl-L)(Cmd-L) then adjust the dark slider to about 125 or so and adjust the mid tones to about .35 and Click OK
+
* Using a hard edge brush paint what will become your water droplets.
* If you wish to make your lightning any other colar than white we can do this by adjusting the Hue/Saturation of the leyer by '''menu/Image/Adjustments/Hue/Saturation...''' Make sure the "Colorize" check box is checked and bring the "Saturation" to 100 and adjust thhe "Hue" slider to a color you like. Click OK
+
 
* Using the move tool drag the image of the lightning onto the image of the statue. Afterwards you can discard the lightning file.
+
== Applying Layer Style Magic ==
* In order to see the image below set the layer mode to "screen". This hides the dark tones and only shows the light tones of the layer
+
To create the effect of the water we use Photoshop's amazing Layer Styles.
* Use the Move tool to center the lightning on the edge of the statue's torch.
+
 
* Rotate the lightning so that it is not covering the statue's body by '''menu/Edit/Transform/Rotate''' You may need to scale it a little also so that it fits in the image properly.
+
* Bring up the layer styles for the layer by {{Pscs3-layerstyles-dialog}}
 +
* Click the Drop Shadow box, Because water has mass it retains light and casts a shadow
 +
* Adjust the size and
 +
 
 +
 
 +
=== Heading 1_2 ===
 +
Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines
 +
 
 +
 
 +
==== Heading 1_3 ====
 +
Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines
 +
 
 +
 
 +
== Heading 2 ==
 +
Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines
 +
 
 +
{{adsense2}}
 +
 
 +
Placing the above ad in a strategic place helps to keep OpenTutorial alive without them I would have a very difficult time paying my hosting costs. As it is right now my current hosting company isn't the greatest. If I can make more money per month by ads I can afford to get a better hosting company and have a better performing website for all.
 +
 
 +
 
 +
=== Heading 2_2 ===
 +
Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines
 +
 
 +
 
 +
== Heading 3 ==
 +
Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines
 +
 
 +
 
 +
The following sections, Also help OpenTutorial to stay alive (see above). They must be formatted as they are.
 +
 
 +
To use them just look up a ISBN or ASIN numbers of books and other products offered by www.amazon.com Just enter the numbers and my nifty little ISBN hack will fill in the rest of the information automatically.
 +
 
 +
 
 +
== Bibliography ==
 +
* (ISBN 0470043997
 +
* (ISBN 1591841380
 +
* (ISBN 020171499X
 +
 
 +
 
 +
== Amazon's Related Products ==
 +
* (ASIN B000MU82WG
 +
* (ASIN B0009FIS3M
 +
* (ASIN B000EGMAK8
 +
 
 +
 
 +
== See Also ==
 +
* [[Help:Posting rules]]
 +
* [[Help:Create a page on OpenTutorial]]
 +
 
 +
 
 +
== External Links ==
 +
* [http://www.kolomona.com www.Kolomona.com] Kolomona's Website
 +
* [http://www.motivetokill.com www.MotiveToKill.com] Tacoma's Premiere Metal Band
 +
* [http://www.revision3.com www.Revision3.com] Awesome video podcast site
 +
 
 +
 
 +
 
 +
This feature allows for toggling the visibility of any part of the page.
 +
 
 +
==Fun Examples==
 +
Probably the best way to learn how the toggle code works is to look at some examples (look at the [http://openwetware.org/index.php?title=OpenWetWare:Toggle&action=raw source] of this page).
 +
 
 +
===Simple hiding===
 +
 
 +
{{hide|hello world}}
 +
 
 +
{{hide|bye world}}
 +
 
 +
===Multiple===
 +
* {{toggle|item1||item1 item}}
 +
* {{toggle|item2||item2 item}}
 +
* <span class="_toggler-item1">toggle item1</span>
 +
* <span class="_toggler-item2">toggle item2</span>
 +
* <span class="_toggler-item">toggle both items</span>
 +
 
 +
===Show hide all===
 +
 
 +
{{show hide all}} (only shows/hides items that use the Template:Hide template)
 +
 
 +
===Mutual toggling===
 +
# <span class="_toggler-toggler2 toggler1">Toggle #2</span>
 +
# <span class="_toggler-toggler1 toggler2">Toggle #1</span>
 +
 
 +
===Toggling table rows/cols===
 +
{| border="1"
 +
|- class="row1"
 +
|class=column1|Row 1, Column 1
 +
|class=column2|Row 1, Column 2
 +
|- class="row2"
 +
|class=column1|Row 2, Column 1
 +
|class=column2|Row 2, Column 2
 +
|}
 +
 
 +
*<span class="_toggler-row1">Toggle row 1</span>
 +
*<span class="_toggler-row2">Toggle row 2</span>
 +
*<span class="_toggler-column1">Toggle column1</span>
 +
*<span class="_toggler-column2">Toggle column2</span>
 +
 
 +
===Remote action===
 +
<span class="_toggler--column-one _toggler--footer">toggle headers/footers/navigation</span>
 +
 
 +
===Nesting===
 +
[<span class="_togglegroup _toggle _toggler">open level 1</span><span class="_toggle _toggler" style="display:none;">close level 1</span>]
 +
<div class="_toggle" style="display:none;">
 +
Level 1
 +
[<span class="_togglegroup _toggle _toggler">open level 2</span><span class="_toggle _toggler" style="display:none;">close level 2</span>]
 +
<div class="_toggle" style="display:none;">
 +
Level 2
 +
</div>
 +
</div>
 +
 
 +
===Tabs===
 +
<div class="tabs-blue">
 +
<ul>
 +
<li><span class="_toggler_hide-tabs _toggler_show-tab1">tab1</span></li>
 +
<li><span class="_toggler_hide-tabs _toggler_show-tab2">tab2</span></li>
 +
<li><span class="_toggler_hide-tabs _toggler_show-tab3">tab3</span></li>
 +
</ul>
 +
</div>
 +
<div class="tabcontent">
 +
{{toggle|Tab 1||tab1 tabs}}
 +
{{toggle||Tab 2|tab2 tabs}}
 +
{{toggle||Tab 3|tab3 tabs}}
 +
</div>
 +
 
 +
==Usage==
 +
 
 +
Toggling is based on the CSS ''class.'' You can specify the class of any element with the class attribute. For wiki text, it is usually the most convenient to add a span or div and assign a class to that, e.g. <nowiki><div class="class1 class2 class3">'''wiki text here'''</div></nowiki>. Notice that multiple classes are separated by spaces. Some classes have special meaning and all of these special classes begin with "_toggle". For elements that should be initially hidden, set their CSS display property to none, e.g. <nowiki><div class="class1" style="display:none;"...</div></nowiki>
 +
 
 +
===Togglers===
 +
To define a basic toggler, add a class of the form ''_toggler-CLASS'' to an element. For example, <nowiki><span class="_toggler-foo">foo toggler</span></nowiki> produces <span class="_toggler-foo">foo toggler</span>. Note that a link is automatically created but nothing happens when the link is clicked. That's because there are no elements of class "foo" on this page. If there were any such elements, all of their visibility would be toggled (i.e. if they are currently hidden, they are shown, and vice versa).
 +
 
 +
Some different type of togglers can also be created. The more general form for toggler classes are ''_toggler_OPERATION-CLASS'', e.g. ''_toggler_show-foo''. The default operation is the TOGGLE operation above. Other valid operations are:
 +
* reset: all elements of the given class are reset to their original value (when the page was originally shown)
 +
* show: all elements of the given class are made visible
 +
* hide: all elements of the given class are hidden
 +
 
 +
Some things to note:
 +
* togglers can toggle other togglers or even themselves
 +
* togglers can have multiple toggle operations, e.g. "_toggler_hide-foo _toggler_show-bar" will hide all foo elements and show all bar elements
 +
* You can toggle based on element ID rather than a class. A similar syntax is used except use double hyphens after the toggler operation. For example, "_toggler--myelement" toggles only the element with ID myelement (e.g. defined as <nowiki><div id="myelement>...</div></nowiki>. Note that IDs are technically required to be unique on a page so in this form, you should expect to be toggling at most one element.
 +
 
 +
===Toggle groups===
 +
 
 +
To make it easier to use without having to explicitly define classes to toggle, there is a notion of a toggle group. A new toggle group is created when the class "_togglegroup" is seen in some element. This special class serves no other purpose than to delimit the boundary of a toggle group. Within a toggle group, togglers can be defined without a class to refer to all toggles within the toggle group, e.g. "_toggler" or "_toggler_reset". Toggles within a toggle group are defined using the class "_toggle".
 +
 
 +
===Handling non-Javascript===
 +
 
 +
If Javascript is not enabled, usually you will want all of the content (or the important parts) to be shown. There are two special classes "_toggle_initshow" and "_toggle_inithide" which set the initial value of a toggle. This has a similar effect of setting the CSS display property. However, there are a couple differences. If you set the CSS display property, then when Javascript is not enabled, the object will be permanently set with that value. For example, an object hidden with display=none can never be shown if Javascript is turned off. Alternatively, if you do not set the CSS property and instead set _toggle_inithide, then if Javascript is on, the object will be hidden (and presumably will be toggleable), but if Javascript is off, the object will shown. The main disadvantage to using Javascript to initially hide an object is that the objects may briefly appear on the browser's screen before being hidden (doesn't look too nice). However, for accessibility reasons, it is probably preferable to allow non-Javascript browsers to view all the content.
 +
 
 +
==Templates==
 +
Templates can make this much easier to use. Some existing templates are:
 +
* [[Template:Hide]]
 +
** This appears to handle 99% of the cases people use where by default nothing is shown and some text is hidden. A single show or hide button before the text allows for toggling the visibility.
 +
* [[Template:Show hide all]], [[Template:Show all]], [[Template:Hide all]]
 +
* [[Template:Toggle]]
 +
* [[Template:Toggler]]
 +
 
 +
==Technical Details==
 +
See [[MediaWiki:Common.js]] for the javascript code.

Latest revision as of 15:20, 9 August 2007

Make water droplets using photoshop

Using Photoshop you can make realistic looking water droplets by using a few layer styles and a displacement map. This tutorial will guide you through an easy to follow step by step process. This is the second tutorial in OpenTutorial's "Bert Monroy" series, inspired by the Photoshop master, Bert Monroy's PixelPerfect video podcasts. Bert's video podcast for this tutorial can be found at Drops of Water


Before You Begin

File:Pp02WaterDropletsFinished.jpg
Photoshop Water Droplets Finished

Bert moves rather quickly through this tutorial and packs a ton of information in just a few minutes. This tutorial has been designed to document in an easy to follow manner all the Photoshop magic that Bert uses.


Get the Files

Get the video file and the background files from Bert's Revision3 video podcast site at Drops of Water

Photoshop Magic

  • Load the background image
  • Create a new layer
  • Using a hard edge brush paint what will become your water droplets.

Applying Layer Style Magic

To create the effect of the water we use Photoshop's amazing Layer Styles.

  • Bring up the layer styles for the layer by Template:Pscs3-layerstyles-dialog
  • Click the Drop Shadow box, Because water has mass it retains light and casts a shadow
  • Adjust the size and


Heading 1_2

Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines


Heading 1_3

Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines


Heading 2

Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines


Placing the above ad in a strategic place helps to keep OpenTutorial alive without them I would have a very difficult time paying my hosting costs. As it is right now my current hosting company isn't the greatest. If I can make more money per month by ads I can afford to get a better hosting company and have a better performing website for all.


Heading 2_2

Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines


Heading 3

Organize your headings so that the maintain a logical and consistent look, separate each heading by two blank lines


The following sections, Also help OpenTutorial to stay alive (see above). They must be formatted as they are.

To use them just look up a ISBN or ASIN numbers of books and other products offered by www.amazon.com Just enter the numbers and my nifty little ISBN hack will fill in the rest of the information automatically.


Bibliography

  • (ISBN 0470043997
  • (ISBN 1591841380
  • (ISBN 020171499X


Amazon's Related Products

  • (ASIN B000MU82WG
  • (ASIN B0009FIS3M
  • (ASIN B000EGMAK8


See Also


External Links


This feature allows for toggling the visibility of any part of the page.

Fun Examples

Probably the best way to learn how the toggle code works is to look at some examples (look at the source of this page).

Simple hiding

Template:Hide

Template:Hide

Multiple

Show hide all

Template:Show hide all (only shows/hides items that use the Template:Hide template)

Mutual toggling

  1. Toggle #2
  2. Toggle #1

Toggling table rows/cols

Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2
  • Toggle row 1
  • Toggle row 2
  • Toggle column1
  • Toggle column2

Remote action

toggle headers/footers/navigation

Nesting

[open level 1]

Tabs

  • tab1
  • tab2
  • tab3

Usage

Toggling is based on the CSS class. You can specify the class of any element with the class attribute. For wiki text, it is usually the most convenient to add a span or div and assign a class to that, e.g. <div class="class1 class2 class3">'''wiki text here'''</div>. Notice that multiple classes are separated by spaces. Some classes have special meaning and all of these special classes begin with "_toggle". For elements that should be initially hidden, set their CSS display property to none, e.g. <div class="class1" style="display:none;"...</div>

Togglers

To define a basic toggler, add a class of the form _toggler-CLASS to an element. For example, <span class="_toggler-foo">foo toggler</span> produces foo toggler. Note that a link is automatically created but nothing happens when the link is clicked. That's because there are no elements of class "foo" on this page. If there were any such elements, all of their visibility would be toggled (i.e. if they are currently hidden, they are shown, and vice versa).

Some different type of togglers can also be created. The more general form for toggler classes are _toggler_OPERATION-CLASS, e.g. _toggler_show-foo. The default operation is the TOGGLE operation above. Other valid operations are:

  • reset: all elements of the given class are reset to their original value (when the page was originally shown)
  • show: all elements of the given class are made visible
  • hide: all elements of the given class are hidden

Some things to note:

  • togglers can toggle other togglers or even themselves
  • togglers can have multiple toggle operations, e.g. "_toggler_hide-foo _toggler_show-bar" will hide all foo elements and show all bar elements
  • You can toggle based on element ID rather than a class. A similar syntax is used except use double hyphens after the toggler operation. For example, "_toggler--myelement" toggles only the element with ID myelement (e.g. defined as <div id="myelement>...</div>. Note that IDs are technically required to be unique on a page so in this form, you should expect to be toggling at most one element.

Toggle groups

To make it easier to use without having to explicitly define classes to toggle, there is a notion of a toggle group. A new toggle group is created when the class "_togglegroup" is seen in some element. This special class serves no other purpose than to delimit the boundary of a toggle group. Within a toggle group, togglers can be defined without a class to refer to all toggles within the toggle group, e.g. "_toggler" or "_toggler_reset". Toggles within a toggle group are defined using the class "_toggle".

Handling non-Javascript

If Javascript is not enabled, usually you will want all of the content (or the important parts) to be shown. There are two special classes "_toggle_initshow" and "_toggle_inithide" which set the initial value of a toggle. This has a similar effect of setting the CSS display property. However, there are a couple differences. If you set the CSS display property, then when Javascript is not enabled, the object will be permanently set with that value. For example, an object hidden with display=none can never be shown if Javascript is turned off. Alternatively, if you do not set the CSS property and instead set _toggle_inithide, then if Javascript is on, the object will be hidden (and presumably will be toggleable), but if Javascript is off, the object will shown. The main disadvantage to using Javascript to initially hide an object is that the objects may briefly appear on the browser's screen before being hidden (doesn't look too nice). However, for accessibility reasons, it is probably preferable to allow non-Javascript browsers to view all the content.

Templates

Templates can make this much easier to use. Some existing templates are:

Technical Details

See MediaWiki:Common.js for the javascript code.