In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to convert dae model to gltf in Cesium. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
A single model in Cesium can be added in gltf, glb, etc. In the process of development, models in other formats need to be converted to the above format. On github, there is an open source tool that can convert COLLADA (.dae) files into glTF files, program source URL:
Https://github.com/KhronosGroup/COLLADA2GLTF
DAE is a 3D model, 3Dmax and maya need to install the dae output plug-in to export to a file with the suffix .dae, which can be exported directly by sketchup.
Github provides compiled runnable programs, available in linux and windows versions, and can be downloaded from https://github.com/KhronosGroup/COLLADA2GLTF/releases
Detailed parameter settings are available on github:
How to use it on windows:
Extract the downloaded executable package, open the cmd command line window under windows, and enter a typical usage:
COLLADA2GLTF-bin.exe-I source file path (.dae)-v version number-output path of t-o .gltf file
When the input is complete, click enter to run it. A gltf file will be generated when you succeed, and an error message will be displayed if you fail.
In the case of a large number of dae files, you can write a simple program using C # to convert the dae files in a folder into gltf model in batches. The detailed development code is as follows:
String [] _ fileLst = Directory.GetFiles (@ "folder path")
Foreach (string _ files in _ fileLst)
{
FileInfo _ fileInfo = new FileInfo (_ files)
/ / get the dae file
If (_ fileInfo.Extension = = ".dae")
{
ProcessStartInfo startInfo = new ProcessStartInfo (string.Format (@ "convert software path\ COLLADA2GLTF-bin.exe"), string.Format (@ "- I {0}-v 1.0-t-o output file path\ {1} .gltf", _ fileInfo.FullName, _ fileInfo.Name.Replace (".dae", string.Empty)
/ / execute some parameter settings of the command line program and search specifically
StartInfo.CreateNoWindow = true
StartInfo.UseShellExecute = false
StartInfo.RedirectStandardOutput = true
/ / run the program
Process p = new Process ()
P.StartInfo = startInfo
P.Start ()
}
}
Thank you for reading! On "how to achieve dae model in Cesium to gltf" this article is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge, if you think the article is good, you can share it out for more people to see it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.