This is to be the first of many tutorials on different shaders, and how they can be applied to dae files. Most tutorials you will find online explain how to add shaders to basic papervision objects, but not to DAE (COLLADA) files.

To begin with, we will start to learn about the simpler shaders, such as wireframe and solid colour shaders and work up to more complicated shaders such as envMapMaterial (environment material) shaders and Movie clip shaders.

All tutorials will be explained with the COMPLETE source code to allow you to get it going on your own machine!

Creating the initial project .Fla and .as Global files

These files will help link in all shader files so that you can learn how to add different shaders to more that one dae file, or different shaders to the same dae file.

first off, we will create an empty .FLA file (this will allow us to read the .as file we will make
and will help us run it!)

File > New (ctrl+N)
select Flash File (Actionscript3) and click ok.
Now save that under whatever name you like.

Now we need to create an Actionscript file (.as)
File > new (Ctrl+N)
select Actionscript File and click ok.
Now save this using whatever name you like – I will call it MainShader.as

It is in this MainShader.as file where we will write our code. but first we need to link
it to the .FLA file we made earlier.
click on the tab to open your .FLA file and look near the bottom of your screen, in the
properties tab, for something called Document Class in the text box to the right of it, enter
your .as file name – in this case “Shader” (without the quotes) and click on the little pencil icon to scan for the file.

You will see a pop up message, just click OK to close it. 

In this Tutorial, we now have yourfile.FLA and a MainShader.as file.

The MainShader.as file will be the Main file that will link all the other .as files

To find the Relevant Shader Tutorials, please use the drop down menu from the tabbed links at the top of this page, titled Papervision Tutorials.

Be Sociable, Share!

6 Responses to “Material Shaders with dae files”

  • Naruto says:

    Hey i found this blog while researching. Keep up the good work, I wish the best for your site.

Leave a Reply

This site is using OpenAvatar based on

Subscribe
Follow me on Twitter
free counters
PayPal Donation
If you like this blog and the help it has given you, why not donate for this good cause? Click on the button below to pay Safely and Securely through PayPal.
Thanks.