- The clonk mesh and the test object mesh got exported correctly with Randrian's exporter. What is the difference from this exporter to the standard ogre exporter?
- I need to set "swap axis" to "xz-y" in the export dialogue. This is not in the tutorial.
I would be nice if anyone with Blender experience could get a hang of that file and maybe clear things up.
> The clonk mesh and the test object mesh got exported correctly with Randrian's exporter. What is the difference from this exporter to the standard ogre exporter?
Randrian's exporter is supposed to do some OC specific stuff. Applying rotation / scale (that's not exactly OC specific) and naming the files the right way.
> I need to set "swap axis" to "xz-y" in the export dialogue. This is not in the tutorial.
We recently changed the way the camera looks at objects because Ogre mesh viewers where always using a different way. The model definitely wasn't updated, so maybe that's not a general thing to do.
>except for Ringwaul and maybe Randrian have ever used it. Ringwaul set this up in a way no one else understands.
Nope, the other way round
>> I need to set "swap axis" to "xz-y" in the export dialogue. This is not in the tutorial.
>We recently changed the way the camera looks at objects because Ogre mesh viewers where always using a different way. The model definitely wasn't updated, so maybe that's not a general thing to do.
This does not apply to the clonk model, I have to do this with every model I create. I use the num-block-3 perspective in blender when modeling.
>The clonk mesh and the test object mesh got exported correctly with Randrian's exporter. What is the difference from this exporter to the standard ogre exporter?
As it is already mentioned, there is no big difference. Randrian kindly made few adjustments, which reduce the amount of error sources in the exportation-step to make them OC-viable.
I tried exporting the mesh only and using the existing skeleton, but this does not work either: The vertex coordinates are somewhat in the wrong position, so that the mesh looks a bit like a gorilla when the animation is applied. I can post screenshots later
When I select everything by pressing "A" in the 3D-preview, then the export fails with some errors in the exporter plugin, probably because a parent object is missing. I got it to work once by also selecting everything with "A" in the outliner view. Unfortunately my export settings were wrong, and I wanted to reproduce it, but could not. Do you have any advice for me?
Apparently it helps to select only the clonk in the outliner.
This did not help very much, though, because the same problem as last time persists: The clonks have very wrong vertex assignment or a wrong skeleton after exporting.
I tried decompiling the skeleton file of the OC 7.0 clonk to compare them, but that does not work:
20:52:11: OGRE EXCEPTION(7:InternalErrorException): Invalid file: version incompatible, file reports [Serializer_v1.80] Serializer is version [Serializer_v1.10] in Serializer::readFileHeader at ..\..\..\..\OgreMain\src\OgreSerializer.cpp (line 258)
Unfortunately, the only version of OgreXmlConverter.exe that I found on the ogre website has Serializer_v1.10. Where can I get a newer one? The ogre manual says something about downloading ogre and compiling it to get the .exe, but I do not want to do this.
>The skeleton contains animations, those are taken from Actions.txt, yes. In my test scenario I exported a Clonk and gave it its own definition, then I let my crew member take the graphics of that object with SetGraphics(). Then the vertex assignments are wrong, compared to the original clonk => the fingers and legs look warped, for example.
Sorry for asking so dumb. You definitely not moved the skeleton a bit? Probably clear Transformation with Alt+G in Blender to be sure.
My next approach would be to build the mesh that I want, export it with a dummy armature that is set up in the such a way that the bone names and vertex assignments correspond to the real skeleton. Then I'd export the Clonk with the dummy armature and replace the skeleton with the original clonk skeleton.
There has to be a better way though.
But if you try to make a skeleton working with the original clonk mesh, it might be the best to convert the original skeleton to .xml and copy its bone-declaration section and paste it into the new skeleton.xml that you exported. You might need to add the DummyRootBone (if its declared in any animation track) but if you add it at last it should have the least index which is not used anyhow else.
Animations for meshes other than clonks were no problem for me so far.
The problem that I see with your approach (simply exchanging the bone definitions) is: The mesh file contains the information what vertex is assigned to what bone. When I change those in the skeleton file only, then the vertices get assigned to the wrong bone and the model will still look warped. So, instead of manually adjusting all vertex assignments in the mesh file after exporting it, I suggested this. This cannot be the solution, though.
Someone exported the original Clonks and the export worked correctly for them, so it should be possible to reproduce this. All I want at the moment is exporting the original Clonk mesh + skeleton, insert it in a new definition, and see it work correctly.
>The problem that I see with your approach (simply exchanging the bone definitions) is: The mesh file contains the information what vertex is assigned to what bone. When I change those in the skeleton file only, then the vertices get assigned to the wrong bone and the model will still look warped. So, instead of manually adjusting all vertex assignments in the mesh file after exporting it
My solution was actually to handle the case you just discribed. By reorganizing the bone defninitions to the order in the original clonk skeleton to fit its vertex assignments, if you don't use the exported .mesh. Because you do, this approach is obsolete.
But then I don't get your earlier mentioned problem either. With your fresh exported mesh and skeleton all indices and vertex assignments should be fine. And the additional DummyRootBone doesn't change anything substantial. Can you give some more detail (maybe a screenshot or somewhat like that)?
As you didn't answer the question I posed while ago, did you have cleared the object transformation of the skeleton and the model? That shouldn't be crucial anymore (I remember Randrian fixed it in his exporter-mod), but it would be good to exclude that error-source completely. (Clear with Alt+G or Apply with Alt+A -> Location)
I only have some wild guesses in repertory or I could test a bit on my own if you give me the files, but I don't have much concrete advise left.
(__|__ |__|__|__) (__|__ |__|__|__)
(__|__ |__|__|__) (XX|__ |__|__|__)
and select the skeleton in Object mode and apply its location transformation (Ctrl+A -> Location). Then it should be fine.
As Zapper mentioned to get into the scarecrow position just select a bone in pose mode, select all with A twice, and do Alt+G and Alt+R and you should've cleared all the pose transformation (even though it might be not displayed correctly at first).
When I apply the location in object mode and clear rotation and offsets in pose mode, then still not everything is rest correctly, the skeleton still has some non-default pose.
Cleaned the "rings", too, maybe that helps.
Do I have to "apply pose as rest pose" of the skeleton in pose mode? Because it always skips back to the old pose whenever I finished exporting.
I think another problem is that there is still some kind of action selected when I export the clonk.
> it helped a little, but there is still something wrong.
What do you mean? Does the clonk now gets properly displayed ingame or not? Windmill shows me something plausible (only few errors, which I would assign to be meshviewer errors).
Anyway applying the pose to rest would only cause more problems.
Are the options "Only Animated Bones" and "Only Deformable Bones" enabled in the export panel?
If so, that looks for me like a bug I have all the time too (just made a new model few days ago, where I guess animations haven't been cleared from empty transformation data, which leads to these static overrides of animations and incapability to blend). I did contact Randrian, who says from himself that it works all fine on his machine. Sadly he didn't find it out in the time he was able to spent.
Talking about clonks, you have set up your Actions.txt?
Then I open stuff as it is in the repository: /models/Livings/clonk/ClonkOpenRevolution.blend, Actions.txt is unchanged.
I did not change anything, because I just wanted to export what I thought to be a working model. That blend file already has this strange setup when I open it. The files that I attached are my attempts at fixing the model. So, basically you have all the information that you need to replicate my problem from the first step.
"Only Deformable Bones" and "Only Animated Bones" are deactivated in the export panel. In the tutorial I did not see an example how the export panel should look like, so I set it up the same way as in my previous blender.
- Removing the ik goals and shape targets helped a little bit.
- Solved that, too: Export coordinate systems were wrong. I use [xz-y] usually, have to use another one.
In order to fix this and to be able to create new animations in the future, I tried to re-export the clonk meshes. I pushed this to a new branch: https://git.openclonk.org/openclonk.git/shortlog/refs/heads/clonk_re-export
This is what I have installed:
The newest version of Randrian's exporter (at least I hope so but it says 0.6.0).
Ogre Command Line Tools, but I guess, only the XML Converter is needed.
Python 3.5 (but I guess that newest version is fine)
ck's mesh converter tool
This is roughly what I did:
Make the layer of the desired skin visible
Make the layer of the armature visible (don't know if this is necessary)
Export it, the standard procedure with the exporter
Run mesh-converter.py over the .mesh and .skeleton file
+ for the Alchemist and Steampunk skin:
Manually edit the .mesh file in a text editor (Notepad++ or something that doesn't fuck it up) so it does use 'Clonk.skeleton' instead of what it was before (the .skeleton file link being one of the few plain text parts of the .mesh file)
+ for the Farmer skin:
The UV Image is pointing to a location on Ringwaul's pc. So I did edit the texture to point to the correct file (which should be "//..\clonkFarmer\clonkFarmer.png")
Removed the empty material
Object > Apply > Make Duplicates Real (Shift Ctrl A)
Do the same than with Alchemist/Steampunk: edit the .skeleton link.
This post is meant to collect problems with the new exports and attempt to gradually fix those and hopefully make the clonk exporting process more smooth.
Problems that I saw so far:
The eyes are often closed now. Before, the eyes' bones were often tied into the animations (this is probably a good thing, to decouple eyes from other animations).
Some animations have shifted positions (KneelDown but maybe more).
It looks to me as if some bone positions differ (when aiming e.g.).
With the steampunk skin, there are a few arm polygons / vertices wrongly connected.
The farmer skin is still broken because the hair isn't really properly connected to the mesh (probabyl something with those duplicates?) but I don't know how to fix it.
This is either in the resources repository, or in my fork of it. I'll go online in IRC in about half an hour, so maybe we can try it together.
Did not upload this to the normal resources repository (it is there in my local repository, on branch "marky"), but I also added it to my github: https://github.com/gitMarky/OC_Resources/tree/master/models/Clonk
Differences to your export:
- cleared all transformations on armature and CONTROL_body in pose mode. This should reset the Clonk to the scarecrow position (select the layer with the Clonk, select object mode, press tab a few times (or make the CONTROL_body layer visible))
- Yes, farmer needs this apply duplicates stuff, did not do that, so I did not export it.
- Selected only the meshes in the clonk skin layer, export still worked fine
Unfortunately, I have problems, too, with the current system to export the Clonk. Somehow my attachment-bones are rotated around 90°, i.e. the tools like the backpack are rotated by 90° while the Clonk is displayed right.
Maybe this is a problem with ck's orientation change.
I exported the skeleton with "xz-y" settings.
A general note on the setup of the rig. I tried to make the rig easy with the use of IK-Helpers, e.g. that you just have to place the hand and the arm follows automatically. That now seems to complicate things a great deal...
The idea of my implementation of the Actions.txt was to define a bit which bones should be exported for which action, to allow for blending between different animations, e.g. aim while walking. Most other models and rigs don't use much of that functionality. Maybe we need a more detailed tutorial on how to use the Clonk's blender file and how to export it properly.
(Or e.g. to export just one animation, in case you want to #appendto the skeleton)
Exporting just one animation should be in principle easy, as you just have to define an Actions.txt with one animation and export it. But yes, more documentation should help here.
I was quite surprised, to see my feature wish with the appendto animations implemented, I didn't remember it was already implemented on my feature request.
I work a lot with the OGRE .xml files and using the original skeleton without animations for new Clonks. On Clonkspot there are some examples in the Hazard and Clonk Mars threads.
Did we have a exported clonk yet after the changes from ck?
I can get a good exported Clonk with animations, but the attached Items are rotated by 90°. And the bone order is different, causing other meshes to be broken with my exported skeleton.
So is there something different now how mesh appends are handled? has there been at some point an additional rotation around 90° when attaching?
Also I noticed that someone removed the "RESET" animation in the clonk, that my exporter used to reset the pose before exporting an animation. Also my fault, because I documented it nowhere that this animation is important....
What do you mean with "newer version" of the exporter? The Ogre Exporter from the ogre page or the Clonk Ogre Exporter for Blender I wrote (or at least modified)?
So I can export the Clonk with my Clonk Ogre Exporter version (the one from my bitbucket repository) with the xz-y transform and the mesh and bones is right. There isn't by any chance a possibility to visualize bones in Clonk?
@years ago: I wasn't active for clonk some time, and found out that my old stuff for Harkon didn't work anymore, the I had to reexport all the models (didn't find ck's convert script).
The clonk was never successfully reexported after ck's change, no.
And also what Marky said: your exporter does add an additional bone called "DummyRootBone" to every exported skeleton. I don't remember why but it was done to fix something and the fix worked fine? (was it something about bone/vertex groups?) However, this means that the newly exported skeleton has one additional bone compared to the old one which will most likely cause a few problems. You could of course add another option to the exporter to not include this bone or removed it manually from the skeleton file (but I'd rather have a setup where the clonk exports fine without editing afterwards).
I didn't check the tools though. Maybe this will be fine if we just rotate the bones in the .blend file.
Sometimes it inserts stuff into the .material file that the engine can't handle.
tex_coord_set = 0to be specific. I made a bug report for that: https://bugs.openclonk.org/view.php?id=2010
Another problem with materials is that when you export an object with a uniform material without texture, you get the error
Element 'vertex' does not contain 'texcoord' childfrom the engine.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill