+ All Categories
Home > Technology > WaveEngine 3D components

WaveEngine 3D components

Date post: 04-Jul-2015
Category:
Upload: waveengineteam
View: 7,063 times
Download: 0 times
Share this document with a friend
Description:
Review of the WaveEngine 3D components
29
WaveEngine Team @waveengineteam http://waveengine.net WaveEngine Components
Transcript
Page 1: WaveEngine 3D components

WaveEngine Team

@waveengineteam

http://waveengine.net

WaveEngine Components

Page 2: WaveEngine 3D components

Component Based Game Engine

Page 3: WaveEngine 3D components

Component types

Components

Drawables

Behaviors

Page 4: WaveEngine 3D components

Components 3D

Components Behavior Drawable

• Transform3D• Model• SkinnedModel• MaterialsMap• ParticleSystem3D• Joint3D

• Collider3D• Animation3D• Spinner• RigidBody3D

• ModelRenderer• SkinedModelRenderer• ParticleSystemRenderer3d

Page 5: WaveEngine 3D components

Entity

To draw a primitive cube

Transform3D

MaterialsMap

ModelRenderer

Model

Page 6: WaveEngine 3D components

To draw a primitive cube

Entity cube = new Entity(“mycube")

.AddComponent(new Transform3D())

.AddComponent(new MaterialsMap())

.AddComponent(Model.CreateCube())

.AddComponent(new ModelRenderer());

EntityManager.Add(cube);

Page 7: WaveEngine 3D components

Transfom3D

.AddComponent(new Transform3D()

{

Position = new Vector3(0, 10, 0), // Default: (0,0,0)

Rotation = new Vector3(0, (float)Math.PI, 0), //Default: (0,0,0)

Scale = new Vector3(3, 3, 3), // Default: (1,1,1)

})

Page 8: WaveEngine 3D components

MaterialsMap

• None

• BasicMaterial

• DualTextureMaterial

• EnviromentMapMaterial

• NormalMapping Material

• SkyboxMaterial

• ToonShadingMaterial

• RimLightMaterial

Page 9: WaveEngine 3D components

MaterialsMap - BasicMaterial

Entity cube = new Entity(“mycube")

.AddComponent(new Transform3D())

.AddComponent(new MaterialsMap(

new BasicMaterial("Context/mytexture.wpk"))

)

.AddComponent(Model.CreateCube())

.AddComponent(new ModelRenderer());

EntityManager.Add(cube);

Page 10: WaveEngine 3D components

MaterialsMap - BasicMaterial

Entity cube = new Entity(“mycube")

.AddComponent(new Transform3D())

.AddComponent(new MaterialsMap(

new NormalMappingMaterial(“difuse.wpk", "normal.wpk"))

)

.AddComponent(Model.CreateCube())

.AddComponent(new ModelRenderer());

EntityManager.Add(cube);

Page 11: WaveEngine 3D components

Model - Primitives

• Primitives• Cube

• Cone

• Cylinder

• Pyramid

• Sphere

• Torus

• Capsule

• Plane

• Teapot

Page 12: WaveEngine 3D components

Model – From file

• Load from File .DAE, .FBX, .Obj, .3DS y .X

Page 13: WaveEngine 3D components

Model – From file

Entity car = new Entity(“myCar")

.AddComponent(new Transform3D())

.AddComponent(new MaterialsMap()

.AddComponent(new Model(“Content/Car.wpk”))

.AddComponent(new ModelRenderer());

EntityManager.Add(cube);

Page 14: WaveEngine 3D components

Animated Model – From file

• Load from File .DAE, .FBX y .X

Page 15: WaveEngine 3D components

Animated Model – From file

Entity player = new Entity(“myplayer")

.AddComponent(new Transform3D())

.AddComponent(new MaterialsMap()

.AddComponent(new SkinnedModel("Content/model.wpk"))

.AddComponent(new Animation3D("Content/animation.wpk"))

.AddComponent(new SkinnedModelRenderer());

EntityManager.Add(cube);

Page 16: WaveEngine 3D components

Collision detection

Collider3D

• BoxCollider• SphereCollider• CapsuleCollider• MeshCollider

Page 17: WaveEngine 3D components

Collision detectionEntity cube = new Entity(“mycube")

.AddComponent(new Transform3D())

.AddComponent(new BoxCollider())

.AddComponent(new MaterialsMap())

.AddComponent(Model.CreateCube())

.AddComponent(new ModelRenderer());

EntityManager.Add(cube);

BoxCollider collider = cube.FindComponent<BoxCollider>();

collider.Intersects(...);

Page 18: WaveEngine 3D components

3D Particle System

Page 19: WaveEngine 3D components

3D Particle System

Entity smokeParticles = new Entity(“myParticles")

.AddComponent(new Transform3D())

.AddComponent(new ParticleSystem3D() { //Parameters })

.AddComponent(new MaterialsMap(

new BasicMaterial("Content/particleTexture.wpk“, DefaultLayers.Alpha)))

.AddComponent(new ParticleSystemRenderer3D());

EntityManager.Add(smokeParticles);

Page 20: WaveEngine 3D components

3D Particle System

.AddComponent(new ParticleSystem3D()

{ //Parameters

NumParticles = 100,

EmitRate = 1500,

MinLife = TimeSpan.FromSeconds(1f), MaxLife = TimeSpan.FromSeconds(3f),

LocalVelocity = new Vector3(0f, 0f,0f),

RandomVelocity = new Vector3(3f, 2.5f,0f),

MinSize = 15, MaxSize = 40,

MinRotateSpeed = 0.03f, MaxRotateSpeed = -0.03f,

EndDeltaScale = 0f,

EmitterSize = new Vector2(30),

Gravity = new Vector2(0, 0.03f),

EmitterShape = ParticleSystem2D.Shape.FillCircle,

Emit = false,

})

Page 21: WaveEngine 3D components

3D Physic components

• Wave engine integrates the Bepu physic engine.

• Offers a component based interface.

Page 22: WaveEngine 3D components

3D Physic components

Entity cube = new Entity("myCube")

.AddComponent(new Transform3D())

.AddComponent(new BoxCollider())

.AddComponent(new RigidBody3D() { //Parameters})

.AddComponent(new MaterialsMap())

.AddComponent(Model.CreateCube())

.AddComponent(new ModelRenderer());

EntityManager.Add(cube);

Page 23: WaveEngine 3D components

3D Physic components.AddComponent(new RigidBody3D()

{ //Parameters

EnableContinuousContact = true, // Default : false

Mass = 4f, // Default: 1f

IsKinematic = true, // Default: false

KineticFriction = 4f, // Default: 0.3f

StaticFriction = 4f, // Default: 0.6f

LinearVelocity = new Vector3(1, 0, 0), // Default (0,0,0)

AngularVelocity = Vector3.Zero, // Default (0,0,0)

Rotation = new Vector3(0, (float)Math.PI, 0), // Default (0,0,0)

Restitution = 4f, // Default: 0

})

Page 24: WaveEngine 3D components

3D Physic components

Joint3D

• BallSocketJoint• FixedJoint• HingeJoint• LineSliderJoint• MotorizedGrabSpring3D• PlaneSliderJoint• PrismaticJoint• SwivelHingeJoint• UniversalJoint

Page 25: WaveEngine 3D components

Cameras

Cameras

• FixedCamera• ViewCamera• FreeCamera• ThirdPersonCamera• PathCamera

Page 26: WaveEngine 3D components

Cameras

FreeCamera myCamera = new FreeCamera("mainCamera",

new Vector3(0, 5, 5),

Vector3.Zero);

EntityManager.Add(myCamera);

Page 27: WaveEngine 3D components

Lights

3D lights

• PointLight• DirectionalLight

Page 28: WaveEngine 3D components

Lights

DirectionalLight skylight = new DirectionalLight("SkyLight",

new Vector3(1));

EntityManager.Add(skylight);

Page 29: WaveEngine 3D components

Thank you

WaveEngine Team

@waveengineteam

http://waveengine.net


Recommended