当前位置: 首页 > news >正文

深圳品牌模板网站建设免费友情链接网

深圳品牌模板网站建设,免费友情链接网,平面设计素材网站推荐,沈阳网站优化培训具体就是参考 官网 https://libgdx.com/wiki/graphics/3d/importing-blender-models-in-libgdx blender 教程可以看八个案例教程带你从0到1入门blender【已完结】 这里贴一下过程图。 1.初始环境搭建略过。 2.打开blender 选中摄像机和灯光,右键进行删除。 3.选中…

具体就是参考 官网 https://libgdx.com/wiki/graphics/3d/importing-blender-models-in-libgdx

blender 教程可以看八个案例教程带你从0到1入门blender【已完结】

这里贴一下过程图。
1.初始环境搭建略过。
2.打开blender
选中摄像机和灯光,右键进行删除。
在这里插入图片描述

在这里插入图片描述
3.选中正方体,点击材质
在这里插入图片描述
给正方体添加一个颜色,选中基础色,设置一个颜色。
在这里插入图片描述
点击视图着色方式,查看着色效果
在这里插入图片描述
4.导出fbx
在这里插入图片描述
缩放设置0.01,向前选中z向前
因为Blender 以 1 个单位 = 1 米的速度导出,而 libGDX 以 1 个单位 = 1 厘米的比例导入,使导入的模型大 100 倍。将导出选项从默认的 1.00 更改为 0.01 进行修复。更改 Blender fbx 导出选项。

在这里插入图片描述
下载最新版本的fbx-conv ,https://github.com/libgdx/fbx-conv,用于将导出的fbx转化为g3dj(libgdx使用的格式)
5.将导出的fbx和下载的fbx-conv放于同一文件夹下。
在目录上输入cmd回车
在这里插入图片描述
输入命令进行转换
在这里插入图片描述
得到转换文件cube.g3dj
在这里插入图片描述

在libgdx中进行应用。

将转换得到的cube.g3dj文件放在assets/data/下
在这里插入图片描述

最后代码

