Keep up-to-date with Free tutorials!!

 

Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

 

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more

 

Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

 
submit tutorial
1 | 2 | 3 | 4
Power Up Your Polygons

By William “Proton” Vaughan
| Your Rating:
rating star fullrating star fullrating star fullrating star fullrating star full
(6 Votes)
| 42672 Views
| 5 Comments
| Comments 5
Date Added: 9th January 2012
Software used:
LightWave

Now that we have the Powergon command attached to the polygon we selected, Save the object and load it into Layout. With the object selected, choose the Convert Powergon command located under the Items Tab in the Add sub-menu. (Items > Add > Cvt Powergons) This command will execute any command scripts that are attached to the selected object.

The default script that we added creates a spotlight named LGON, positions it at the center of the polygon, rotates it to match the polygon's normal, parents the light to the object and creates a keyframe at frame 0 (Fig.04).

Note: Once a Powergon script is executed in Layout, you can clear the object if it is unneeded otherwise. However, the default command parents the lights to the object, so be careful since you don't want to delete the children.

1464_tid_Powergons_003.jpg
Fig.04 - CVT Powergons executes the command we attached to the polygon

Understanding the Default Powergon Command Script

Now that we've seen the result of the Powergon, let's take a closer look at the script and break it into its individual components.

AddSpotlight LGON\rPosition \c\rRotation \n\rParentItem \i\rCreateKey 0

AddSpotlight LGON simply adds a Spotlight to the scene and gives it the name "LGON".
\r is a special "escape" character that creates a line return to signify the end of the current command and the start of the next.
Position \c\r uses the \c special "escape" character to return the position of the polygon's center in the form "x y z". This is used to position the light at the center of the polygon we applied the Powergon to. The \r at the end is used as another line return so we can continue adding commands to this script.
Rotation \n\r uses the \n special "escape" character to return the polygon's normal converted into heading, pitch and bank angles (bank is always 0) in the form "h p b". This rotates the Spotlight to match the polygon normal. Again we use the \r character as a line return.
ParentItem \i\r uses the \i special character. This returns the item ID of the object containing the polygon so we can assign the Spotlight as a child to our object.
CreateKey 0 simply creates a keyframe at frame 0. Note that the \r special "escape" character is not needed at the very end of the last command.

So now we know what the default script does, but where do these commands come from and how many different special "escape" characters are there? Let's start with the special characters since there are only six to work with and we already covered four of them. Here are the six special "escape" characters that can be used when generating a Powergon Command:

\a returns the area of the polygon.
\c returns the position of the polygon's center in the form "x y z".
\d returns the polygon's normal vector as "nx ny nz".
\i returns the item ID of the object containing the polygon.
\n returns the polygon's normal converted into heading, pitch and bank angles (bank is always 0) in the form "h p b".
\r creates a line return to signify the end of the current command and the start of the next. Note that it is not needed at the very end of the last command.

Once you work with Powergons for awhile you'll be able to call these six characters up from memory with ease, but what about the Layout commands? Where do they come from?

Layout Commands

Nearly all of your actions in Layout are executed by sending discrete commands. When you click on the VIPER button (Render > Utilities > VIPER) it sends a command to Layout to open and display VIPER. We can watch what commands are being sent to Layout by using the Command History window found under the Utilities Tab (Utilities > Commands > Cmd History).

Clear the current scene and launch the Command History window (Utilities > Commands > Cmd History)(Fig.05).

1464_tid_Powergons_004.jpg
Fig.05 - Command History Window in Layout

Leave the Command History window open, add a Spotlight to the scene and name it "LGON" (Items > Add > Lights > Spotlight.




< previous page next page >
 
1 | 2 | 3 | 4
Related Tutorials

Tutorial

Gallery Image.



Keywords: Maya, Tutorial, Head, Model, Modeling, Mouth, Nose, Ear, Neck, Eyes, Face

Go to tutorial
rating star fullrating star fullrating star fullrating star fullrating star full (17)
Comments 0 Views 28667

Tutorial

Gallery Image.



Keywords: Lightwave, Rendering, Product, Battery, Lighting, Advertising, Graphics

Go to galleries 1
rating star fullrating star fullrating star fullrating star fullrating star full
Comments 8 Views 20211

Tutorial

Gallery Image.



Keywords: character, lightwave, animation, rigging,

Go to galleries 1
rating star nonerating star nonerating star nonerating star nonerating star none
Comments 0 Views 16238

Tutorial

Gallery Image.



Keywords: world, warcraft, orc, modeling, lightwave,

Go to galleries 1
rating star nonerating star nonerating star nonerating star nonerating star none
Comments 0 Views 21927
Readers Comments (Newest on Top)
avatar
(ID: 77916, pid: 0) Mosley on Wed, 11 January 2012 5:47pm
Good tutorial! 3DT could use more LightWave. Can Luxigons be used with all existing light types, including dome, IES, and spherical lights?
avatar
(ID: 77659, pid: 0) Glen D on Wed, 11 January 2012 1:26am
Great tutorial as always from William V! Thanks for another Lightwave tutorial, hopefully we can seem more in the future!
avatar
(ID: 77643, pid: 0) EraserFX on Wed, 11 January 2012 12:28am
Excellent tutorial. Very useful! Thank you
avatar
(ID: 77636, pid: 0) Cesar Falcao on Tue, 10 January 2012 10:03pm
Very useful tool
avatar
(ID: 77146, pid: 0) Ryan Roye on Mon, 09 January 2012 8:42pm
Very cool tutorial and I'll definitely be hotkeying this function. This gives me so many ideas for things I can do now that I couldn't before.
Add Your Comment