Jump to content
  • Advertisement
Sign in to follow this  
janta

Unity General questions about Collada

This topic is 3561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dear GDNet community Only recently have I started to get interested in Collada which is, if I understand correctly, a standardized, XML-based description format for assets such as models, textures, lights, and so on. I had started to write an exporter kind of in the same fashion, that is XML based files describing the exported asset, regardless of the authoring tool and the target platform. However (obviously) Collada stands a billion light year forward from my custom format, which is why I'm very tempted to switch to Collada instead of failing at reinventing it ;) however, I'm still a bit afraid by the number of features Collada supports (sometimes too much is not better than not enough...) For example, I saw that a Collada file describing a single model can take as much as 6 MB. What will it be then when I will export complete scenes or worlds? Too big files can be a pain to manipulate or to manage under version control. Does anyone here has some real world experience to share on that point? For example, I was wondering if popular collada exporters (3dmax, maya...) have some options allowing not to export useless stuff and reduce the file size. Most stuff I read about Collada presents the format as totally cool and flawless, so I'd be interesting in other people sharing their actual experience with it. Regards

Share this post


Link to post
Share on other sites
Advertisement
Collada is a vast format, it supports a lot of stuff like physics, inverse kinematics, breps, etc. Would you need a lot of this stuff?

It all depends on what you want to use it for. Is it going to be the file format that all your engine assets use? A format you use to export files from DCC tools like Max, Maya, etc and process into a format suitable for your game engine? Can you preprocess the file to strip out un-necessary information from the file (like physics information if you aren't going to use it for physics)?

The size of a Collada file varies depending on the model, there are some models for which the file size is actually smaller than a binary format like a .fbx and vice versa. I've seen a skinned animated model with 9000 triangles and a 3 second animation clip where the file size is about 1 MB less than the same model exported with the .fbx format from Max, probably because a value like 0.0 just takes 1 byte in Collada because it is output as "0" and the same 0.0 would take 4 bytes in a binary file.

Like any file format it possesses advantages and disadvantages. The advantages are that it is very flexible and can handle a lot of things, it is human readable while makes it easy to inspect, it is a fairly stable format, it is supported by all major DCC tools, etc. The disadvantages are that the file size can be larger than a custom binary format, it may be overkill for just getting a bit of mesh data into your home brew app, etc.

My advice would be for you to take a look at the Collada specification, try to understand how it works, decide if it is good for what you plan to do with it, then decide to use it or not based on your investigation.

Share this post


Link to post
Share on other sites
Quote:
Original post by hughel
Collada is a vast format, it supports a lot of stuff like physics, inverse kinematics, breps, etc. Would you need a lot of this stuff?

Eventually I will, though my focus is somewhere else presently (models geometry and skeleton)

Quote:
Original post by hughel
It all depends on what you want to use it for. Is it going to be the file format that all your engine assets use? A format you use to export files from DCC tools like Max, Maya, etc and process into a format suitable for your game engine? Can you preprocess the file to strip out un-necessary information from the file (like physics information if you aren't going to use it for physics)?

No of course I don't plan to use collada format for runtime assets, only as an intermediate format. I thought of the possibility of striping out the unused stuff but I'd like better not to add another layer in the export pipeline, if possible. I'd rather have this handled directly by the collada exporter.

Quote:
Original post by hughelit is supported by all major DCC tools

That is indeed the biggest advantage for me as I'm not too tempted to spend a ton of time writing exporters...

Quote:
Original post by hughel
My advice would be for you to take a look at the Collada specification, try to understand how it works, decide if it is good for what you plan to do with it, then decide to use it or not based on your investigation.

I'v started to do that already, the specs are about 600 pages worth of reading but only a small subset of it is relevant for me now (stuff about geometry, meshes and so on)

thanks for your reply.

Share this post


Link to post
Share on other sites
To handle it all in the export and not have to introduce an extra processing stage, you would need to modify the exporter code for a free exporter or write an exporter yourself. This isn't a trivial task as I'm sure you are aware (especially since the Collada specification is so vast) and you would end up having to modify existing exporters or write exporters for each DCC tool your plan to support which would negate the usefulness of having it supported by all the major DCC tools.

I've only used the bits of the Collada file format that deal with mesh/material/shader constants, skeletal animation and morph target animation. You can pick and choose what you use from a Collada file. The free 3DS Max exporter (source code is available) from Feeling Software lets you export pretty much everything I have dealt with but the export options aren't very detailed. I know they do a free Maya exporter as well, and the export options seem to be far more detailed. I think they have stopped supporting the free version of the exporter though.

Share this post


Link to post
Share on other sites
Quote:
Original post by janta
Most stuff I read about Collada presents the format as totally cool and flawless, so I'd be interesting in other people sharing their actual experience with it.

Regards

That's quite funny. Once you get into the details you will see that Collada is far from flawless.
The format is much more complicated than it needs to be, the documentation is lacking and the sample application source code (which serves as adhoc documentation) is simply atrocious.

Share this post


Link to post
Share on other sites
Well I doubt not there are flaws (otherwise I wouldn't have created this discussion) but what I really wonder is whether I'll do better with my own format (obviously I won't) Do you have any real world experience to share with me?
I guess I'll try it and see for myself anyway

Share this post


Link to post
Share on other sites
Quote:
Original post by janta
Well I doubt not there are flaws (otherwise I wouldn't have created this discussion) but what I really wonder is whether I'll do better with my own format (obviously I won't) Do you have any real world experience to share with me?
I guess I'll try it and see for myself anyway


My experience, is that using the standard format that comes with engine/toolkit/platform is better than using collada.
If that doesn't exist then collada is no worse than any other solution. But collada is only ment as an intermediate. You have to convert it into your own format before use.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Tags

  • Similar Content

    • By ethancodes
      I'm working on a system for my game that will allow the player to stack pick ups in a queue. As one pick up expires, the next automatically activates. I'm having an issue though where if I pick up the first one, it activates fine, but if i pick up a second directly after it, it overrides the first one, activates the second one, and then once it has run it's course, everything goes back to normal gameplay, no first pick up. I'm not sure why this is happening. Hopefully someone can spot what I'm doing wrong in my code.
      Here is the code for the pick up manager:
      // Update is called once per frame void Update () { if (pickUpQueue.Count != 0 && !pickUpActive) { pickUpActive = true; pickUpQueue[0].ActivatePickUp(); } DeactivatePickUp(); } void DeactivatePickUp () { if (pickUpQueue.Count != 0 && pickUpActive) { Destroy (pickUpQueue [0]); pickUpQueue.RemoveAt (0); pickUpActive = false; } } And here is the PickUp:
      public override void ActivatePickUp () { ball.GetComponent<Ball>().Speed = 2.0f; //increase ball speed... ball.GetComponent<Ball>().StartCoroutine(timer); //...set time that power up is active }  
      There is also a Base Pick Up:
      public void OnCollisionEnter2D (Collision2D collision) { Vector2 tweak = new Vector2 (Random.Range(0f, 0.2f),Random.Range(0f, 0.2f)); this.gameObject.GetComponent<Rigidbody2D>().velocity += tweak; //if the pickup makes contact with the paddle or ball.... if (collision.gameObject.tag == "Paddle" || collision.gameObject.tag == "Ball") { GameObject.FindObjectOfType<GameManager>().GetComponent<PickUpManager>().pickUpQueue.Add(this); Destroy(gameObject); //...and finally destroy power up object } } As a side note, I am trying to find a solution to this that will work for all of my pickups. Some pickups are ammo based, some are timed. 
    • By D34DPOOL
      Edit Your Profile D34DPOOL 0 Threads 0 Updates 0 Messages Network Mod DB GameFront Sign Out Add jobEdit jobDeleteC# Programmer for a Unity FPS at Anywhere   Programmers located Anywhere.
      Posted by D34DPOOL on May 20th, 2018
      Hello, my name is Mason, and I've been working on a Quake style arena shooter about destroying boxes on and off for about a year now. I have a proof of concept with all of the basic features, but as an artist with little programming skill I've reached the end of my abilities as a programmer haha. I need someone to help fix bugs, optomize code, and to implent new features into the game. As a programmer you will have creative freedom to suggest new features and modes to add into the game if you choose to, I'm usually very open to suggestions :).
      What is required:
      Skill using C#
      Experience with Unity
      Experience using UNET (since it is a multiplayer game), or the effort and ability to learn it
      Compensation:
      Since the game currently has no funding, we can split whatever revenue the game makes in the future. However if you would perfer I can create 2D and/or 3D assets for whatever you need in return for your time and work.
      It's a very open and chill enviornment, where you'll have relative creative freedom. I hope you are interested in joining the team, and have a good day!
       
      To apply email me at mangemason@yahoo.com
    • By davejones
      Is there a way to automatically change the start position of an animation? I have a bunch of animations set up on 3D models in unity. The issue is that I need to move the 3D models, however when I do so the animation start positions are not updated and I have to do it manually.

      Changing the transform of key frames is time consuming with the amount of animations I have, so I was wondering if there was a way to do it automatically?
    • By MoreLion
      hey all! We are looking for members for our Unity horror game! 
      Here’s the story:
      After a deadly virus plunges the world into chaos killing 85% of the human population there are now what they call “zones” these zones are watched very closely by the surviving government, people are checked every day for the virus, even if you touch the spit or any human waste or fluids of the victim who is infected, you will die. But one day, people in the west zone start to go missing, 1 woman goes outside the walls to uncover the mystery, is there more to the virus than meets the eye?, That is where your story starts.
      This game is not a long development game, I have loads other game ideas,
      I will also allow you to have a bit of creative freedom if you wish to add or share a idea!
      And no, it’s not a zombie game lol I feel like zombie games are too generic, in this game you will encounter terrifying beasts!
      There is some concept art one of our concept artists have made
      If interested email liondude12@gmail.com
    • By Canadian Map Makers
      GOVERNOR is a modernized version of the highly popular series of “Caesar” games. Our small team has already developed maps, written specifications, acquired music and performed the historical research needed to create a good base for the programming part of the project.

      Our ultimate goal is to create a world class multi-level strategic city building game, but to start with we would like to create some of the simpler modules to demonstrate proof of concept and graphical elegance.

       

      We would like programmers and graphical artists to come onboard to (initially) create:

      A module where Province wide infrastructure can be built on an interactive 3D map of one of the ancient Roman Provinces.
      A module where city infrastructure can be built on a real 3D interactive landscape.
      For both parts, geographically and historically accurate base maps will be prepared by our team cartographer. Graphics development will be using Blender. The game engine will be Unity.

       

      More information, and examples of the work carried out so far can be found at http://playgovernor.com/ (most of the interesting content is under the Encyclopedia tab).

       

      This project represents a good opportunity for upcoming programmers and 3D modeling artists to develop something for their portfolios in a relatively short time span, working closely with one of Canada’s leading cartographers. There is also the possibility of being involved in this project to the point of a finished game and commercial success! Above all, this is a fun project to work on.

       

      Best regards,

      Steve Chapman (Canadian Map Makers)

       
    • By Scouting Ninja
      So I have hundreds of moving objects that need to check there speed. One of the reasons they need to check there speed is so they don't accelerate into oblivion, as more and more force is added to each object.
      At first I was just using the Unity vector3.magnitude. However this is actually very slow; when used hundreds of times.
      Next I tried the dot-product check:  vector3.dot(this.transform.foward, ShipBody.velocity) The performance boost was fantastic. However this only measures speed in the forward direction. Resulting in bouncing objects accelerating way past the allowed limit.
       
      I am hoping someone else knows a good way for me to check the speed with accuracy, that is fast on the CPU. Or just any magnitude calculations that I can test when I get home later.
       
      What if I used  vector3.dot(ShipBody.velocity.normalized, ShipBody.velocity)?
      How slow is it to normalize a vector, compared to asking it's magnitude?
    • By Ds ds
      Hi, my name is Andres, I'm a programmer with a technician degree and a Diploma in C#, looking for a project in Unity to start my career in game development. I don't do it for a paid but a recognition and start a portfolio, preferably a 2D game. Thanks for read, have a nice day. 
       
    • By Victor Rodriguez
      Hi there! Is the first time that I'm posting here so I'm sorry if I'm doing it wrong ha. 
      So here it comes, my doubt is, I'm doing a game with different levels, each of these levels in one different scene. Each scene contains to cameras that you can change pressing a button. Everything works fine. 
      The only problem is that I would like it to look a bit more professional, and I would like that if you finish the level with camera2, the next level start the same way. I've been thinking about using dontdestroyonloadon both cameras, but obviously this cameras need to be attached to the player to make the movement work, what do you recommend? Sorry If I've explained it in a messy way, and feel free to dm me for anything. Thanks in advance! 
    • By Ike aka Dk
      Hello everyone 
      I am a programmer from Baku.
      I need a 3D Modeller for my shooter project in unity.I have 2 years Unity exp.
      Project will paid when we finish the work 
      If you interested write me on email:
      mr.danilo911@gmail.com
    • By markoal
      Hi,
      I'm Unity developer from Croatia and I'm looking to work on the paid project in my spare time.
      I have 5+ years of experience in Unity and I'm familiar with almost anything, including all platforms (also Switch, PS4 and Xbox).
      Feel free to contact me.
  • Advertisement
  • Popular Now

  • Forum Statistics

    • Total Topics
      631365
    • Total Posts
      2999585
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!