2017-05
http://blog.qt.io/blog/2017/05/24/qt3d/
Qt3D future
5.9
Use Qt Quick or QPainter to render into a texture
Embed Qt Quick into Qt3D, including input handling
Level of Detail support for meshes
Text support - 2D and 3D
Additional materials such as PBR materials
others
Generating and filling buffers out of QAbstractItemModels
Billboards - camera facing entities
Particle systems
VR support
new aspects:
碰撞检测
动画:关键帧动画;骨骼动画;Morph target animation; Removes animation workload from main thread
物理:刚体/柔体物理模拟
AI:
三维位置音效:如喇叭,越近越响
工具
设计时工具:场景设计器
Qt 3D Studio
编译时工具:资产状态监控
More
贴图控制
可yizhi算法(OpenGL)
各种3d模型的加载 2d ui嵌入到 3d里面用Scene2D
Scene2D {
id: qmlTexture
output: RenderTargetOutput {
attachmentPoint: RenderTargetOutput.Color0
texture: Texture2D { id: offscreenTexture }
}
entities: [ cube ]
Item {
id: customQtQuickStuff
}
} 纹理加载器
TextureLoader {
source: "qrc:/assets/textures/pbr-default/pbr-default-metallic.png"
minificationFilter: Texture.LinearMipMapLinear
magnificationFilter: Texture.Linear
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
}
generateMipMaps: true
} 新增材质
粗糙金属材质
MetalRoughMaterial
粗糙金属纹理材质
TexturedMetalRoughMaterial {
baseColor: TextureLoader {
format: Texture.SRGB8_Alpha8
source: "qrc:/assets/powerup/basecolor.png"
}
metalness: TextureLoader { source: "qrc:/assets/powerup/metalness.png" }
roughness: TextureLoader { source: "qrc:/assets/powerup/roughness.png" }
normal: TextureLoader { source: "qrc:/assets/powerup/normal.png" }
ambientOcclusion: TextureLoader { source: "qrc:/assets/powerup/ambientocclusion.png" }
} 新增环境光
EnvironmentLight {
id: envLight
irradiance: TextureLoader {
source: "qrc:/assets/envmaps/wobbly-bridge/wobbly_bridge_4k" + _envmapFormat + "_cube_irradiance.dds" minificationFilter: Texture.LinearMipMapLinear
magnificationFilter: Texture.Linear
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
}
generateMipMaps: false
}
specular: TextureLoader {
source: "qrc:/assets/envmaps/wobbly-bridge/wobbly_bridge_4k" + _envmapFormat + "_cube_specular.dds" minificationFilter: Texture.LinearMipMapLinear
magnificationFilter: Texture.Linear
wrapMode {
x: WrapMode.ClampToEdge
y: WrapMode.ClampToEdge
}
generateMipMaps: false
}
} 天空盒实体
SkyboxEntity {
baseName: "qrc:/assets/envmaps/wobbly-bridge/wobbly_bridge_4k" + _envmapFormat + "_cube_radiance"
extension: ".dds"
gammaCorrect: true
} 相机增加曝光度属性
Camera {
id: mainCamera
position: Qt.vector3d(-10, 0, 0)
viewCenter: Qt.vector3d(0, 0, 0)
exposure: 1.4 // 曝光度
} 加载预设的动画
import Qt3D.Animation 2.9
ClipAnimator {
id: animator
loops: 3
clip: AnimationClipLoader { source: "qrc:/jumpinganimation.json" }
channelMapper: ChannelMapper {
mappings: [
ChannelMapping { channelName: "Location"; target: cubeTransform; property: "translation" },
ChannelMapping { channelName: "Rotation"; target: cubeTransform; property: "rotation" },
ChannelMapping { channelName: "Scale"; target: cubeTransform; property: "scale3D" }
]
}
}
对象选择器
ObjectPicker { onClicked: animator.running = true;} 根据远近来动态调整场景(volumeOverride)
LevelOfDetail
Entity {
components: [
CylinderMesh {
radius: 1
length: 3
rings: 2
slices: sliceValues[lod.currentIndex]
property var sliceValues: [20, 10, 6, 4]
},
Transform {
rotation: fromAxisAndAngle(Qt.vector3d(1, 0, 0), 45)
},
PhongMaterial {
diffuse: "lightgreen"
},
LevelOfDetail {
id: lod
camera: camera
thresholds: [1000, 600, 300, 180]
thresholdType: LevelOfDetail.ProjectedScreenPixelSizeThreshold
volumeOverride: lod.createBoundingSphere(Qt.vector3d(0, 0, 0), 2.0)
}
]
}
LevelOfDetailSwitch
Entity {
components: [
LevelOfDetailSwitch {
camera: camera
thresholds: [20, 35, 50]
thresholdType: LevelOfDetail.DistanceToCameraThreshold
}
]
HighDetailEntity { enabled: false }
MediumDetailEntity { enabled: false }
LowDetailEntity { enabled: false }
}
LevelOfDetailLoader
LevelOfDetailLoader {
id: lodLoader
camera: camera
thresholds: [20, 35, 50]
thresholdType: LevelOfDetail.DistanceToCameraThreshold
volumeOverride: lodLoader.createBoundingSphere(Qt.vector3d(0, 0, 0), -1)
sources: ["qrc:/HighDetailEntity.qml", "qrc:/MediumDetailEntity.qml", "qrc:/LowDetailEntity.qml"]
} 渲染文本
Text2DEntity
Text2DEntity {
id: text
text: "Hello World"
width: 20
height: 10
}
ExtrudedTextMesh
auto *text = new Qt3DCore::QEntity(root);
auto *textTransform = new Qt3DCore::QTransform();
auto *textMesh = new Qt3DExtras::QExtrudedTextMesh();
textMesh->setDepth(.45f);
QFont font(family, 32, -1, false);
textMesh->setFont(font);
textMesh->setText(QString(family));
auto *textMaterial = new Qt3DExtras::QPhongMaterial(root);
textMaterial->setDiffuse(QColor(111, 150, 255));
text->addComponent(textTransform);
text->addComponent(textMesh);
text->addComponent(textMaterial);

