zeta0134 / dsgx-converter Goto Github PK
View Code? Open in Web Editor NEWConverts 3D graphics objects (currently .obj only) directly into NDS graphics commands, to be used with glCalllist() directly. Emphasis on accuracy > speed > memory usage.
Converts 3D graphics objects (currently .obj only) directly into NDS graphics commands, to be used with glCalllist() directly. Emphasis on accuracy > speed > memory usage.
Especially for small objects, vertex-based animation is more efficient both in terms of data storage for the points and in terms of processing power on the NDS. Dealing with bones is expensive for all the matrix calculations, and if the bone only affects a tiny number of vertices, it really isn't worth it.
This will require some way to indicate in the DSGX file which set of data we're working with, but in practice it'll work similar to bone-based animation. Each vertex will have a list of offsets (where that point is used in the DSGX list) and then one copy of the data per frame of each animation. We'll need to update vertex and normal data per frame, but everything else can stay static, so there's no real need to re-bake the whole DSGX file for each chunk.
As written, the euclid library for working with vectors and matrix structures is outdated, hasn't been updated since 2011, and seems to be packaged strangely, which complicates its use in deterministic builds. We should research a more appropriate library.
Avoiding emitting MTX_4x4 commands where possible will shave off cycles for matrix operations; this becomes significant with any animated object, as there are lots of matrix operations to handle the bones.
When multiple meshes are used within a single file, the exporter fails to account for the offsets of each mesh and causes wrapping of points when viewed on the DS.
This will greatly reduce the file size and cycle count where possible, should speed up rendering a bit (less point data to process per model) and should help to reduce the workload done applying animations.
General strategy: build up an adjacency graph based on polygons who share an edge, then repeatedly traverse this graph searching for the longest strip. Lather rinse repeat until there are no more strips, then emit everything else as separate polygons. (Handle quads and triangles separately.) Should be striaghtforward enough.
This is a micro-optimization, but it does save 1 cycle per vertex emitted, which adds up for lots of objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.