Threejs loading DAE model encounters a summary of issues

Source: Internet
Author: User

Threejs loading DAE model encounters a summary of issues

The beautiful Life of the Sun Vulcan (http://blog.csdn.net/opengl_es)

This article follows "Attribution-non-commercial use-consistent" authoring public agreement

Reprint Please keep this sentence: Sun Vulcan's Beautiful Life-this blog focuses on Agile development and mobile and IoT device research: IOS, Android, HTML5, Arduino, Pcduino , Otherwise, the article from this blog refused to reprint or re-reproduced, thank you for your cooperation.



Let's take a look at a threejs. Official example:

Http://threejs.org/examples/#webgl_loader_collada_skinning


Http://threejs.org/examples/webgl_loader_collada_skinning.html

<! DOCTYPE html>
Where the DAE model is loaded
"./models/collada/avatar.dae",

The full address is as follows:

Http://threejs.org/examples/models/collada/avatar.dae

Using the MAC operating system Finder directly can select the downloaded Avatar.dae, press space to pop up the viewing window, the effect is as follows:


Use the text editor to open Avatar.dae, search for the Library_images keyword, and find the following section:

<library_images>    <image id= "vws_b_male2-2_jpg" >      <init_from>vws_b_male2-2.jpg</init _from>    </image>  </library_images>

By the path relative to the Dae, stitch the full address of the map file:

Http://threejs.org/examples//models/collada/VWS_B_Male2-2.jpg


Download and save the map to the same directory as the Avatar.dae, so you can see the pasted model by using the Finder.

Thus, the DAE is a complete self-maintaining model, through which the XML organizes information that is sufficient to present and map the hosted model, even lights, animations, and so on.


The following angle, you can see the model has a highlight of the section, here can be initially determined to be a picture of the light information on the map, that is, the map is baked on the light information.


It can be confirmed that the non-ambient light, the following with Xcode open Dae, see its Lights part is empty, indicating that there is no light.


Here's a tip, if you get the DAE model with a light source and you don't want the ambient light, you can open the Dae with a text editor and find the ambient XML tag:

        <ambient>          <color></color>        </ambient>

The content of the color under it is the three-color value of the ambient light, so that the ambient light does not work.






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.