Kezdeti teendők Letöltés: OgreBillboardParticles.zip Kicsomagol Futtat: OgreBillboardParticles.sln Include és library útvonalak beállítása Working directory.

Slides:



Advertisements
Similar presentations
Artrelle Fragher & Robert walker. 1 you look for the median 1 you look for the median 2 then you look for the min and max 2 then you look for the min.
Advertisements

#include void main() { float x = 1.66, y = 1.75; printf(%f%f,ceil(x), floor(y)); }
Fundamentals of Engineering
Challenge 2 L. LaRosa for T. Trimpe 2008
Basic Java Constructs and Data Types – Nuts and Bolts
Applets and Graphics.
Ozone Level ppb (parts per billion)
Multiplication X 1 1 x 1 = 1 2 x 1 = 2 3 x 1 = 3 4 x 1 = 4 5 x 1 = 5 6 x 1 = 6 7 x 1 = 7 8 x 1 = 8 9 x 1 = 9 10 x 1 = x 1 = x 1 = 12 X 2 1.
Division ÷ 1 1 ÷ 1 = 1 2 ÷ 1 = 2 3 ÷ 1 = 3 4 ÷ 1 = 4 5 ÷ 1 = 5 6 ÷ 1 = 6 7 ÷ 1 = 7 8 ÷ 1 = 8 9 ÷ 1 = 9 10 ÷ 1 = ÷ 1 = ÷ 1 = 12 ÷ 2 2 ÷ 2 =
WHAT DO THEY ALL MEAN?. Median Is the number that is in the middle of a set of numbers. (If two numbers make up the middle of a set of numbers then the.
/4/2010 Box and Whisker Plots Objective: Learn how to read and draw box and whisker plots Starter: Order these numbers.
JavaScript Chapter 6 Note new scoring. spin.js (page 67) function spin() function spin() { var obj_style = document.getElementById("d1").style; var obj_style.
1 1  1 =.
1  1 =.
£1 Million £500,000 £250,000 £125,000 £64,000 £32,000 £16,000 £8,000 £4,000 £2,000 £1,000 £500 £300 £200 £100 Welcome.
TOPICS OF “ENGINEERING GRAPHICS” (Mechanical Portion)
ORDER OF OPERATIONS LESSON 2 DAY 2. BEDMAS B – Brackets E – Exponents D – Division from left to right M – Multiply from left to right A – Add from left.
Variables Conditionals Boolean Expressions Conditional Statements How a program produces different results based on varying circumstances if, else if,
Using 2D sprite with OpenGL 2003 team Koguyue. Overview Motivation and basic concepts Advantages with using OpenGL Basic requirements of implementation.
Number your paper from 1 to 10.
Look at This PowerPoint for help on you times tables
Dyeing of acrylic /wool blends One bath method This method is suitable for producing light to medium-depth shades with basic dyes and acid, milling, or.
Chem 302 Lab Assignment Tuesday 2:30 – 4:00 Colin Chris M Johnathan P Craig Jonathan E Alex Tuesday 4:00 – 5:30 Curtis Matt Chris L Janet Cory Kristen.
Money Matters First Grade Math 1. What coin is worth $0.01? 1.Penny 2.Nickel 3.Dime.
Physical representation of a game character. Basics 05_02_Bullet_CharacterControl_Base.zip Extract.
Overlays végső állapot letöltése (GhostGame) OpenAL letöltése Include könyvtárak,lib könyvtárak  OpenAL/include, OpenAL\include\AL  OpenAL/lib lib referenciák.
PCF,VSM,LISPSM…. Kezdeti teendők Letöltés: OgreLabShadowMappingBase.zip Kicsomagol.sln futtat Include, lib és working dir beállítása Fordítás Futtatás.
GUI Ogre3D Overlay.
Csontváz animáció Third person camera PhysX character controller.
Displacement mapping.
Ogre3D Alapok Model betöltés AnyagjellemzőkFényforrásokShaderek.
PhysX. Kezdeti teendők Letöltés: OgrePhysicsBase.zip Kicsomagol Futtat: OgrePhysics.sln Include és library útvonalak beállítása Working directory beállítása.
GPGPU labor XIII. Folyadék szimuláció. Kezdeti teendők Tantárgy honlapja, Folyadék szimuláció A labor kiindulási alapjának letöltése (lab13_base.zip),
PROJECTIONS OF STRAIGHT LINES.
Object-Oriented Programming. 2 An object, similar to a real-world object, is an entity with certain properties, and with the ability to react in certain.
8 2.
Marks out of 100 Mrs Smith’s Class Median Lower Quartile Upper Quartile Minimum Maximum.
dd vv Fast constant negative Slow constant negative At rest Getting slower In POS direction Slow positive velocity Same velocity.
Shade the rectangles with correct answer with a colour pencil of your choice.
23-8 3x6 Double it Take Away 6 Share By 9 Double it +10 Halve it Beginner Start Answer Intermediate 70 50% of this ÷7÷7 x8 Double it Start Answer.
Number bonds to 10,
Beat the Computer Drill Divide 10s Becky Afghani, LBUSD Math Curriculum Office, 2004 Vertical Format.
Vector Algebra One Mark Questions PREPARED BY:
Fractions Simplify: 36/48 = 36/48 = ¾ 125/225 = 125/225 = 25/45 = 5/9
12-2 Conditional Probability Obj: To be able to find conditional probabilities and use formulas and tree diagrams.
CSE Lecture 17 – Balanced trees
Bottoms Up Factoring. Start with the X-box 3-9 Product Sum
Cs /11/2003 Page 1 Special Image Effects Particle Systems Fog Lens Flares Shadows Programmable Shaders.
Setting the PYTHONPATH PYTHONPATH is where Python looks for modules it is told to import List of paths Add new path to the end with: setenv PYTHONPATH.
1 More on Applets Overview l Changing Colors l Changing Fonts & Styles l Applet Life-Cycle l Input using Dialog Window l Input using HTML parameters l.
Optimization plays a role in a wide range of disciplines, including the physical sciences, economics, and biology. For example, scientists have studied.
Let’s Add! Click the cloud below for a secret question! Get Started!
1 Game Physics. Traditional game physics Traditional game physics –Particle system –Rigid body dynamics –Flexible body dynamics Some state-of-art topics.
The Point Class public class Point { public double x; public double y; public Point(double x0, double y0) { x = x0; y = y0; } public double distance(Point.
Game Programming 09 OGRE3D Lighting/shadow in Action
With CSS, a color is most often specified by: a HEX value - like "#ff0000" an RGB value - like "rgb(255,0,0)" a color name - like "red“ Example h1.
Antigone Engine Kevin Kassing – Period
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Chapter 6 Special Effects 강 신 진강 신 진
CS 4363/6353 TEXTURE MAPPING PART II. WHAT WE KNOW We can open image files for reading We can load them into texture buffers We can link that texture.
9.3. P ARTICLE S YSTEMS Development of a particle system.
1 VR assignment#2 WTK SDK Introduction By Jin-Bey Yu 2001/11/12.
Game Programming 08 OGRE3D Material in Action 2010 년 2 학기 디지털콘텐츠전공.
11 Lecture 3 Particle Effects References: [1] Gregory Junker, Pro OGRE 3D Programming, Apress, 2006 [2] Ogre Tutorials – Ogre Wiki
Game Programming 07 OGRE3D Mesh in Action 2010 년 2 학기 디지털콘텐츠전공.
1 OGRE Programming Intermediate Tutorial. 2Contents 2 1.Select any object on the screen using the mouse 2.Restrict what is selectable.
Ogre Overview Lecture 3.
Ogre Overview.
Folyadékszimuláció.
Social Media And Global Computing Creating DLLs with Visual Studio
Development of a particle system
Presentation transcript:

Kezdeti teendők Letöltés: OgreBillboardParticles.zip Kicsomagol Futtat: OgreBillboardParticles.sln Include és library útvonalak beállítása Working directory beállítása Fordít Futtat

Próba

Új file: Tree.h #include "Ogre.h" using namespace Ogre; class BillboardTree { public: BillboardTree(Vector3 position, SceneManager* sm) { static int id = 0; SceneNode* billboardNode = sm->getRootSceneNode()->createChildSceneNode(); BillboardSet *treeBillboardSet = sm->createBillboardSet( "treeBillboard" + StringConverter::toString(id), 1); billboardNode->attachObject(treeBillboardSet); treeBillboardSet->setDefaultDimensions(47,66); treeBillboardSet->setBillboardType(BBT_ORIENTED_COMMON); treeBillboardSet->setBillboardOrigin(BBO_BOTTOM_CENTER); treeBillboardSet->setCommonDirection(Vector3::UNIT_Y); Billboard* bb = treeBillboardSet->createBillboard(position); treeBillboardSet->setMaterialName("TreeBillboard"); id++; } };

Új material file: Tree.material material TreeBillboard { technique { pass { lighting off texture_unit { texture tree.png filtering anisotropic }

OgreBillboardParticles.cpp Void setupScene() { … sceneManager->setSkyBox(true, "Sky", 10, true); new BillboardTree(Vector3::ZERO, sceneManager); }

Próba

material TreeBillboard { technique { pass { lighting off scene_blend alpha_blend texture_unit { texture tree.png filtering anisotropic }

Próba

Sok fa new BillboardTree(Vector3::ZERO, sceneManager); Helyett: for(int i = 0; i < 30; i ++) { Vector3 pos = Vector3(Math::RangeRandom(-60,60), 0, Math::RangeRandom(-60,60)); new BillboardTree(pos, sceneManager); }

Próba

material TreeBillboard { technique { pass { depth_write off lighting off scene_blend alpha_blend texture_unit { texture tree.png filtering anisotropic }

Próba

Átlátszó objektumok rendezése Oldjuk meg hogy ne legyen hiba a rendezésben: A fa színtérgráf-csomópontját toljuk el és ne a plakátot a billboardset-ben Alakítsuk át a kódot úgy, hogy csak egy billboardset legyen és ebbe fűzzük az összes plakátot. Figyelni kell: Rendezés Culling Pool (billboardset maximális mérete)

Megoldás class BillboardTree { static BillboardSet* treeBillboardSet; public: BillboardTree(Vector3 position, SceneManager* sm) { if(treeBillboardSet == 0) { treeBillboardSet = sm->createBillboardSet("treeBillboards", 20); treeBillboardSet->setMaterialName("TreeBillboard"); SceneNode* billboardSetNode = sm->getRootSceneNode()->createChildSceneNode(); billboardSetNode->attachObject(treeBillboardSet); treeBillboardSet->setDefaultDimensions(47,66); treeBillboardSet->setBillboardType(BBT_ORIENTED_COMMON); treeBillboardSet->setBillboardOrigin(BBO_BOTTOM_CENTER); treeBillboardSet->setCommonDirection(Vector3::UNIT_Y); treeBillboardSet->setCullIndividually(true); treeBillboardSet->setSortingEnabled(true); treeBillboardSet->setAutoextend(true); } Billboard* bb = treeBillboardSet->createBillboard(position); } }; BillboardSet* BillboardTree::treeBillboardSet = 0;

Próba

Bonyolultabb fa class BillBoardCloudTree { public: BillBoardCloudTree(Vector3 position, SceneManager* sm) { static int id = 0; SceneNode* treeNode = sm->getRootSceneNode()->createChildSceneNode(); treeNode->setPosition(position); treeNode->rotate(Vector3::UNIT_Y, Radian(Math::RangeRandom(0,Math::PI * 2))); Entity* trunk = sm->createEntity("treetrunk"+StringConverter::toString(id), "treetrunk.mesh"); treeNode->attachObject(trunk); id++; } }; for(int i = 0; i < 30; i ++) { Vector3 pos = Vector3(Math::RangeRandom(-60,60), 0, Math::RangeRandom(-60,60)); new BillBoardCloudTree(pos, sceneManager); }

Tree.material: új anyagjellemző material TreeTrunk { technique { pass { lighting off texture_unit { texture oakbark.jpg filtering anisotropic }

Próba

BillBoardCloudTree(Vector3 position, SceneManager* sm) { static int id = 0; SceneNode* treeNode = sm->getRootSceneNode()->createChildSceneNode(); treeNode->setPosition(position); treeNode->rotate(Vector3::UNIT_Y, Radian(Math::RangeRandom(0,Math::PI * 2))); Entity* trunk = sm->createEntity("treetrunk"+StringConverter::toString(id), "treetrunk.mesh"); treeNode->attachObject(trunk); BillboardSet* billboardCloud = sm->createBillboardSet("treebbcloud"+StringConverter::toString(id)); treeNode->attachObject(billboardCloud); billboardCloud->setBillboardType(BBT_PERPENDICULAR_SELF); billboardCloud->setMaterialName("TreeLeaves"); billboardCloud->setSortingEnabled(true); for(int i = 0; i < 10; i++) { float h = Math::RangeRandom(25,60); Vector3 pos(0,h,0); Vector3 dir(Math::RangeRandom(-0.6f,0.6f),1,Math::RangeRandom(-0.6f,0.6f)); dir.normalise(); Billboard* bb = billboardCloud->createBillboard(pos); bb->setDimensions(90.0f - h, 90.0f - h); bb->mDirection = dir; } id++; }

Tree.material: új anyagjellemző material TreeLeaves { technique { pass { depth_write off lighting off scene_blend alpha_blend cull_hardware none texture_unit { texture leaves.tga filtering none }

Próba

Részecske Rendszerek

int _tmain(int argc, _TCHAR* argv[]) { ogreRoot = new Root("",""); #ifdef _DEBUG ogreRoot->loadPlugin("RenderSystem_Direct3D9_d"); ogreRoot->loadPlugin("Plugin_OctreeSceneManager_d"); ogreRoot->loadPlugin("Plugin_ParticleFX_d"); #else ogreRoot->loadPlugin("RenderSystem_Direct3D9"); ogreRoot->loadPlugin("Plugin_OctreeSceneManager"); ogreRoot->loadPlugin("Plugin_ParticleFX"); #endif Plugin_ParticleFX.dll és Plugin_ParticleFX_d.dll másolása bin-be OgreSDK/bin-ből

Új file: Particles.h #include "Ogre.h" using namespace Ogre; class PSysFromScript { public: PSysFromScript(Vector3 position, SceneManager* sm, String scriptname) { static int id = 0; SceneNode* sysNode = sm->getRootSceneNode()->createChildSceneNode(); ParticleSystem* psys = sm->createParticleSystem("psys"+StringConverter::toString(id), scriptname); sysNode->attachObject(psys); sysNode->setPosition(position); id++; } };

Új file a media-ba: example.particle particle_system Example1 { material Flare particle_width 10 particle_height 10 quota billboard_type point emitter Point { angle 15 emission_rate 75 time_to_live 2 direction velocity_min 50 velocity_max 100 colour_range_start colour_range_end }

Új material file: Particles.material material Flare { technique { pass { scene_blend add lighting off depth_write off texture_unit { texture flare.png }

OgreBillboardParticles.cpp … #include ” Particles.h” … void setupScene() { … new SysFromScript(Vector3(0,0,25),sceneManager,"Example1"); }

Próba

Feladat Játszunk a scriptel…: Emitter-ek Affector-ok Segít az Ogre manual!!!

Pl.: particle_system Example1 { material Flare particle_width 5 particle_height 5 quota 1000 billboard_type point emitter Box { width 120 depth 5 height 120 position angle 0 emission_rate 75 time_to_live 2 direction velocity_min 5 velocity_max 10 colour_range_start colour_range_end } affector ColourFader2 { state_change 1 alpha1 1 alpha2 -1 } material Flare { technique { pass { scene_blend src_alpha one lighting off depth_write off texture_unit { texture flare.png }