• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
mynameisnafe

.3DS Animation - Pos Rot and Scale tracks structure

13 posts in this topic

Hi,

 

I need some/one people/person who have written .3ds loaders which pull animation data out using any language I don't care which it's irrelevant.

 

What I need to know is how the 0xB021 position track, 0xB022 rotation track, and 0xB023 scale track are structured so that I can write this section of my loader. It's kind of the important bit. I have everything I need bar this information.

 

I also need this information desperately. I've been asking everywhere and no-one ever seems to reply, let alone point me at some documentation, a working loader*, etc.

 

I know it's pretty much a dead format, but it's a uni project and .3ds is set in stone.

 

*lib3ds - yeh great but it's a mass of horrible looking code, and I can't find the bit that deals with these chunks specifically - if you know where to point me in lib3ds, please do so, it would be massively appreciated.

 

Praying for help now.

 

Thanks in advance

Edited by mynameisnafe
0

Share this post


Link to post
Share on other sites

I know it's pretty much a dead format

is the reason for

no-one ever seems to reply

 

.3ds is set in stone.

How about converters to more suitable formats (fbx,collada) ?

-1

Share this post


Link to post
Share on other sites

it's a uni project and .3ds is set in stone.

 

I'd love to write the curriculum but I don't. Sorry dude.

 

Also nevermind discussion on SDK reliance, and Collada's not a great idea - it's a 'game' so I'm looking for a quick load.

Look in the future I'll use FBX I promise, but to be fair the only problem with .3ds is the documentation, other than that it's a great format imo.

Edited by mynameisnafe
0

Share this post


Link to post
Share on other sites

Also nevermind discussion on SDK reliance, and Collada's not a great idea - it's a 'game' so I'm looking for a quick load.

There are other ways...

 

-1 for a valid sugguestion

 

&

 

f****** pronto

 

is most likey an other reason for

 

no-one ever seems to reply

0

Share this post


Link to post
Share on other sites

Look, I'm not really looking for an argument here.

 

Given - poor language - and edited. Apologies. Just stress creeping in.

 

I'm sorry though, I can't use any other format: it's a university project and the title of the project is "Loading a .3DS File using C++". So it's not really a valid suggestion to solve my problem.

0

Share this post


Link to post
Share on other sites

Another reason would be that finding information really isn't hard... I searched "3DS chunk 0xB021" and already got lots of information on the format in the first page, including the relevant chunks.

 

The only one with which you may have issues understanding is with rotation (translation and scaling seem pretty trivial). If you know how glRotate used to work then you probably can get the idea of how the angle is stored.

2

Share this post


Link to post
Share on other sites

Google hits 1-4 use van Velsen documentation which acknowledges but doesn't process these chunks. Hit 5 is this thread, hit 6 is a Gamedev thread no-one got back to on the subject.

 

Okay 7 is good! I see how rotation works and that's epic - just like you say it did ( I see it's not a quat )!

 

Google hit 8 is lib3ds*, and 9 doesn't touch these chunks, a la van Velsen :/

 

10 looks good (a library I hadn't seen) but I can't find any source, I will have a hunt on their site.

 

Lib3ds has all the answers but is typedef'd beyond all recognition and I don't understand what's going on in the bits of it that do things that I haven't done in my own loader. I'd love to scour the lovely GPL/LGPL Lib3ds for knowledge but it's just so.. Lib3DS-y.

 

I suppose I've been blindsided by just looking for complete documentation as opposed to scouring forums for info on a given chunk, but fairplay.

 

You know dude, I've got 19 days to go on this project and I've barely prepped the gfx/render pipeline for animation 'cos I've been doing this loader so long, but what you gave me might save my bacon - I can see how rotation_track is done and if I apply that to the other chunks, with a bit more reseacrh I'm onto a winner. (Google hit 7 - That rotation code on the forum is a perfect help). +1 :)

0

Share this post


Link to post
Share on other sites

Google hits 1-4 use van Velsen documentation which acknowledges but doesn't process these chunks. Hit 5 is this thread, hit 6 is a Gamedev thread no-one got back to on the subject.

Weird, hits 2 and 3 for me were the 3DS format documentation (although I admit having to use Ctrl+F to find the chunks, the documents are so huge that it's extremely easy to miss them). Maybe it gave you different results though. Also I mentioned how rotation works because neither document seemed to explain it (one post in another of the hits explained it instead).

 

Good that was enough though =)

0

Share this post


Link to post
Share on other sites

Google hits 1-4 use van Velsen documentation which acknowledges but doesn't process these chunks. Hit 5 is this thread, hit 6 is a Gamedev thread no-one got back to on the subject.

Weird, hits 2 and 3 for me were the 3DS format documentation (although I admit having to use Ctrl+F to find the chunks, the documents are so huge that it's extremely easy to miss them). Maybe it gave you different results though. Also I mentioned how rotation works because neither document seemed to explain it (one post in another of the hits explained it instead).

 

Good that was enough though =)

 

Well it's just that now I know that these chunks contain what isn't subchunks, + this link was in one of the ones from that let me google that for you search:

 

http://away3d.googlecode.com/svn/trunk/fp10/Away3DLite/src/away3dlite/loaders/Max3DS.as

And that's a friggin beast of a find, so I thank you sir! smile.png

 

Edit: and the rotate info too :)

Edited by mynameisnafe
0

Share this post


Link to post
Share on other sites

The data of the three chunks seems to match how OpenGL does it (0xB020 is the translation in the X/Y/Z axes, 0xB021 is the rotation which I already explained, 0xB022 is the scaling in the X/Y/Z axes), there isn't much more to it, really (translation and scaling should be pretty easy to figure out). The only issue is that I don't know in what order they're made... but even then there are only six possible combinations, so in the worst case you could just try them all and you'll eventually hit the correct one.

 

There's also the issue of interpolation between keyframes. For translation and scaling I assume it's just interpolation as-is, for rotation I suppose you'll need to normalize the axis (the 2nd to 4th floats) before applying the rotation. Guessing here, never worked with the format.

0

Share this post


Link to post
Share on other sites

I don't know if you want to write this all yourself or not, but you could look at Assimp to get some ideas

 

assimp loads lots of 3D file types and they make it easy to extract 3D animation data. Assimp is written for a few languages and they have the source code available for download

Edited by bwebster890
1

Share this post


Link to post
Share on other sites

I don't know if you want to write this all yourself or not, but you could look at Assimp to get some ideas

 

assimp loads lots of 3D file types and they make it easy to extract 3D animation data. Assimp is written for a few languages and they have the source code available for download

 

Didn't know that was open source, sweet idea I shall check it out, thank you :)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0