aerys / minko-collada Goto Github PK
View Code? Open in Web Editor NEWCollada file format extension for Minko
Home Page: http://minko.io
License: MIT License
Collada file format extension for Minko
Home Page: http://minko.io
License: MIT License
Hello,
When importing a Blender generated collada, there is an issue if you try to use the Object Instances option.
How to reproduce :
Open Blender (I used version 2.64.4). You should have a new scene with a cube.
Select the cube (right click)
Hit space and write "duplicate"
Clic on "Linked Duplicate"
Place the new cube wherever you want
Select both cubes (shitf + right clic on the first one)
Go to the menu File -> Export -> Collada
Clic the option box Collada Option -> Use Object Instances
Save the file
Import the collada file with minko-collada
Error :
RangeError: Error #1125: The index 35 is out of range 0.
at aerys.minko.render.geometry::GeometrySanitizer$/removeDuplicatedVertices()[J:\Code\minko\src\aerys\minko\render\geometry\GeometrySanitizer.as:234]
at aerys.minko.type.parser.collada.helper::MeshTemplate/generateMeshes()[J:\Code\minko-collada\src\aerys\minko\type\parser\collada\helper\MeshTemplate.as:88]
at aerys.minko.type.parser.collada.instance::InstanceGeometry/createSceneNode()[J:\Code\minko-collada\src\aerys\minko\type\parser\collada\instance\InstanceGeometry.as:105]
at aerys.minko.type.parser.collada.instance::InstanceNode/createSceneNode()[J:\Code\minko-collada\src\aerys\minko\type\parser\collada\instance\InstanceNode.as:74]
at aerys.minko.type.parser.collada.instance::InstanceVisualScene/createSceneNode()[J:\Code\minko-collada\src\aerys\minko\type\parser\collada\instance\InstanceVisualScene.as:50]
at aerys.minko.type.parser.collada::ColladaDocument/generateScene()[J:\Code\minko-collada\src\aerys\minko\type\parser\collada\ColladaDocument.as:194]
at aerys.minko.type.parser.collada::ColladaParser/parse()[J:\Code\minko-collada\src\aerys\minko\type\parser\collada\ColladaParser.as:122]
at aerys.minko.type.loader::SceneLoader/parse()[J:\Code\minko\src\aerys\minko\type\loader\SceneLoader.as:189]
at aerys.minko.type.loader::SceneLoader/loadBytes()[J:\Code\minko\src\aerys\minko\type\loader\SceneLoader.as:173]
at aerys.minko.type.loader::SceneLoader/loadCompleteHandler()[J:\Code\minko\src\aerys\minko\type\loader\SceneLoader.as:116]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Doing the same thing without checking the "Use Object Instances" option works fine but the mesh geometry is repeated n times in the collada file and in the memory.
It looks like only only property applied is the color.
The ColladaParser has some problem in importing a collada file. It flips the Z. The 'hack' to fix the problem is set z scale to -1 and culling of the material to Front. It would be nice to have it fixed... the same problem happens in Minko Studio.
I've put vertex color in my collada file from maya and I can't get them in my application. I have only these 4 components for all my meshes :
id
x,y,z
nx,ny,nz
u,v
So, the RGBA component is missing from the application.
I made my test with the same file in Collada format and in Minko format and I have the same result.
Please see the details here : http://answers.aerys.in/discussion/209/using-vertex-color#Item_11
In line 100 of ColladaParser, a call to an unresolved method ("_options.dependencyLoaderClosure(...)") is done.
And in the helper NumberListParser, there is a wrong type coding issue, that it's impossible to compile properly. Line 222 : var matrix : Matrix4x4 = matrix = new Matrix4x4(
Some time ago I did this hack for alternativa but, looking at your source, I can't see how to repeat it here. Their parser was not really built for delayed processing, but they had one property that made it possible: they sorted collada into intermediate nodes tree with relevant portions of xml, and only after that traversed it to actually parse the data. Here, you have code like:
public static function fillStoreFromXML(...) {
...
var xmlGeometries : XMLList = ...
// this must not be in the same method:
for each (var xmlGeometry : XML in xmlGeometries) {
var geometry : Geometry = Geometry.createFromXML(xmlGeometry, document);
...
all over, so there is simply no opportunity to interrupt the process anywhere.
See comment on commit c2cfd33
something need to be fix at
result.get('//mesh[hasController(SkinningController)]')
to reproduce please use
http://hub.aerys.in/index.php/Minko:JointsDebugController_Example
error detail
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at aerys.minko.scene::SceneIterator/getValueToken()[C:\fork\minko\src\aerys\minko\scene\SceneIterator.as:195]
at aerys.minko.scene::SceneIterator/filterOnValue()[C:\fork\minko\src\aerys\minko\scene\SceneIterator.as:361]
at aerys.minko.scene::SceneIterator/parsePredicate()[C:\fork\minko\src\aerys\minko\scene\SceneIterator.as:328]
at aerys.minko.scene::SceneIterator/parseNodeType()[C:\fork\minko\src\aerys\minko\scene\SceneIterator.as:291]
at aerys.minko.scene::SceneIterator/initialize()[C:\fork\minko\src\aerys\minko\scene\SceneIterator.as:128]
at aerys.minko.scene::SceneIterator()[C:\fork\minko\src\aerys\minko\scene\SceneIterator.as:39]
at aerys.minko.scene.node::Group/get()[C:\fork\minko\src\aerys\minko\scene\node\Group.as:385]
at Function/<anonymous>()[C:\labs\minko-test\libs\minko-examples\src\aerys\minko\example\collada\astroboy\AstroboyExample.as:42]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at aerys.minko.type::Signal/execute()[C:\fork\minko\src\aerys\minko\type\Signal.as:75]
at aerys.minko.type.loader::SceneLoader/callLaterComplete()[C:\fork\minko\src\aerys\minko\type\loader\SceneLoader.as:213]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at SetIntervalTimer/onTimer()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Thanks
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.