Page 1 of 1
Import?
Posted: Wed Oct 08, 2008 9:13 pm
by Kjell
Has anybody been able to import meshes containing vertex color data?
K
Posted: Thu Oct 09, 2008 6:03 am
by VilleK
Kjell,
The Bart Simpson head from
http://www.klicker.de/human.html contains vertex colors.
/V
Posted: Thu Oct 09, 2008 1:23 pm
by Kjell
Hej Ville,
I'm afraid not, that Bart model uses a multi-material ( multi/sub-object ).
K
Posted: Thu Oct 09, 2008 2:00 pm
by VilleK
No it is a single mesh. From wolfandbart.zgeproj:
Code: Select all
<Group Comment="Imported from bart.3DS">
<Children>
<Group Comment="Meshes">
<Children>
<Mesh Name="BartMesh0" Comment="head2">
<Producers>
<MeshImport HasVertexColors="1">
and
Code: Select all
<Model Name="BartModel" RotationVelocity="0 -0.1 0">
<OnRender>
<RenderMesh Mesh="BartMesh0"/>
</OnRender>
</Model>
Or do I misunderstand what you mean?
Posted: Thu Oct 09, 2008 2:12 pm
by Kjell
Hej Ville,
It's a single mesh indeed, but the color information seems to come from 3 separate materials ( Yellow Plastic, Black Plastic and Default ) instead of from vertex color data baked into the mesh.
K
Posted: Thu Oct 09, 2008 2:26 pm
by VilleK
Oh, I see. Maybe it is a problem with the importer then.
If you have a 3ds-file with colors that doesn't work, post it here or email so I can debug it.
Posted: Thu Oct 09, 2008 3:13 pm
by Kjell
Hej Ville,
Actually, to be honest .. I'm not sure if the .3ds file format supports data such as vertex colors. I'll try to look it up, must be somewhere on the Autodesk site .. even though they don't support the format anymore.
K
Posted: Fri Oct 10, 2008 5:07 pm
by Kjell
The .3ds file format doesn't seem to support vertex color, alpha or other channel data. Perhaps the "Import Vertex Colors" flag could be renamed to prevent further confusion?
K
Posted: Sat Oct 11, 2008 2:42 pm
by VilleK
Perhaps we should allow a MeshExpression to set Vertex-colors? That way it would be possible to assign colors after a import.
Posted: Sun Oct 12, 2008 3:20 pm
by Kjell
Hej Ville,
While certainly better then nothing ( and even useful with procedurally generated meshes ), it kind of defeats the purpose of importing vertex channel data, where one generally either uses paint tools ( difficult to reproduce through code ) or bake complex light simulation results into the meshes to prevent doing these kind of calculations on the fly / in real-time.
But again, certainly a useful expansion for the MeshExpression component ( this.C.R/G/B/A ? ) when dealing with procedural Meshes.
K
Posted: Sun Oct 12, 2008 5:28 pm
by VilleK
I agree it does not solve the problem but since it is useful in other areas I will add colors to MeshExpression for next beta release.
I guess we need to look again at importing other file formats than 3ds. I knew it was old when I wrote it, but it was the easiest to implement and it works for simple models.
Posted: Sun Oct 12, 2008 10:54 pm
by Kjell
Hej Ville,
It used to be the industry standard, and it never was a bad format to begin with, so I can understand your decision .. but I guess using 3D software ( XSI ) that can't export .3ds files to begin with makes the process of getting content into ZGE a little more painful
By the way, some of the User Cases from the Japanese Softimage site have recently been translated into English. Anyone interested in some behind the scenes treats from games such as Metal Gear Solid 4, Ninja Gaiden 2, Yakuza 3 or Lost Planet, visit their
site.
K