简体   繁体   English

XNA问题与3D模型的纹理路径

[英]XNA issue with 3d model textures path

I am a newbie in XNA . 我是XNA的新手。 i have a problem in loading free 3d models as it has a absolute path for the textures in the artist's machine which i don't have in mine. 我在加载免费3D模型时遇到问题,因为它具有艺术家机器中纹理的绝对路径,而我在我的机器中没有。 It always come up with error of missing texture because the wrong path . 它总是会因为路径错误而导致缺少纹理错误 I want to know how to edit this path to be relative, and it would be great if it automated as most of the models have more than three textures. 我想知道如何将此路径编辑为相对路径,并且由于大多数模型都具有三个以上的纹理,因此自动执行将非常有用。

You have a number of alternatives: 您有多种选择:

  1. Open the model in a 3D-editing software and change the path. 在3D编辑软件中打开模型并更改路径。
  2. Open the model with notepad (or any other text-editor) and find and replace all paths. 使用记事本(或任何其他文本编辑器)打开模型,然后查找并替换所有路径。
  3. Write a program that takes a folder or file-set as argument and let it do the work for you. 编写一个以文件夹或文件集为参数的程序,让它为您完成工作。 (This is good if you run in to the same problem with another project) (如果您在另一个项目中遇到相同的问题,这很好)
  4. Find a program someone else has already made for this. 查找其他人已经为此编写的程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM