日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Axiom3D学习日记 0.Axiom基础知识

發(fā)布時(shí)間:2023/12/20 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Axiom3D学习日记 0.Axiom基础知识 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Axiom 3D Engine

An open-source, cross-platform, managed 3D rendering engine for DirectX, XNA and OpenGL running on .Net and Mono

開源,跨平臺(tái),支持多種渲染方法的3D引擎,可以運(yùn)行于.Net和Mono平臺(tái),支持Dx3d,XNA,OpenGL

Orge3D的.Net版,我沒有看過他的源碼,但貌似就是用C#寫的Orge.

Texture:

Basic, Multi-texturing, Bumpmapping, Mipmapping, Volumetric, Projected:

  • Support for a variety of image formats, including .png, .jpg, .gif, .tga, with dynamic MipMap generation. .dds files are supported for 2D, Volume, and Cubic textures in both DirextX AND OpenGL via DevIL.
  • 1D, 2D, Cubic, and Volume textures.

Shader:

Vertex, Pixel, High Level:

  • Vertex/Fragment programs, including Cg and HLSL high level plugins, as well as support for loading ASM shaders
  • Vertex/Fragment programs are also fully configurable in the material files, and allow for parameters that instruct the engine to track various states and supply them automatically to the program parameters, such as worldviewproj_matrix, light_position_object_space, camera_position_object_space, etc.
  • Support profiles at present are: * DirectX 8 - vp_1_1, ps_1_1 - ps_1_4 * DirectX 9 - vp_2_0, ps_2_0 * OpenGL - arbvp1, arbfp1, fp20 (GeForce3/4 Register and Texture Combiners supported via nvparse), vp30/fp30 (GeForceFX).

Scene_Management

General, BSP, Octrees, LOD:

  • Extensible Hierarchical Scene Graph
  • Octree scene manager plugin which includes a basic heightmap loading scene manager

Animation:

Keyframe Animation, Skeletal Animation:

  • Skeletal animation with an Ogre .skeleton file loader. Features include multiple bone assignments per vertex, smooth frame rate scaled blending, and multiple animations can be blended together to allow for seamless animation transitions.
  • Pose animation allowing for facial animations and more.
  • Allows animations to be assigned to nodes in the scene graph, allowing objects to move along predefined spline paths.

Mesh:

Mesh Loading, Skinning, Progressive:

  • Fast Mesh loader support the Ogre .mesh file formats 1.10 and 1.20, now including pre generated LOD levels based on the entitie's distance from the camera.
  • Exporters for various 3D Modeling programs, including Milkshape and 3dx Max can be downloaded from the Ogre downloads page

Special Effect:

Environment Mapping, Billboarding, Particle System, Sky, Fog, Mirror:

  • Spherical environment mapping
  • Particle systems, extendable via plugins for defining new Emitters and Affectors and definable through Ogre particle scripts.
  • Support for skyboxes via cubic textures, and sky planes.
  • 2d billboard support, with built in pooling to reduce runtime overhead. Supports sprites, and is also used for the particle system.
  • Post-process compositor effects for HDR, Bloom, Motion Blur etc.

Rendering:

Fixed-function, Render-to-Texture, Fonts, GUI:

  • Extensible render system support, via plugins. Current implementations include Tao for OpenGL, and Managed DirectX 9, Xna is under development.
  • Virtual hardware vertex/index buffer interface, allowing for faster rendering of primitives by placing geometry data in video AGP memory, eliminating the need for keeping it in application memory and copying it over every frame.
  • Support for Ogre .material files, allowing the flexibility for controlling fixed function render state on a per object basis, in addition to specifying texture blending and texture effects such as scrolling and rotating.
  • Smart rendering pipeline, with sorting designed to reduce render state changes as much as possible. Transparent objects are also sorted to allow blending into the scene correctly.
  • Font bitmap support using the Ogre .fontdef format for loading bitmaps based and dynamically generated font bitmaps.

?

程序基本步驟:

  • Create the Root object.
  • Define the resources that the application will use.
  • Choose and set up the render system (that is, DirectX, OpenGL, etc).
  • Create the render window (the window which Axiom will render onto).
  • Initialize the resources that you are going to use.
  • Create a scene using those resources.
  • Set up any third party libraries and plugins.
  • Create frame listeners.
  • Start the render loop.
  • 定義資源

    ?資源包括 textures, models, scripts, 等等. . Thus far we have been using EngineConfig.xml to define Resource paths.
    通過 ResourceGroupManager class 來新增資源路徑:

    1.ResourceGroupManager.Instance.AddResourceLocation(location, type, group);

    第一個(gè)參數(shù)是 文件夾名字.

    第二參數(shù)是資源類型: "Folder" (文件夾) or "Zip" (壓縮包).

    第三參數(shù),資源組.

    1.ResourceGroupManager.Instance.AddResourceLocation("Media", "Folder", "General");

    選擇渲染系統(tǒng)

    1.root.RenderSystem = root.RenderSystems["DirectX9"];

    選項(xiàng)有 DirectX9, OpenGL, and Xna.

    1.Root.Instance.RenderSystem.ConfigOptions["Video Mode"].Value = "1280 x 720 @ 32-bit color";

    這里有些共有設(shè)定:

    Name
    Purpose
    Video Mode
    Sets resolution and color-depth.顏色深度
    Full Screen
    Sets whether to use the full screen.是否全屏
    VSync
    Syncs FPS to monitors refresh rate,垂直同步
    Anti-Aliasing
    Gives the appearence of smoother edges.抗鋸齒
    Floating-Point mode
    浮點(diǎn)模式,平滑或則快速

    ?

    創(chuàng)建一個(gè)渲染窗口.

    1.RenderWindow window = root.Initialize(true, "Window Title");

    第一個(gè)參數(shù):是否創(chuàng)建窗口.如果true,就會(huì)創(chuàng)建.

    1.RenderWindow window = root.CreateRenderWindow("Axiom Render Window", 800, 600, false); 不創(chuàng)建窗口,而用winform窗口,就用下面的代碼. Axiom.Collections.NamedParameterList paramList = new Axiom.Collections.NamedParameterList(); paramList["externalWindowHandle"] = pictureBox1.Handle; Axiom.Graphics.RenderWindow window = _Root.CreateRenderWindow("RenderWindow", pictureBox1.Width, pictureBox1.Height, false, paramList);

    轉(zhuǎn)載于:https://www.cnblogs.com/niconico/p/5007720.html

    總結(jié)

    以上是生活随笔為你收集整理的Axiom3D学习日记 0.Axiom基础知识的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。