【问题标题】:Away3d aplying texture/ matterial issuesAway3d 应用纹理/材质问题
【发布时间】:2014-10-04 01:54:13
【问题描述】:

您好,我尝试使用 png 对球体进行纹理处理,但它应用了错误的纹理并将其弄乱了。 在正确设置之前,我找不到任何方法来移动它并使用纹理/材料。 我想创建一个足球并将其应用为球纹理 这是我用来创建材料并应用它的代码 谢谢

[Embed(source=”../assets/Ball.png”)]
public static var TheBallTextureClass:Class;
public var TheBallMaterial:TextureMaterial;

var theball:Mesh;

TheBallTexture = new BitmapTexture(new TheBallTextureClass().bitmapData);
TheBallMaterial = new TextureMaterial(Cast.bitmapTexture(TheBallTexture));
TheBallMaterial.smooth = true;
TheBallMaterial.repeat = true;

theball = new Mesh(new SphereGeometry(30), _ballMaterial);

【问题讨论】:

    标签: actionscript-3 flash textures away3d


    【解决方案1】:

    这是因为 SphereGeometry 的 UV 映射很奇怪,并且不是为像足球这样的图案制作的。

    我建议你在 3ds max 中创建球体并在那里展开。

    编辑: 如果您愿意,您可以在 Away3D 中编辑 SphereGeometry 的 UV 映射:

    创建一个 SphereGeometry 的子类并覆盖 "buildUVs(target:CompactSubGeometry)" 创建您自己的 UV 集。

    【讨论】:

    • 谢谢,奇怪,没有办法在球体上操作 png 吗?
    • 不,但是你可以操纵 UV 坐标,即使我不推荐它,因为它很乱
    • 抱歉,我是away3d 的新手,我该如何操作UV 应该在哪里操作?在网格上?在材料上还是在几何上?
    猜你喜欢
    • 1970-01-01
    • 2019-04-06
    • 1970-01-01
    • 1970-01-01
    • 2013-02-13
    • 1970-01-01
    • 2021-06-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多