Qt3D 5.9 and future的更多相关文章

  1. 面向未来的友好设计:Future Friendly

    一年前翻译了本文的一部分,最近终于翻译完成.虽然此设计思想的提出已经好几年了,但是还是觉得应该在国内推广一下,让大家知道“内容策略”,“移动优先”,“响应式设计”,“原子设计”等设计思想和技术的根源. ...

  2. 线程笔记:Future模式

    线程技术可以让我们的程序同时做多件事情,线程的工作模式有很多,常见的一种模式就是处理网站的并发,今天我来说说线程另一种很常见的模式,这个模式和前端里的ajax类似:浏览器一个主线程执行javascri ...

  3. 第二篇 Entity Framework Plus 之 Query Future

    从性能的角度出发,能够减少 增,删,改,查,跟数据库打交道次数,肯定是对性能会有所提升的(这里单纯是数据库部分). 今天主要怎样减少Entity Framework查询跟数据库打交道的次数,来提高查询 ...

  4. Eclipse调试Android App若选择“Use same device for future launches”就再也无法选择其他设备的问题

    在狂批了某供应商的多媒体控制App有多烂后,夸下海口自己要做一个也是分分钟的事.当然要做好不容易,要超过他们的烂软件还是有信心的.过程中遇到各种坑,其中之一如下 刚开始只使用一个平板进行调试,老是弹出 ...

  5. java Future 接口介绍

    (转自:http://blog.csdn.net/yangyan19870319/article/details/6093481) 在Java中,如果需要设定代码执行的最长时间,即超时,可以用Java ...

  6. java多线程系类:JUC线程池:06之Callable和Future(转)

    概要 本章介绍线程池中的Callable和Future.Callable 和 Future 简介示例和源码分析(基于JDK1.7.0_40) 转载请注明出处:http://www.cnblogs.co ...

  7. 架构师养成记--9.future模式讲解

    什么是future模式呢?解释这个概念之前我们先来了解一个场景吧,财务系统的结账功能,这个功能可能是每个月用一次,在这一个月中相关的数据量已经积累得非常大,这一个功能需要调用好几个存储过程来完成.假如 ...

  8. Future和Promise

    Future用于获取异步操作的结果,而Promise则比较抽象,无法直接猜测出其功能. Future Future最早来源于JDK的java.util.concurrent.Future,它用于代表异 ...

  9. Java--Callable与返回值future

    package com; import java.util.concurrent.*; /** * Created by yangyu on 16/11/28. */ /** * Callable a ...

随机推荐

  1. [BZOJ1045][HAOI2008]糖果传递 (环形均分纸牌)

    题意 有n个小朋友坐成一圈,每人有ai个糖果.每人只能给左右两人传递糖果.每人每次传递一个糖果代价为1. 思路 把|s[i]-s[k]|求和即可,s[i]是A的前缀和 s[k]为s数组的中位数时,总值 ...

  2. requirejs的使用和快速理解

    样例来自https://www.jianshu.com/p/b8a6824c8e07 requirejs有以下功能 声明不同js文件之间的依赖 可以按需.并行.延时载入js库 可以让我们的代码以模块化 ...

  3. python selenium ——— 动态id、class定位

    什么样的是动态id呢? 动态id就是第一次点击显示的id与二次点击显示的不一样,一般是元素属性中包含一段数字的这种情况. 类似这种: 1 <input type="button&quo ...

  4. jdbc的入门学习

    一.JDBC相关概念介绍 1.1.数据库驱动 这里的驱动的概念和平时听到的那种驱动的概念是一样的,比如平时购买的声卡,网卡直接插到计算机上面是不能用的,必须要安装相应的驱动程序之后才能够使用声卡和网卡 ...

  5. 秒杀linux下系统调用fork()面试题(转)

    https://blog.csdn.net/chdhust/article/details/10579001 https://www.cnblogs.com/clover-toeic/p/375443 ...

  6. [No000019A]【波浪理论精典教学课程】

    波浪理论的产生和发展     拉尔夫·纳尔逊·艾略特(Ralph Nelson Elliott ),是波浪理论的创始人.1871年7月28日出生在美国密苏里州堪萨斯市的玛丽斯维利镇Marysville ...

  7. 使用vue实现tab栏的点击切换样式

    <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8&quo ...

  8. MarkDown语言

    参考: 参考:https://typora.io/ 参考:https://caret.io/ Markdown是一种轻量级标记语言,创始人为約翰·格魯伯(英语:John Gruber). 它允许人们“ ...

  9. react将字符串转义成html语句

    在使用reactjs库的时候,会遇到将一段html的字符串,然后要将它插入页面中以html的形式展现,然而直接插入的话页面显示的就是这段字符串,而不会进行转义,可以用以下方法插入,便可以html的形式 ...

  10. MongoDB - 2

    Aggregation Framework: $project: a document stream by renaming, adding, or removing fields #alter Da ...