Camera Cameras:
Camera fundamentals are not written, it should be noted that: axiom currently does not support the simultaneous operation of multiple cameras.
Create, set the location basic operation.
_camera = _scene. Createcamera ("maincamera"new Vector3 (0200 ); _camera. LookAt (Vector3.zero);
_camera.Near = 5;
Determines the camera's visible range.
ViewPort (viewport)
When I want to display more than one window, I don't need it, I don't write it.
Shadows in Axiom (The point is coming)
There are 3 different shades of axiom.
- Texture shading: One of the lowest computational costs.
- modulative stencil Shadows: Less dense than the third kind
- Additive stencil Shadows: The shading of each light is superimposed, which is a big burden on the GPU.
Unfortunately: Axiom does not support soft shadows, and if you need soft shadows, you need to write your own vertex and fragment programs.
Using Shadows is easy:
Scene. Ambientlight == = scene. Createentity ("ninja""ninja.mesh"true , scene. Rootscenenode.createchildscenenode (). Attachobject (ENT);
Light:
Type of light:
- Point (lighttype.point)-point light source, in all directions.
- Spotlight (lighttype.spotlight)-Spotlight
- directional (lighttype.directional)-Parallel light
To create a light:
Light pointlight = scene. Createlight ( pointlight " );p ointlight.type = Lighttype.point; Pointlight.position = new Vector3 (0 , 150 , 250 );p ointlight.diffusecolor = colorex.red; Pointlight.specularcolor = colorex.red;
Light spotLight = scene. Createlight ("spotLight"); Spotlight.type = lighttype.spotlight; Spotlight.diffusecolor ==new Vector3 (-1,-10 ); spotlight.position new Vector3 (0);
Axiom3d study Diary 3.Cameras, Lights, and Shadows