The place to post mesh,and animation related hints and problems.

Blender Exporting and Animation

Blender Exporting and Animation

Postby necdel » 14 Dec 2012, 05:05

Ok, I am no artists, but I created a tentacle monster in Sculptris, imported to blender, made rigging, did an animation, and exported it with blender2ogre. I did get an error with the exporter, something about OGRE not supporting vertices being on more than 4 bones. No clue how to fix this or anything yet, so not even sure if the animations will work in the engine. However, my mesh imported successfully into the engine, albeit rotated 90 degrees on the X axis. I believe this is an issue with the blender plugin though. From reading the other posts here, is there no way to define what frames my animations are on at the moment?

Just seen in the documentation that you guys weren't sure about the blender2ogre thing working for the engine yet. Thought I would go ahead and take the initiative to try and get it tested. It appears that it will work fine, for someone who knows a bit more about what they are doing with models and animations hah.

I can upload the blender file if anyone would like, or the files it exported. I only have like 5 hours of work total on the model (literally first mob model I have done myself). I was upset at first when i realized my monster had 60k vertices at first, had to go back and got it down to 3800, loosing all my time making it look nice in Sculptris :D

Here is a pic of it imported to the engine.

Image
necdel
Skyline Apprentice
 
Posts: 20
Joined: 13 Dec 2012, 16:05

Re: Blender Exporting and Animation

Postby StarFire » 14 Dec 2012, 09:52

Welcome to Skyline necdel :D

Thank you for experimenting with the blender to Skyline solution, its very good to see there is a working export option available.

vertices being on more than 4 bones, No clue how to fix this or anything yet

This is very common among engines and does not generally pose a problem. As for preventing the error from showing we are not currently sure.

so not even sure if the animations will work in the engine

Skylines animation system require the time line to have the animation frames added in the modeling package and then Skyline will locate these when added to the scene.

realized my monster had 60k vertices at first, had to go back and got it down to 3800

Yes that's the problem when sculpting, the polly's increase rapidly. The secret here is to create the high polly version then render a normal map from this high polly version. Add this new normal map to a low polly version and then all of you work was not in vein as the shader will make the low version look very good in the engine ;)

albeit rotated 90 degrees on the X axis

You could try exporting with Y up, a little experimentation here will fix this.

keep us posted on your progress as this will help others :D
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Blender Exporting and Animation

Postby StarFire » 14 Dec 2012, 17:40

Vortex has kindly found another exporter that may work for your export.

viewtopic.php?f=5&t=133&p=571#p571
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Blender Exporting and Animation

Postby necdel » 14 Dec 2012, 18:42

Skylines animation system require the time line to have the animation frames added in the modeling package and then Skyline will locate these when added to the scene.


So when I emport my .mesh, the engine should see the frames i made in blender automatically? Is there somewhere on the engine to see this? I was looking at one of the tech demo's, I think it was the wandering NPC one, and all I seen was a reference to a "walk" animation in there, I couldn't find where that was defined at.


Yes that's the problem when sculpting, the polly's increase rapidly. The secret here is to create the high polly version then render a normal map from this high polly version. Add this new normal map to a low polly version and then all of you work was not in vein as the shader will make the low version look very good in the engine ;)


Well.....I wish I would of thought about doing that before I destroyed it going to low poly. Back to the drawing board for round 2! If I ever get this all done I will upload it as a preset or something to share with everyone.

One more quick question, when I export using the blender2ogre, I get like 5 files, a skeleton xml, .skeleton , .mesh, mesh .xml, and a .scene. The only one neeed for the engine is the .mesh correct?


Thanks for the other post, will try it this time around.
necdel
Skyline Apprentice
 
Posts: 20
Joined: 13 Dec 2012, 16:05

Re: Blender Exporting and Animation

Postby StarFire » 14 Dec 2012, 20:04

So when I emport my .mesh, the engine should see the frames i made in blender automatically? Is there somewhere on the engine to see this?


Yes it is contained in the scene entity property - "Set Anim" please see image for reference:

Image

Well.....I wish I would of thought about doing that before I destroyed it going to low poly. Back to the drawing board for round 2! If I ever get this all done I will upload it as a preset or something to share with everyone.

Thank you that would be great, you can never have too many assets ;)

when I export using the blender2ogre, I get like 5 files, a skeleton xml, .skeleton , .mesh, mesh .xml, and a .scene. The only one neeed for the engine is the .mesh correct?

Skyline uses the *.mesh, *.skeleton and *.material which then can be converted to an advanced shader via Skyline Material editor.

