Assimp

2009-04-24

Permalink 05:12:47 pm, by Sueastside, 253 words, 4202 views   English (US)
Categories: general

Assimp

Putting the ass into asset.

'Open Asset Import Library' is a library to import a wide range of 3D formats, which I'll use to expand CA's supported formats.

Assimp has some python bindings (using ctypes) but they were severly outdated. Since I hate manual labour, I decided to write a python script to convert the Assimp header files into python's ctypes compatible Structures. A few regexp tutorials later(I'm new to it) I had a 150 lines script generating a 1000 lines of bindings. All things considered updating the old bindings manually might have taken less time. However I gained a new skill (which is still satisfying for us RolePlayers: "Die you filthy troll and show me some loot and experience!!") and whenever someone non-python aware decides to change assimp all they have to do is run a script.

Now that the bindings were updated it was time to tackle some of the python boilerplate, as the material properties showed some signs of wrong/corrupted memory.
The full ctypes reference later, it turned to be as simple as "cast(p.mData, POINTER(c_float*(p.mDataLength/sizeof(c_float)) )).contents"
and a few more for each possible 'p.mType'. Oh well.

To more exciting stuff, getting all this data in CS:

coding...coding...coding...

Support for static meshes, materials (with shadervars) and textures. (after fiddling a bit with left and righ handedness) And now working on animation support...

Picked a mesh that's a tad more exciting than my test cube. Finally settled on 'dwarf.x'.

dwarf

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: vfdgvfdv [Visitor] Email
dsfdgdgdf gge df dfg fdg df gfdg fdg fg re er gdfg
PermalinkPermalink 2011-10-28 @ 16:12

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)

Sueastside's Blog

February 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        

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

An unexpected error has occured!

If this error persits, please report it to the administrator.

Go back to home page

Additional information about this error:

MySQL error!

Table 'evo1_sessions' is marked as crashed and should be repaired(Errno=1194)

Your query: Sessions: get list of relevant users.

      SELECT sess_user_ID
        
FROM evo1_sessions
WHERE sess_lastseen > "2012-02-09 03:28:27"
  AND sess_key IS NOT NULL