mesh

分析碰撞检测库Opcode

ぐ巨炮叔叔 提交于 2020-01-01 22:06:19
一.概述 Opcode 是一个开源的碰撞检测库,其最大的特点是占用内存少(与其他的碰撞检测库相比而言),对一个完全二叉树中的每个三角形仅用 20 字节,所以它的文档中说是“ Memory-optimized bounding-volume hierarchies ”。 在碰撞检测中,利用检测树( Bounding-volume hierachies )结构进行碰撞排除是最普遍的方法(如 RAPID , SOLID , QuickCD,PQP 都是如此), Opcode 也不例外, Opcode 中默认的包围盒是 AABB 。就是说若用 Opcode 进行一个 Mesh 的碰撞检测,则它会为此 Mesh 建立 AABB 树。 Opcode 可以对以下情况作出检测: - Mesh-mesh - Sphere-mesh - Ray-mesh - AABB-mesh - OBB-mesh - Planes-mesh 二.检测过程 调用 Opcode 的代码做检测时主要包含三部分: 1. 为 Mesh 生成碰撞树 这涉及到 Opcode 中的 Model 类和 OPCODECREATE 类, Opcode 建立碰撞树分两步:首先建立一般的树(这个树最后被遗弃),然后利用一般的树建立一个优化的树。 Opcode 可以建立的四种树(关于这几种树在后面的内存优化部分会讲到): - Normal

Mapping a stereographic projection to the inside of a sphere in ThreeJS

三世轮回 提交于 2020-01-01 18:54:22
问题 When it comes to 3D animation, there are a lot of terms and concepts that I'm not familiar with (maybe a secondary question to append to this one: what are some good books to get familiar with the concepts?). I don't know what a "UV" is (in the context of 3D rendering) and I'm not familiar with what tools exist for mapping pixels on an image to points on a mesh. I have the following image being produced by a 360-degree camera (it's actually the output of an HTML video element): I want the

将 Sidecar 容器带入新的阶段

六眼飞鱼酱① 提交于 2019-12-30 16:33:04
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 作者 | 徐迪、张晓宇 导读 :本文根据徐迪和张晓宇在 KubeCon NA 2019 大会分享整理。分享将会从以下几个方面进行切入:首先会简单介绍一下什么是 Sidecar 容器;其次,会分享几个阿里巴巴经济体的通用场景,以及他们是如何解决这些挑战的。 Sidecar 简介 Sidecar 容器并不是一个新鲜事物。它是一种设计模式,主要用来做一些辅助的工作,比如网络连通性、下载拷贝文件之类的事情;如果大家熟悉 Docker Swarm 的话,就会发现 Docker Ambassador 其实就是 Sidecar。 如上所示,Service Consumer 和 Redis Provider 强耦合,部署在同一个节点上。如果这个时候,Redis Provider 出现问题,需要连接到另外一个 Redis 实例上,需要重新配置,并重启 Service Provider。 那么在引入了 Ambassador 以后,问题变得相对简单些,只需要重启这里的 Redis Ambassador 即可,并不需要 Service Consumer 进行任何变动。 当然这种模式,还可以进行跨节点通信,比如下图。这样 Service Consumer 和 Redis Provider 就可以部署在不同的节点上。在某种程度上

Algorithm to calculate the shortest path between two points on the surface of a 3D mesh

旧城冷巷雨未停 提交于 2019-12-30 09:38:10
问题 I am looking for an algorithm to calculate the following: I have: A 3D triangle mesh. The triangles do not necessarily lie in one plane. The angle between the norm vectors of two neighbouring triangles is less then 90 degrees. Two points. The two points lie either on an edge of the triangle mesh or inside a triangle of the mesh. I need to calculate the polyline which represents the shortest path between the two points on the mesh. What is the simplest and/or most effective strategy to do this

Adding geometry to a three.js mesh after render

≡放荡痞女 提交于 2019-12-29 01:35:14
问题 I'm creating a mesh with a THREE.Geometry instance, then populating the geometry's vertices and faces arrays dynamically. The geometry is iteratively refined, adding additional vertices and faces at each iteration. If I refine the geometry before adding the mesh to the scene, it renders correctly. However, if I add the mesh to the scene and render it, then modify it, only the initial N faces the geometry contained on first render are shown. Changes to the position of the vertices used by

Service Mesh服务网格清单

