Use torch light Resources

Source: Internet
Author: User

Today, I made a fortune on the Ogre official website and saw torchlight, a game made with ogre.

The game is doing well, indicating that ogre is powerful.

In the installation directory, You can see familiar DLL such as ogremain. dll Ois. dll. Suddenly you can see the resources. cfg file, which defines a path of the PAK/ZIP file.

Okay, I found zip, 600 m. What is installed in it? Ogre resources! Model, skeleton, and texture. Day !!!!.

However, the model in it cannot be used directly for skeleton animation. To make the texture take effect, change the PNG in texture_unit in material to DDS. If skeleton is used, ogrexmlconvert will be used. the skeleton file is converted back to the XML file, and the link animation is added to the animation file.Composition.

Taking dog. mesh as an example, I don't know if the mesh file of ogre has been studied, and there is also a skeleton file. convert it into an XML file by yourself.

Put dog. after skeleton is converted to an XML file (ogrexmlconverter is used, the source code tools should not be compiled in the SDK, but the tool will be released). I found that skeleton is not linked to animation. Add skeleton link by myself.


</Bonehierarchy>
<Animations>
<Animation name = "bind" length = "0">
<Tracks/>
</Animation>
</Animations>
<Animationlinks>
<Animationlink skeletonname = "attack1.skeleton" scale = "1"/>
<Animationlink skeletonname = "attack2.skeleton" scale = "1"/>
<Animationlink skeletonname = "attack3.skeleton" scale = "1"/>
<Animationlink skeletonname = "bark. Skeleton" scale = "1"/>
<Animationlink skeletonname = "fidget_alert.skeleton" scale = "1"/>
<Animationlink skeletonname = "fidget_shake.skeleton" scale = "1"/>
<Animationlink skeletonname = "get_hit.skeleton" scale = "1"/>
<Animationlink skeletonname = "hit. Skeleton" scale = "1"/>
<Animationlink skeletonname = "idle. Skeleton" scale = "1"/>
<Animationlink skeletonname = "Run. Skeleton" scale = "1"/>
<Animationlink skeletonname = "walk. Skeleton" scale = "1"/>
</Animationlinks>
</Skeleton>

Note that the gray part is the link added, and the skeletonname is the action file.

Use ogrexmlconvert to convert skeleton back to a binary file. Success. Now, you can use these resources on your own. It's really hard to find the best tie shoes.

M model resources (some of which are music) and animations! Day! Sent. The top artists in the world can use what they have done.

I also found a cegui custom type, and the UI is pretty.


This is the pet dog carried by the hero. Later, it will be used as a monster in his own game!

Supplement:

1. Drag the .skeletonfile directly to the ogrexmlconverter.exe .xmlfile. After modification, drag the file to ogrexmlconverter.exe and generate the. Skeleton file again.

2. ogre can directly read the DDS format. torchlight uses the DDS image format. To use the model directly in ogre. in material (such as the dog model), directly convert PNG to DDS

You can.

material PET
{< br> technique
{< br> pass
{< br> ambient 0.588 0.588 0.588
diffuse 0.588 0.588 0.588
specular 0 0 0 0
emissive. 2. 2. 2
scene_blend alpha_blend
alpha_rejection greater 128
texture_unit
{< br> Texture dog_pet.dds
}< BR >}< br>}

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.