User Tools

Site Tools


public:t-vien-12-1:lab_7_materials

Link to this comparison view

public:t-vien-12-1:lab_7_materials [2012/02/22 11:31]
hannes
public:t-vien-12-1:lab_7_materials [2012/02/22 11:32] (current)
hannes
Line 44: Line 44:
         self.p.start(self.parent)         self.p.start(self.parent)
         self.p.setPos(1.6,-0.7,0.0)                 self.p.setPos(1.6,-0.7,0.0)        
-        self.p.setHpr(0,-45,0) </code python> This already comes with a small particle system called "ar.ptf", make sure you see those particles in your scene. Then see if you can create a new particle system using the Panda 3D Particle Panel (it's under Samples/Particles) and insert that system instead. Can you make something that looks and behaves like flies?+        self.p.setHpr(0,-45,0) </code> This already comes with a small particle system called "ar.ptf", make sure you see those particles in your scene. Then see if you can create a new particle system using the Panda 3D Particle Panel (it's under Samples/Particles) and insert that system instead. Can you make something that looks and behaves like flies?
   - ** Creating a bloom effect **\\ The following code may not work on all graphics cards, since they have to support programmable shaders. You should get warning messages on the console about this as well as not seeing the actual effect. Try adding the following code to the **create_bloom** function:<code python>   - ** Creating a bloom effect **\\ The following code may not work on all graphics cards, since they have to support programmable shaders. You should get warning messages on the console about this as well as not seeing the actual effect. Try adding the following code to the **create_bloom** function:<code python>
         render.setShaderAuto()         render.setShaderAuto()
         self.filters = CommonFilters(base.win, base.cam)            self.filters = CommonFilters(base.win, base.cam)   
-        self.filters.setBloom(size="large")</code>You can play with the "size" value, which can also be "small" and "medium". Experiment with other filters as well, such as blur. You can look up all the common filters on the [[http://www.panda3d.org/manual/index.php/Common_Image_Filters|Common Image Filters]] page in the manual. +        self.filters.setBloom(size="large")</code> You can play with the "size" value, which can also be "small" and "medium". Experiment with other filters as well, such as blur. You can look up all the common filters on the [[http://www.panda3d.org/manual/index.php/Common_Image_Filters|Common Image Filters]] page in the manual. 
/var/www/ailab/WWW/wiki/data/pages/public/t-vien-12-1/lab_7_materials.txt ยท Last modified: 2012/02/22 11:32 by hannes