自作多情 提交于 2019-12-28 19:40:07
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Service Mesh服务网格清单 Istio Istio官网 Istio中文官网 Istio开源 无需太多介绍Service Mesh明日之星,扛把子,截止2019.11还有太多问题没解决 复杂性,性能让人望而却步,能上生产的是真要技术厉害,还得内心强大,项目允许 Linkerd Linkerd官网 Linkerd中文官网 A service mesh for Kubernetes and beyond. Main repo for Linkerd 2.x. Linkerd is a service mesh, designed to give platform-wide observability, reliability, and security without requiring configuration or code changes. Linkerd is a Cloud Native Computing Foundation (CNCF) project. Maesh Maesh官网 Maesh开源 Containous(Traefik 团队)推出了全新设计的轻量级 service mesh(服务网格)工具:Maesh,Maesh 允许对 Kubernetes 集群内流动的流量进行管理

用 shader effect 实现雨滴落水效果!Cocos Creator 3D !

时光总嘲笑我的痴心妄想 提交于 2019-12-26 12:11:24
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> > 最近逛论坛时,看到一位大佬在分享各种 shader 特效。基于其中的水波 shader ,白玉无冰写了一个玩水效果!文章底部获取完整代码!还可以试试水哦! 先一起看看效果~ 点击任意位置,会在该位置生成一个水纹,就像是雨水落在水洼中一样~ 如何使用 effect 文件?新建一个 material ,Effect 属性选择 water , 接着将纹理图片拖到相应参数。 最后为你的模型节点选择材料。 水纹片元着色器实现原理:通过计算与点击点的距离和方向,用 sin 函数模拟水纹效果。通过计算点击时间戳和当前时间与距离,判断是否添加水纹效果。再将多个点击点叠加起来,得到 texture 最终 uv 。 主要代码如下。 for(int i = 0; i < 10; i++){ vec2 uvDir = normalize(v_uv - center[i].xy); float dis = distance(v_uv, center[i].xy); float dis_time = center[i].z - cc_time.x + dis * 3.0; if ( center[i].z > 0.0 && dis_time < 0.0 && dis_time > -0.1 ){ uv += sin_A * uvDir

云原生应用万节点分钟级分发协同实践

和自甴很熟 提交于 2019-12-25 10:59:18
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 点击下载《不一样的 双11 技术:阿里巴巴经济体云原生实践》 本文节选自《不一样的 双11 技术:阿里巴巴经济体云原生实践》一书,点击上方图片即可下载! 作者 谢于宁(予栖) 阿里云容器服务高级开发工程师 罗晶(瑶靖) 阿里云容器服务高级产品经理 邓隽 阿里云容器服务技术专家 导读 :2019 年天猫 双11,阿里巴巴核心系统首次实现 100% 上云。面对全球最大的交易洪峰,阿里云扛住了每秒 54.4 万笔的交易峰值,这是“云原生”与“天猫全球狂欢节”的一次完美联名。 (图为 2019 年天猫 双11 成交额) 容器镜像服务作为阿里巴巴经济体云原生领域的重要基础设施之一,早在 双11 备战期间就已面临大规模分发需求。为了更好地支持这一需求,产品提前进行规划及迭代更新,全面提升了大规模分发场景下的性能、可观测性和稳定性。在新的 双11 来临前,容器镜像服务新增了 数 PB 的镜像数据,月均镜像拉取达 数亿次 。同时产品提供了云原生应用交付链等功能,全面覆盖阿里巴巴经济体及云上用户在云原生时代的使用需求。 本文将介绍容器镜像服务如何通过提升产品能力来应对云原生应用万节点分发场景下的新发展和新挑战。 新发展和新挑战 随着云原生技术的迅速普及,Kubernetes 已经成为事实上应用容器化平台的标准,成为了云原生领域的

Three.JS project - loaders don't load local models (with screenshot)

萝らか妹 提交于 2019-12-25 07:46:57
问题 Example projects don't load 3d models to the scene. Or load but don't display, idk. I tried both - the examples from three.js archive that I downloaded, also my own projects with my own models. So I simply open three.js-master folder, open the index page in the examples folder, go through the list of examples. All examples work except the loaders examples. I just go through all of them and not a single format works, not obj, not fbx. What's wrong with local stuff? Online examples work but if

How can I split a mesh in several pieces so that all are smaller than a given number of vertices?

大兔子大兔子 提交于 2019-12-25 04:56:13
问题 I need to import a mesh to an app that can only handle a certain number of meshes per object. Because of that, I'm forced to split the mesh into several pieces until all pices are below the maximum vertex count. The splitting has to happen in runtime, so I can't use an external application to split the mesh. I don't have any requirement regarding how the mesh is split, but it should conservate all faces, normals and UVs. Is there any known algorithm that can do so? 回答1: You need to use a