Coding Log

2007-06-17

Coding Log

Permalink 03:36:30 am, Categories: Coding Log  

I was able to get vertex conversion working correctly today. As of right now, the ConvertGeometry() function does the following for each <mesh> object:

  • Retrieves the array of vertices from the <source> element specified .
  • Converts this array of vertices from string format to float.
  • Stores this array of vertices as <v> elements under a meshFact object with a name the same as the id attribute specified in the collada <source> element.

This doesn't seem like a lot, but the code for it is actually quite extensive. This actually only converts to a <library>, currently. In order to convert to a <world> type file, I will need to determine how to represent portals. I believe this is going to need to be information either added to the COLLADA file in <extra> elements (as this is really what these are for), or perhaps there will be more information coming in future sections. Right now, my main design concern is to get the geometry (i.e. vertices, lines, polygons) working correctly before proceeding. Since the library element is a prerequisite for the <world>, (e.g. the <world> element often includes library elements outside of its own file), conversion of libraries seemed the logical place to start.

Additionally, I am not quite sure how to convert splines. As far as I can tell right now, splines are not part of the Crystal Space library definition. I could be incorrect, however. It might be possible to convert the splines to a polygonal mesh, similar to what Blender allows a user to do, but this would have to wait until the basics of the conversion system are in place.

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

Comment from: Fossi Fossi [Member]
Like for all unsupported features in the COLLADA format, i'd just output an error message and drop them. After all, we can't support everything.
PermalinkPermalink 2007-06-21 @ 19:02
Comment from: Scott Johnson (Jwir3) [Visitor] Email
Yeah, I think that would work fine for now. In the future, I think it might be nice to add a function which converts the splines to actual polygonal meshes. The conversion function is somewhat complex, however, so it probably won't be in my current implementation. It'll give me work for the future, though. ;)

An option which will be planned for COLLADA Convertor v1.2 maybe. ;)

~Jwir3
PermalinkPermalink 2007-06-21 @ 19:19
Comment from: Fossi Fossi [Member]
If there's ever the need, i would put spline support into CS as a general-use plugin which the converter uses. However so far the argumentation has been: Why implement a triangulation routine if there are a lot of tools out there that are dedicated to the job?

With COLLADA support the perspective changes a little, because it could be that an artist doesn't know whether or not his artwork will be used on an engine that supports splines.

I guess there will be other points were we will have to skip collada nodes anyway.
PermalinkPermalink 2007-06-22 @ 09:27

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

May 2012
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Search

Categories

Misc

XML Feeds

What is this?

powered by
b2evolution