EVO 3d 和绘制文本

发布于 2024-12-08 21:04:59 字数 136 浏览 0 评论 0原文

我正在为 evo 3d 创建一个 s3d 应用程序,并且我拥有所有图形设置并在 3d 中完美工作。我的问题是,如何使用drawText并将其变成3d?到目前为止,使用drawText我只能让文本显示在“左眼”视图中,但在“右眼”视图中屏幕上没有显示任何内容。

I'm creating a s3d app for the evo 3d and I have all the graphics setup and working perfectly in 3d. My question is, how do I use drawText and make it 3d? So far using drawText I can only get the text to show in the "left eye" view but in the "right eye" view nothing is displayed on the screen.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初懵 2024-12-15 21:04:59

我不知道在 Android 上创建 3D 应用程序的过程,但我假设您正在生成标准的并排图片。如果这是真的,您将必须使用不同的坐标调用drawText两次 - 一次用于左眼,一次用于右眼。

然而,使用drawText在场景上显示文本的问题是它不支持眼睛位移。双眼看到的效果完全相同,给人一种无限远的感觉。这反过来又会扰乱整个场景​​的 3D 印象,因为最终会出现无限远的物体覆盖您的对象,这意味着它仍然在它们的前面。

我建议您了解您用于 3D 图形的框架是否能够在 3D 空间中绘制文本。简而言之,您需要一个多边形,您可以在其上绘制文本并将其放置在 3D 场景中所有内容的前面。换句话说,您的文本不再是叠加层,而是 3D 场景的一部分。

至于将这个多边形放在哪里以便它始终位于其他所有物体之前的问题,我建议将其位置锁定到近裁剪平面。

希望这有帮助,希望我说得足够清楚:)

I don't know the process of creating 3D apps on Android, but I'll assume you're producing a standard side-by-side picture. If this is true, you will have to call drawText twice with different coordinates - once for the left eye and once for the right eye.

The problem, however, with using drawText to show text over your scene is that it does not honour the eye displacement. It will show up exactly the same for both the eyes, which gives an impression of it being infinitely far away. This in turn messes up the impression of 3D of your entire scene, because you end up having something appearing infinitely far covering your objects, which then means it's still in front of them.

I suggest you find out whether the framework you're using for 3D graphics has a means to draw text in 3D space. In short, you would want a polygon onto which you will draw your text and position it in front of everything in your 3D scene. In other words, your text is no longer an overlay, but a part of the 3D scene.

As for the question of where to put this polygon so that it's always in front of everything else, I would suggest locking its position to the near clipping plane.

Hope this helps, hope I was clear enough :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文