matthewlai Posted November 28, 2020 Report Share Posted November 28, 2020 Hello! I am making a tile-based game based on 0ad assets, and I'm having some trouble rendering some actors. For example, structures/persians/stable.xml has a props/structures/persians/stable_horse_a.xml prop in the first group, but the first group in that file only has a mesh (skeletal/horse_persian.dae), and no textures. The mesh does have UV coordinates so I assume there's a texture that should be applied? What textures would be used here? Also, the second group in stable_horse_a.xml has a bunch of variants in separate files, and quadraped/horse/stable/brown.xml for example has a base texture without a mesh. How does that work? Thanks! Quote Link to comment Share on other sites More sharing options...
Panther Posted November 28, 2020 Report Share Posted November 28, 2020 The game has a mechanism that allows to load models and apply textures later meaning that no .dae file contains any directly. The variants add a randomized texture and/or props to the model. As for the quadraped files, those are animations that a model is capable of doing and are defined in the .dae. You can find every single texture in the following path: 0.A.D -> binaries -> data -> mods -> puplic -> art -> textures If you can't figure out which is which, go into the actors folder and read the .xml file you need as it contains the path to the texture of it. 1 Quote Link to comment Share on other sites More sharing options...
matthewlai Posted November 28, 2020 Author Report Share Posted November 28, 2020 3 minutes ago, Panther said: The game has a mechanism that allows to load models and apply textures later meaning that no .dae file contains any directly. The variants add a randomized texture and/or props to the model. As for the quadraped files, those are animations that a model is capable of doing and are defined in the .dae. You can find every single texture in the following path: 0.A.D -> binaries -> data -> mods -> puplic -> art -> textures If you can't figure out which is which, go into the actors folder and read the .xml file you need as it contains the path to the texture of it. Oh I see! I had the wrong mental model of how actors work. I thought each variant chosen in each group is supposed to be self contained and rendered separately. I was able to render a lot of structures that way (because they have both mesh and textures in the same variant), but not props. This makes a lot more sense. Does that mean once all the variants are resolved for an actor, there should always be one mesh, one set of textures, and zero or more props that should be recursively rendered as their own actors, and attached to the parent actor mesh at the specified node? Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2020 Report Share Posted November 28, 2020 Correct. Quote Link to comment Share on other sites More sharing options...
matthewlai Posted November 28, 2020 Author Report Share Posted November 28, 2020 Amazing thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.