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

网络 企业网站域名注册查询工具

网络 企业网站,域名注册查询工具,德成建设集团有限公司网站,长宁区公司网站建设文章目录 目的Blend Shape 逐顶点 多个混合思路Blender3Ds maxUnity 中使用Project 目的 拾遗,备份 Blend Shape 逐顶点 多个混合思路 blend shape 基于: vertex number, vertex sn 相同,才能正常混合、播放 也就是 vertex buffer 的顶点数…

文章目录

  • 目的
  • Blend Shape 逐顶点 多个混合思路
  • Blender
  • 3Ds max
  • Unity 中使用
  • Project


目的

拾遗,备份


Blend Shape 逐顶点 多个混合思路

blend shape 基于: vertex number, vertex sn 相同,才能正常混合、播放
也就是 vertex buffer 的顶点数量一样,还有 triangles 的 index 要一致

这样 blend shape 才能逐个顶点计算

计算公式:使用一张大佬整理的图,大佬的文章:BlendShapes基础与拓展练习(面捕与物体变形)
在这里插入图片描述


Blender

Shift+A 新建一个 sphere
在这里插入图片描述

选中

在这里插入图片描述

Tab 进入 Editor Mode,并且在 Data 页签属性的 Shape Keys 添加对应的 blend shape 状态
在这里插入图片描述
在这里插入图片描述

调整好每一个 Shape Keys (或是叫:blend shape) 的顶点位置
然后再 Object Mode 下,我们可以选中对应的 Shape Keys 然后调整 value 查看变形结果
请添加图片描述

最终我们尝试 K帧动画来查看 多个 shape keys 混合控制的情况
请添加图片描述


3Ds max

interlude _1 : working on Yui-chan’s face morphing. - 3Ds max 中的演示 二次元 脸部表情 FFD


Unity 中使用

先在 blender 导出 fbx
在这里插入图片描述

将 fbx 模型拖拽到 hierarchy
在这里插入图片描述

尝试拖拉 inspector 中的 blend shape 拉杆,即可查看效果
请添加图片描述

所以我们写脚本控制 blend shape 混合拉杆即可达到我们各种表情的混合控制
请添加图片描述

在原来 blendshape_1 基础上在混合 blendshape_2
请添加图片描述

blendshape_1 和 blendshape_2 一起播放
请添加图片描述

然后可以尝试看一下 blendshape_1 和 blendshape_2 不同速率的控制混合的情况
这里使用 pingpong 算法

请添加图片描述

下面是测试 csharp 脚本

// jave.lin 2023/10/07 测试 blend shapeusing System.Collections;
using UnityEngine;public class TestingBlendShape : MonoBehaviour
{public SkinnedMeshRenderer skinnedMeshRenderer;private int _BlendShape_1_IDX = -1;private int _BlendShape_2_IDX = -1;private IEnumerator _couroutine_blendShape1;private IEnumerator _couroutine_blendShape2;private IEnumerator _couroutine_pingpong;private void OnDestroy(){StopAllCoroutines();}private void Refresh(){if (skinnedMeshRenderer != null){_BlendShape_1_IDX = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex("BlendShape_1");_BlendShape_2_IDX = skinnedMeshRenderer.sharedMesh.GetBlendShapeIndex("BlendShape_2");}}public void ToBlendShape_1(){Refresh();if (_couroutine_blendShape1 != null){StopCoroutine(_couroutine_blendShape1);}StartCoroutine(_couroutine_blendShape1 = Play_ToBlendShape(_BlendShape_1_IDX, 100.0f));}public void ToBlendShape_2(){Refresh();if (_couroutine_blendShape2 != null){StopCoroutine(_couroutine_blendShape2);}StartCoroutine(_couroutine_blendShape2 = Play_ToBlendShape(_BlendShape_2_IDX, 100.0f));}public void ToBlendShape_1_2(){Refresh();if (_couroutine_blendShape1 != null){StopCoroutine(_couroutine_blendShape1);}StartCoroutine(_couroutine_blendShape1 = Play_ToBlendShape(_BlendShape_1_IDX, 100.0f));if (_couroutine_blendShape2 != null){StopCoroutine(_couroutine_blendShape2);}StartCoroutine(_couroutine_blendShape2 = Play_ToBlendShape(_BlendShape_2_IDX, 100.0f));}public void ToPingPong_BlendShape_1_2(){Refresh();if (_couroutine_pingpong != null){StopCoroutine(_couroutine_pingpong);}StartCoroutine(_couroutine_pingpong = PingPong_BlendShape());}public void StopAll(){StopAllCoroutines();}public void ResetAll(){if (skinnedMeshRenderer != null){var count = skinnedMeshRenderer.sharedMesh.blendShapeCount;for (int i = 0; i < count; i++){skinnedMeshRenderer.SetBlendShapeWeight(i, 0.0f);}}}private IEnumerator Play_ToBlendShape(int idx, float to_val){to_val = Mathf.Clamp(to_val, 0.0f, 100.0f);var start_val = skinnedMeshRenderer.GetBlendShapeWeight(idx);var cur_val = start_val;while (cur_val < to_val){cur_val = Mathf.MoveTowards(cur_val, to_val, (to_val - start_val) * Time.deltaTime);skinnedMeshRenderer.SetBlendShapeWeight(idx, cur_val);yield return null;}Debug.Log($"play to blend shape [{idx}] : [{to_val}] complete!");}private IEnumerator PingPong_BlendShape(){var now_time = Time.time;while (true){var _time = Time.time - now_time;var weight1 = Mathf.PingPong(_time * 200f, 100f);var weight2 = Mathf.PingPong(_time * 50f, 100f);skinnedMeshRenderer.SetBlendShapeWeight(_BlendShape_1_IDX, weight1);skinnedMeshRenderer.SetBlendShapeWeight(_BlendShape_2_IDX, weight2);yield return null;}}
}