good luck with your next tests ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Blender Exporting and Animation

Postby necdel » 14 Dec 2012, 23:39

Awesome! So I did a new model today, kept the high poly around this time. Figured out how to do normal maps, texture, and all that jazz. So this is what I have ended up with so far.

Image
Image

Looks so much better with that normal map, thanks for that. I did give the other Ogre exporter a try that you mentioned, it did not work for me, it kept erroring out in blender. I went back and used the original one blender2ogre and set the -y like you suggested, it imported perfect into the engine, except my material isnt showing up. I am sure the material issue is on my side and not the engine. Will keep this thread updated until I get everything imported with animation.

*EDIT*

Ok the material imports fine... I didnt have it in the same folder with the model! Animation time now.
necdel
Skyline Apprentice
 
Posts: 20
Joined: 13 Dec 2012, 16:05

Re: Blender Exporting and Animation

Postby SolarPortal » 15 Dec 2012, 09:44

cool, looks like it is going well :D
i look forward to the results
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Blender Exporting and Animation

Postby necdel » 15 Dec 2012, 10:02

OK, I finally got everything working... took me all day to get this straight.

First off, I applied the diff to the blender script located on the official forum post here

http://www.ogre3d.org/forums/viewtopic.php?f=8&t=61485&sid=efd641d40098ca8bc71fc9e287168e12&start=650

I can not say 100% if this is required or not, I didn't realize what all I was doing wrong. I got Ogremeshy from here

http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Ogre+Meshy

This is so I could view the model/bones/animations/ quickly after exporting to see how Ogre was seeing it.

The first problem I had was the script erroring out saying my armature was rotated or scaled.

This was fixed by going into object mode, pressing A to select all, then pressing CTL+A and selecting location/rotation/scale. This zeroed everything out and is what was required to get my skeleton to export in the proper position.

Next my animations I had set as two different actions. This was causing a large empty set of frames in each animation. To fix that I created a NLA track in blender and put both the animations on a single track with their proper names.

Finally my export settings to get everything exporting correctly as far as I can tell, in the export options after selecting export to ogre, the following are what I have checked,

    copy shader programs
    swap axis: xz-y
    Export Meshes
    Export Meshes(overwrite)
    Armature Animation
    Trim Weights:0.014 (I raised this to get rid of the warnings about vertices being attache to too many bones for Ogre, this may not need to be touched in your model)
    Export Materials
    Tangents
    Reorganise Buffers
    Optimize Animations

Any of the other number settings I did not change from the default if I didn't mention them.

That looks to of gotten everything in there. I will note that my normal map does not look quite as good in the exported version as it does in Blender. Like I said previously, I am no artists, so I do not know if this is normal behavior for models to be slightly less details once exported. The material also doesn't retain its shine. I am sure this is something that will be easily fixed with the engines built in material editor. Haven't see any engines that maintain the look the blender materials, so I assume this is also normal behavior.

As it stands right now the model has around 13k vertices, is this too much to be useful for you guys? If so I will down scale it some more before posting it to the forums.
I have an idle animation and an attack. The idle could be used for moving the character too probably.. My first animation so go easy on me :)
necdel
Skyline Apprentice
 
Posts: 20
Joined: 13 Dec 2012, 16:05

Re: Blender Exporting and Animation

Postby SolarPortal » 15 Dec 2012, 10:26

finally blender to skyline has been solved. Thanks very much for all the information :D

To Get normal maps and higher specular, you can use the material editor to achieve this.
See this Doc: https://learn.aurasoft-skyline.co.uk/doku.php ... rialeditor

When working with skyline, you can quickly update your Model/Materials/Shaders/Textures in the scene without closing down by pressing this button with a SceneEntity Selected:
Image
This is part of the Rapid Prototyping system that we are building for skyline.

All Assets the community creates is welcome, as we want skyline users to have something to play with in the engine without having to create their own until needed.

Good work ;)
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Блендера и Экспорт Анимации

Postby ant0N » 15 Dec 2012, 10:47

using the FBX will greatly facilitate our work... look at how to integrate FBX in Gamestart3D http://gamestart3d.com/wiki/index.php?t ... _GameStart
User avatar
ant0N
Skyline Moderator
Skyline Moderator
 
Posts: 415
Joined: 02 Nov 2012, 12:49
Location: Россия, Москва
Skill: Programmer
Skill: 3D Modeller


Return to Mesh + Animation

Who is online

Users browsing this forum: No registered users and 3 guests

cron