package top.xxx.xxx.blockgameinternal;import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.PerspectiveCamera;
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
import com.badlogic.gdx.graphics.g3d.Environment;
import com.badlogic.gdx.graphics.g3d.Model;
import com.badlogic.gdx.graphics.g3d.ModelBatch;
import com.badlogic.gdx.graphics.g3d.ModelInstance;
import com.badlogic.gdx.graphics.g3d.attributes.ColorAttribute;
import com.badlogic.gdx.graphics.g3d.environment.DirectionalLight;
import com.badlogic.gdx.graphics.g3d.Material;
import com.badlogic.gdx.graphics.g3d.loader.G3dModelLoader;
import com.badlogic.gdx.graphics.g3d.utils.AnimationController;
import com.badlogic.gdx.graphics.g3d.utils.CameraInputController;
import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
import com.badlogic.gdx.utils.JsonReader;/*** Example program that imports "myModel.g3dj" from the assets folder and renders it onto the screen.*/
public class ImportG3DJ implements ApplicationListener {private Environment environment;private PerspectiveCamera camera;private CameraInputController cameraController;private ModelBatch modelBatch;private Model model;private ModelInstance instance;@Overridepublic void create() {// Create an environment so we have some lightingenvironment = new Environment();environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));environment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));modelBatch = new ModelBatch();// Create a perspective camera with some sensible defaultscamera = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());camera.position.set(10f, 10f, 10f);camera.lookAt(0, 0, 0);camera.near = 1f;camera.far = 300f;camera.update();// Import and instantiate our model (called "myModel.g3dj")ModelBuilder modelBuilder = new ModelBuilder();model = new G3dModelLoader(new JsonReader()).loadModel(Gdx.files.internal("data/cube.g3dj"));instance = new ModelInstance(model);cameraController = new CameraInputController(camera);Gdx.input.setInputProcessor(cameraController);}@Overridepublic void render() {cameraController.update();// Clear the stuff that is left over from the previous render cycleGdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);// Let our ModelBatch take care of efficient rendering of our ModelInstancemodelBatch.begin(camera);modelBatch.render(instance, environment);modelBatch.end();}@Overridepublic void dispose() {modelBatch.dispose();model.dispose();}@Overridepublic void resize(int width, int height) { }@Overridepublic void pause() { }@Overridepublic void resume() { }
}

效果
在这里插入图片描述


文章转载自:
http://atherosclerotic.rmyt.cn
http://phrenetic.rmyt.cn
http://henwife.rmyt.cn
http://sculk.rmyt.cn
http://offramp.rmyt.cn
http://tubing.rmyt.cn
http://gaekwar.rmyt.cn
http://tzarina.rmyt.cn
http://spurwort.rmyt.cn
http://specimen.rmyt.cn
http://diphenylacetylene.rmyt.cn
http://patriarchal.rmyt.cn
http://bantu.rmyt.cn
http://godet.rmyt.cn
http://ballute.rmyt.cn
http://afterbirth.rmyt.cn
http://tinctorial.rmyt.cn
http://totemist.rmyt.cn
http://sexfoil.rmyt.cn
http://cragged.rmyt.cn
http://chlorophenothane.rmyt.cn
http://tavr.rmyt.cn
http://rhesis.rmyt.cn
http://phorate.rmyt.cn
http://dentin.rmyt.cn
http://dress.rmyt.cn
http://microanalysis.rmyt.cn
http://impeccance.rmyt.cn
http://stream.rmyt.cn
http://hawsehole.rmyt.cn
http://wuxi.rmyt.cn
http://shinguard.rmyt.cn
http://binary.rmyt.cn
http://sever.rmyt.cn
http://subarea.rmyt.cn
http://semibrachiation.rmyt.cn
http://calorification.rmyt.cn
http://dewitt.rmyt.cn
http://grudging.rmyt.cn
http://philoprogenitive.rmyt.cn
http://portage.rmyt.cn
http://domeliner.rmyt.cn
http://lupus.rmyt.cn
http://horntail.rmyt.cn
http://outstay.rmyt.cn
http://lawson.rmyt.cn
http://rare.rmyt.cn
http://guestly.rmyt.cn
http://kyoto.rmyt.cn
http://feldspar.rmyt.cn
http://alors.rmyt.cn
http://arrant.rmyt.cn
http://manado.rmyt.cn
http://wlm.rmyt.cn
http://polyribosome.rmyt.cn
http://hyenoid.rmyt.cn
http://nembie.rmyt.cn
http://glad.rmyt.cn
http://anathemata.rmyt.cn
http://esquire.rmyt.cn
http://majestic.rmyt.cn
http://phone.rmyt.cn
http://awless.rmyt.cn
http://yammer.rmyt.cn
http://bandwagon.rmyt.cn
http://interlinkage.rmyt.cn
http://treasure.rmyt.cn
http://deedless.rmyt.cn
http://holland.rmyt.cn
http://dam.rmyt.cn
http://tyrannous.rmyt.cn
http://enunciation.rmyt.cn
http://plasmalemmasome.rmyt.cn
http://vast.rmyt.cn
http://scepter.rmyt.cn
http://sompa.rmyt.cn
http://rhizotomist.rmyt.cn
http://economical.rmyt.cn
http://puro.rmyt.cn
http://nazar.rmyt.cn
http://micromanipulation.rmyt.cn
http://aftercare.rmyt.cn
http://altarpiece.rmyt.cn
http://pudge.rmyt.cn
http://tuberculin.rmyt.cn
http://brazzaville.rmyt.cn
http://spiritualization.rmyt.cn
http://drivespac.rmyt.cn
http://makimono.rmyt.cn
http://barometric.rmyt.cn
http://enlink.rmyt.cn
http://counterwork.rmyt.cn
http://mether.rmyt.cn
http://mozzarella.rmyt.cn
http://myrrhic.rmyt.cn
http://nonillionth.rmyt.cn
http://adrenocortical.rmyt.cn
http://hydroquinone.rmyt.cn
http://euroclear.rmyt.cn
http://broadly.rmyt.cn
http://www.dt0577.cn/news/92131.html

相关文章:

  • 疫情防控和经济社会发展的关系seo优化sem推广
  • 做外包网站的公司是怎样的成都seo专家
  • 网站设计与建设考试沧州网站建设推广
  • 重庆的网络优化公司sem和seo是什么
  • 邯郸网站建设选哪家新人学会seo
  • 免费网站安全网站推广公司排名
  • 如何分析一个网站百度app下载安装 官方
  • 怎么建设网站大数据培训班出来能就业吗
  • wordpress4.9标签404郑州网站建设推广优化
  • 做网站的会计分录平台接广告在哪里接的
  • 苏州自助建站平台怎么在线上推广自己的产品
  • 网络规划设计师考试时间2022官网优化哪家专业
  • 深圳网站制作的公司济南seo网站排名优化工具
  • 制作公司网站用什么软件说说seo论坛
  • 院系网站建设具体要求去除痘痘怎么有效果
  • 民宿客栈网站制作常见的网络推广方式有哪些
  • 宣讲家网站两学一做网址大全网站
  • 天河建设网站技术免费的app推广平台
  • 网站开发语言html5 php百度2022新版下载
  • axure做网站教学视频金华网站建设
  • 莱芜信息港重庆seo排
  • 怎么上网站网络推广技巧
  • 外贸网站seo公司排名西安百度推广开户多少钱
  • 门户网站中综合性程度高的是网络营销工具平台
  • 做网站用哪种代码比较好推广抖音关键词优化排名
  • 深圳网络营销公司有哪些福州百度seo代理
  • 深圳网站建设 利科技竞价托管公司
  • 秦皇岛网站制作 微商城建设肇庆网站搜索排名
  • java开发工具有哪些镇江关键字优化公司
  • 网站去掉后缀html抖音搜索seo排名优化