作为脚本附到GameObject上,我选择附到相机上
Screenshot.csview raw 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38// 创建这个脚本,挂在任意 GameObject 上
using UnityEngine;
using System.IO;
public class Screenshot : MonoBehaviour
{
[]
public KeyCode screenshotKey = KeyCode.F12;
public int superSize = 1; // 1 = 原始分辨率, 2 = 2倍分辨率
void Update()
{
if (Input.GetKeyDown(screenshotKey))
{
TakeScreenshot();
}
}
void TakeScreenshot()
{
string folderPath = Path.Combine(Application.dataPath, "..", "Screenshots");
// 创建文件夹
if (!Directory.Exists(folderPath))
{
Directory.CreateDirectory(folderPath);
}
// 生成文件名
string fileName = $"Screenshot_{System.DateTime.Now:yyyy-MM-dd_HH-mm-ss}.png";
string filePath = Path.Combine(folderPath, fileName);
// 截图
ScreenCapture.CaptureScreenshot(filePath, superSize);
Debug.Log($"截图已保存: {filePath}");
}
}修改编辑器UI,作为菜单使用;需要放到scene文件同目录的Editor目录下
效果如下:Editor/ScreenShotTest.csview raw 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34using System.IO;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
public class ScreenShotTest : MonoBehaviour
{
//ctrl + shift + y 截图
[]
private static async void Screenshot()
{
string folderPath = Directory.GetCurrentDirectory() + "\\Screenshots";
if (!Directory.Exists(folderPath))
{
Directory.CreateDirectory(folderPath);
}
var timestamp = System.DateTime.Now;
var stampString = string.Format("_{0}-{1:00}-{2:00}_{3:00}-{4:00}-{5:00}", timestamp.Year, timestamp.Month, timestamp.Day, timestamp.Hour, timestamp.Minute, timestamp.Second);
ScreenCapture.CaptureScreenshot(Path.Combine(folderPath , stampString + ".png"));
Debug.Log("截图中......");
//等待5秒
await Task.Delay(5000);
System.Diagnostics.Process.Start("explorer.exe", folderPath);
Debug.Log("截图" + stampString + ".png");
}
void OnMouseDown()
{
ScreenCapture.CaptureScreenshot("SomeLevel.png");
}
}
C++特化模板的内部匹配参数代码解析
SVD求解配准的推导过程
配准误差函数
下面整理配准中计算推导过程,包含:平移
如何入门大模型
mediapipe人脸关键点序列
MediaPipe人脸关键点指南
人脸关键点的数量
根据Claude-Sonnet-4的介绍,标准版本是468个,优化版本是478个,添加左右眼虹膜关键点。看下面的关键点参考图能看到,虹膜关键点的起始序号正好是468。 > 478个关键点是MediaPipe Face Mesh的最新升级版本的结果(通常称为 Refined Mesh Model)。相比于标准的468个关键点版本,新增的10个关键点主要分布在 虹膜(瞳孔)区域,用于更精确地描述眼睛的几何形状和运动。
A Multiresolution 3D Morphable Face Model and Fitting Framework
贡献
提供了名为SFM(Surrey Face Model)的人脸模型,包含不同的分辨率层次和标注landmarks,让人脸模型的拟合更快;同时开源了一个3DMM人脸重建的代码框架,促进社区的研究。 - Surrey Face Model,包括开源非商用版本和商用版本 - eos: A lightweight header-only 3D Morphable Face Model fitting library,代码框架
数据集
Hexo-Next支持Latex公式
书接Hexo-Next样式美化,本篇记录hexo-next组合对于
Latex渲染插件配置
具体的在theme-next Math docs中写的很清楚,有MathJax和Katex两种公式渲染方式。这里经过实际操作,选择MathJax。
PBR Reading Notes
7. Sampling and Reconstruction
Radiance在胶平面上是连续函数,但是渲染的输出是离散的像素。
But what happens when we need the value of s signal at a location that we didn’t sample at? In such cases, we can use a process known as reconstruction to derive an approximation of the original continuous function. With this approximation we can then discretely sample its values at a new set of sample points, which is referred to as resampling. signal processing primer
日常无能狂怒的瞬间
谨以此篇post记录自己日常中无能愤怒的瞬间,并时常更新温故,提醒自己如何面对这个嘈杂且充满噪声的世界。
狂怒瞬间
- 骑车路上经常遇到各种奇形怪状占住车道的机动车辆,有的横在车道上,有的堵死一个方向(双向两车道),有的骑在车道线上占影响两个车道,这些人中绝少打双闪的,就是纯堵死,每次遇到这类“人群”,我都要在心理或者口头上骂上一句“煞笔”。
Notes on Data Formats of Graphics APIs(2)
Pixel Data Internal Format
看一下glTexImage2D的函数签名,有三个参数比较费解,分别是internalformat、format和type。这三个参数相互配合,共同决定了OpenGL
Texture数据的在GPU上的格式以及内存数据从CPU-〉GPU上传过程中如何被‘解析’。
1 | void glTexImage2D(GLenum target, |