Project

个人备份用

  • blender 工程: TestingBlenderShapeKeys.blend
  • unity 工程: TestingBlendShape_BRP_2020.3.37f1.rar

  • 百人计划-BlendShapes基础(物体变形与面捕应用)
  • google : how to implementing the blend shape in blender
  • google : how to create shape keys animation in blender
    • Shape Key / Blendshape Hacks to easily create expressions and actions for your avatar
    • Blender 2.8 Shapekeys and Morphing
    • How to Add Shape Keys in Blender
  • 形态键
  • 在Unity中实现BlendShape表情和骨骼动画混合的实践 - 讲得挺不错
  • BlendShapes基础与拓展练习(面捕与物体变形) - 讲得挺不错
  • GDC2011: Fast and Efficient Facial Rigging
  • GDC jeremy_ernst_fastandefficietfacialrigging.pdf
  • 技术美术百人计划-美术 3.5 BlendShape基础 笔记
  • 3.5 BlendShapes基础
  • 百人计划-BlendShapes基础(物体变形与面捕应用)
  • 【技术美术百人计划】美术 3.5 BlendShape基础
  • Unity通过导入器优化动画关键帧数据 - 删除仅仅只有 blend shape 的动画的其他骨骼信息,优化性能
  • interlude _1 : working on Yui-chan’s face morphing. - 3Ds max 中的演示 二次元 脸部表情 FFD
http://www.yayakq.cn/news/405678/

相关文章:

  • 房地产门户网站宽带费用多少钱一年
  • vps服务器购买网站百度做网站的联系人
  • 发新闻稿做新闻源对网站有啥帮助网站怎么做第三方支付接口
  • wordpress企业站主题下载地址七里香社区在线看
  • 个人怎样建立网站字体在线设计网站
  • 自己电脑做网站访问速度做网站高校视频
  • 51CTO学院个人网站开发视频深圳软件公司名录
  • 网站开发设计师薪资涿州住房和城乡建设局网站
  • 做外贸需要关注的网站有什么问题北京英文网站建设的原则
  • 网站建设实训报告要求互联网公司排名类比
  • 沧州网站建设专业定制wordpress怎么集成码支付宝
  • html网站首页网络设计基本原则
  • seo与网站优化高校教学网站建设
  • 烟台住房和城乡建设局网站辽宁移动惠生活app官方版
  • 网站建设完成后 下一步做什么hao123主页下载安装
  • 广州微信网站制作外国设计网站推荐
  • 简单网站建设教学视频长沙网站建设 个人
  • 网站开发三端指哪三端扬中网站建设好么
  • 郑州网站建站网站怎么样做企业商城网站要多少钱
  • 网站 业务范围做网站的时候遇到的问题
  • 网站关键词被百度屏蔽怎么办SEO案例网站建设
  • 网站的头尾和导航的公用文件营销网站建设联系方式
  • 永兴城乡住房建设部网站天津做推广的公司
  • 网站 备案 拍照重庆市建筑工程信息网官网
  • 简洁大气企业网站源码网络宣传的方法有哪些
  • 外贸网站交易平台如何在微信内做网站
  • 怎样选择网站建设公司晋城建设路网站
  • 关键词排名优化软件策略东莞百度seo哪家好
  • 重庆帝一网络网站建设专家企业网页制作教程和流程
  • 网站幻灯片效果代码苏州做网站设计的公司