Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Blender 2.48a to Dbpro - Tutorial

Author
Message
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 20th Apr 2009 06:00 Edited at: 20th Nov 2009 01:47
Hey guys,

I was already updating the old Blender2Dbpro thread, but it seems to have been culled by the powers that be. Here, I shall start the new thread. The old thread was a few versions behind the current Blender release, and wasn't collated very coherently. I will be writing a tutorial/guidelines for getting an animated model from Blender to Dbpro in this thread in an easy to read/implement manner. It isn't really that hard to do, but I will try to be as exhaustive as possible, and use a butt-load of images.

I will update this first post as I go, updating the tutorial here.

Regards,
Greenlig

------------------

In this tutorial, I will be taking you through the process of making a simple model in blender, with an Armature system(bones), that will export to Dbpro. The model will be necessarily simple, but the principles and methods behind the export will be the main focus. Let us BEGIN!

Open Blender.

When it loads, select everything in the scene by pressing 'a' twice.

Since the cube is selected by default, pressing 'a' once deselects it, and again selects all.

Now delete the selected objects by pressing 'x'. It will throw up a small dialogue asking "Erase selected object(s)?" - Click it. What we want is a clean slate for exporting your model.

Now, with the mouse over the 3D view, press spacebar so the menu pops up. Navigate to 'Add -> Mesh -> Monkey'. Click Monkey.

This will create the Monkey primitive (Suzanne is her name) that we will be using for the exercise.

Suzanne will be selected, so now we want to rotate her so she faces the front view. Just as a side note, at the moment, we are viewing Suzanne from the top viewport. There wont be any problems editing the object from here, but I always like my models to face the front. There is an option to compensate for this rotation in the exporter, so lets just rotate Suzanne so she is facing the front.

In the current view, press 'r' then 'x'. Now type '90' and left-click.

This will rotate Suzanne('r') along the X-axis('x'), by 90 degrees. Left clicking always finalizes an action. If you don't want a rotation or transformation that you have just keyed in, try right clicking instead. That will cancel the operation.

Now navigate to the side-view by pressing '3' on the number pad.


In the side-view, left click at the base of Suzanne's chin. This will set the cursor(little red sight) at the base of her chin.

Press the spacebar again, and navigate to "Add -> Armature". This will add a bone system, creating it at the cursor.

The bone is obscured by Suzanne at the moment, so we need to make it X-Ray. In the Edit tab which will be open beneath the 3D viewport, select the option "X-Ray".

If you haven't randomly clicked the left mouse button at this stage, the bone should be centred in Suzanne's head. You can check by flipping between the front(1), side(3), and top(7) views on the numberpad.

If it isn't centred, you can fix that by pressing 'g' in whichever view, and lining it up with the middle of the model. 'G' is the Translate tool, and will let you re-position the currently selected item.

With the Bone now selected and positioned correctly, go into the side-view(3 on Numpad), and press Tab to go into edit mode.

We want to add another Bone to this system so we can animate the head. The animation will be wonderfully poor, but it will be animated!

Now, with the uppermost Bone point selected automatically, press 'e' to extrude a new bone. Move it so it roughly goes back with the shape of Suzanne's head. Left-click to confirm the new bone creation.

Now, press Tab to leave edit mode.

The model should be ready now for parenting to the bone. One thing though, to make sure everything is ready, select Suzanne by right-clicking her, and press 'CTRL-A'. The "Apply Object" menu will come up, with "Scale and Rotation to ObData" selected. Click on that.

Our rotation moved it from 0 degrees on the X-axis to 90 degrees, and this will now set the current rotation to 0 degrees. It can save a lot of hassles further on with animation.

With Suzanne selected, hold down SHIFT and Right-click the Bone system, selecting both.

Now press 'CTRL-P', selecting "Armature -> Create From Bone Heat".

Your model should now have the bone system parented to it. The bone heat method is a really easy way of skinning objects. It works very effectively with almost all types of models, and requires very little tweaking. For our purposes, it is perfect. The main benefit of this method is, however, that all the vertices are assigned to a bone. One of the stipulations of Blender2DBpro exporting is that you need to have all the vertices assigned to a bone. If this isn't the case, the export will fail. Bone heat makes sure that all are selected. Isn't that nice?!

Now select the Bone system with a right-click, then press "CTRL-TAB". The will get you into Pose mode. Select either of the bones and rotate them. The base bone should rotate the entire mesh, and the top bone should just rotate the back of the head. Your model is now ready to be animated!

To Be Continued...and images added when I screen cap them all!

PART TWO


OK -

So, if you followed all the steps in the first post, you should be at a stage something like THIS.



I have split the viewport so that you can see the front and side views, you don't need to do that just yet. Navigation can still be done with the Numpad.

NOW, we are going to animate Suzanne very simply. I am not doing a tutorial about animation in Blender(just yet), so expect just a rotate or two. Also, I think video tutorials are much easier, so I might get a mic and work on that.


ANIMATION


GO TO THE SIDE VIEW BY PRESSING "3" ON THE NUMPAD


Select the armature by right-clicking it.
Now, if you haven't already, go to pose mode by pressing "CTRL-TAB". You will know you are in pose mode because the bones will have a light blue outline.

There is a little slider along the bottom of the viewport.



Make sure that is set at "1". Not critical to an export, but it makes sense to start your animation at frame one!

Ok, now select BOTH bones, either by "SHIFT-RIGHT CLICK" or pressing "B" and border selecting both.

With both selected, and the slider at "1", press "I". A menu will appear for what you would like to keyframe. You will see a lot of options, but we are only going to chose "Rot", the rotation option.

Once clicked, the selected bones should now be completely blue.

Now, we want to move forward twenty-one frames, and key another position. You can either drag the frame slider to go forward, click on it and enter the number manually, OR, you can hit the arrow-keys. The up-arrow key will go forward in ten frame increments, and the right will go forward in single frame increments. Press the "UP-Arrowkey" twice, setting the current frame to "21".

Now, we want to animate this guy a little. Select the top bone only, with a right click.
Press "R" to rotate the bone anywhere you want. I suggest getting a good deformation of about 45 - 60 degrees in either direction. It doesn't really matter, as long as you can see it deforming.

When you have rotated it enough, left-click to apply that, then press "I", and select "Rot" again.

Now, if you grab the slider, and scroll through the first twenty-one frames, you should see the model deforming very nicely indeed. It's a simple and crap animation, but it will export just fine.

Now, we need to set the frames to export. Navigate to the Render tab by pressing "F10". You will see, about half way along, a big button with "ANIM" on it.



Beneath that, there is a little box with "End: 250" in it. That is the frame to export to. We need to change that to "21". Select it with a left click, and type in "21".

Now, we need to split the screen for the export to work. If you hover over the line that splits the button panel from the viewport, you will notice the cursor change.



Right click on the line and select "Split view". A line will appear in the viewport above, showing where you can split it, just split it down the middle.

Now you have two viewports looking at the same thing. It doesn't matter what the second viewport is doing, as long as it shows the 3D model, the export should work.

I just remembered something else. When blender exports a .X file, if you don't have a material applied, it will render as white, with no shading. To fix this, we need to go to the Materials Tab by pressing "F5". Now, select the MODEL, not the armature, by right-clicking on it. The material tab should show there is no assigned material. There will be a little button there that says "Add New". Press that button.

That is all you need to do in the materials tab. It will give the mesh a base colour and make it able to be shaded in DBpro.

We are almost done now! Your model should already be selected in the viewport, but if not, select it with a right-click. MAKE SURE you are on frame "1".

Now, in the top menu, navigate to "File -> Export -> Direct X" and click on it.

In one of the viewports, a dialogue should be presented. It will take up the whole viewport. There are several buttons available, but all we need to select are "Anim", "Swap zy", and "Flip z". Nothing else needs to be changed in that dialogue. Select "Export All", and navigate to where you want your model placed, then press "Export Direct X". Also, very importantly, press "Exit" on the export dialogue once it is finished (about 1-2 seconds).

Your model should now be fully exported.

The code I use to test models is very simple.



Fire up DBpro, and test it.

THE KEY THINGS TO REMEMBER WITH EXPORTING


- Make sure when rigging that all vertices are assigned to a bone. Bone heat automatically does this.

- Make sure you have two viewports open when you export.

- Make sure the model has a material.

- Press "Exit" in the export dialogue after each export.

So, after too long, I have finished it, and have a few images I need to add yet, but they have all been screen-capped so it shouldn't be long.

Sorry again for the wait, I have had a pretty tough year so far, and didn't have the energy/motivation to do much 3D I'm afraid!

Please let me know if you have any problems with the tutorial.

Cheers,
Greenlig

Alucard94
18
Years of Service
User Offline
Joined: 9th Jul 2007
Location: Stockholm, Sweden.
Posted: 20th Apr 2009 20:16
I really do think that they should have kept the old one up there. Ah well, looking forward to this one.


Alucard94, the member of the future of the past.
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 21st Apr 2009 07:12
Updated...more to come tonight, with images and hopefully the last part involving the exporting

Greenlig

Blender3D - CS3 - VISTA - DBPro
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 13th Aug 2009 09:28
Is this still progressing? I think it's a wonderful concept for a tutorial, but right now it's missing the actual exporting.

Would be great if greenlig could find the time for a continuation!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 13th Aug 2009 22:37
I second that, entomophobiac! (How did I miss this?)



leo877
18
Years of Service
User Offline
Joined: 6th Mar 2008
Location: san antonio, tx
Posted: 20th Aug 2009 11:48
have anybody check out the dummies book.. blender for dummies.. ita good book to check out.
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 3rd Sep 2009 14:11
I've read "Blender Essentials." It's really how I learned Blender at all, given its quite unique interface. Paired with a few YouTube tutorials I saw and the Lynda.com "Essential Training."

But none of it deals with the GDK/DBPro. That's why a continuation of this tutorial would make me happier than Darth Vader in a strangling contest.
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 6th Sep 2009 02:09 Edited at: 6th Sep 2009 02:09
Sorry guys!

I went back to uni, and got very busy! Sorry for forgetting this guys. I will try to get it done, but I have a lot of assignments piling up. Who knew games degrees would be so busy??

That said, the process isn't that hard, I'll just have to find the time to do it.

Greenlig

Blender3D - CS3 - VISTA - DBPro
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 6th Sep 2009 18:37
Games degrees? Sounds interesting. Please explain a bit more. Some kind of artistic degree, game design or what, more exactly?
Azunaki
17
Years of Service
User Offline
Joined: 11th Feb 2009
Location:
Posted: 6th Sep 2009 20:48
probably game design in general.

[url]http://myportfolio.x10hosting.com/[url]
visit my site.(still in progress)
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 7th Sep 2009 08:02
It's a Bachelor of Games Design. It focuses on teaching design, art, and programming in such a way that enables the graduate to become a Technical Artist. That is, someone who sits between the art and programming teams and tries to maximise art fidelity, while keeping the program efficient. I worked as a technical artist at www.infinite-interactive.com for 4 months. It's a very cool job

I am in Australia, so anyone looking to do a degree in this HERE, please, check out www.griffith.edu.au and look for games design. It's cool
/endplug


Greenlig

Blender3D - CS3 - VISTA - DBPro
Kagekiyo
16
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Melbourne , Australia
Posted: 7th Sep 2009 15:37
@ greenlig
Griffith do some really good course.

yest down here in Melbourne there is the (Acedemy of interactive entertainment)
http://www.aie.edu.au they also have some very cool courses ,some of which are online. ( I am with them at the moment for my Games programming course)

Btw , that tutorial is very useful
I don't know about you but i am really looking forward to getting my hands on the new blender when it comes out.

peace.
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 25th Sep 2009 11:26
Just bumping this thread, because I could definitely use some tips on exporting from Blender. I seem to have a lot of random trouble getting anything useful out of the program and would definitely benefit from someone else's experiences from meddling to figure it out.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 25th Sep 2009 17:16
Well, what I know is that static meshes with or without UV maps can be exported with Blender's DirectX exporter without any trouble, it's just animation that gets messed up.



greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 27th Sep 2009 01:24
OK tomorrow is the start of a week off for me, so I will do it. First thing tomorrow, I will try to get it done. Sorry for the delay guys. So many assignments!

@Kagekiyo - How far through are you, and how good is the course?

Greenlig

Blender3D - CS3 - VISTA - DBPro
Kagekiyo
16
Years of Service
User Offline
Joined: 4th Aug 2009
Location: Melbourne , Australia
Posted: 27th Sep 2009 13:32
Greenlig :
it has been about 12 months, almost finished it now.

doing more with them next year as well.

the course has been very good for a beginners course geared towards getting you into their full on games programming course.

Teaches a lot of things that are relevant to the industry ( which makes sense considering They are there to get you into the Games industry.)
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 19th Nov 2009 09:37
Justing bumping this, again, as I would have 8 tons of use for a tutorial like this one.

I'm using only Blender for graphics, at the moment, and am having some trouble exporting .X-format from it. That's why I keep bumping this.
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 20th Nov 2009 01:42
Tutorial finished, now adding some screen-shots.

Sorry about the wait.

greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 20th Nov 2009 01:42
And another..

greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 20th Nov 2009 01:43
Two to go...

greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 20th Nov 2009 01:43
Final one... Sorry about the multiple postings.

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th Nov 2009 01:53
Sweet! I'll be trying this soon .

entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 22nd Nov 2009 18:54
Massive kudos to you, Greenlig! And sorry for bumping this over and over again. It's just that it's exactly the stuff I need. =)
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 23rd Nov 2009 07:54
It worked then? If there are any issues, let me know here!

entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 24th Nov 2009 11:01
As far as I can tell, it works. But I haven't started exporting animations to any great extent yet. I'll likely come back to you with questions if I run into anything.
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 24th Nov 2009 13:25
Thanks Ento, good to hear it works. Good luck with more complex animations, they shouldn't be too much of a hassle.

Also, with Blender 2.5 coming out tomorrow, this tute may need a bit of a re-write.

Greenlig

bg38
16
Years of Service
User Offline
Joined: 28th Oct 2009
Location:
Posted: 30th Nov 2009 05:45
I just tried your tutorial here and successfully did the x. animation import in blender the first go
cool. thanks a lot for taking the time to do this
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 1st Dec 2009 21:30
Blender 2.5 doesn't seem to have any .X export capacity at all, out of the box. But a lot of people use the format, so I imagine that it'll be solved in the longer run.
Quik
17
Years of Service
User Offline
Joined: 3rd Jul 2008
Location: Equestria!
Posted: 1st Dec 2009 21:37
Blender does have it, doesnt it?.. or is that my imagination?! iam pretty sure it has


[Q]uik, Quiker than most
SJHooks
16
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Where you least expect me...
Posted: 2nd Dec 2009 02:27
If not, then it could alway be replaced by exporting the model and animation to a different file type, then importing it back in to another program that has a good .x exporter, and then re-exporting as .x, but that sounds terribly complicated if you are making several models and animations, so I'd rather cut out the middle part and just go straight from blender to the .x file . Anyways, it's really generous of you to make this tutorial Greenlig, I've been procrastinating on how to animate in blender for an exceedinly long time. Thanks, I'm going to make some hands and use my old gun model, and try it out.

Typos, they can't live without me.
leo877
18
Years of Service
User Offline
Joined: 6th Mar 2008
Location: san antonio, tx
Posted: 2nd Dec 2009 05:18 Edited at: 2nd Dec 2009 05:20
i have try blender 2.5...it doesn't have x export yet..... on the blender website theres a little graph that show blender2.5 alpha to 2.6... i think right now they doing in it stages.. i think 2.5 can export to 3ds format...dbpro should load 3ds files.....

my question is :would this tutorial work with 3ds as it does to xfiles? old computers sucks
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 5th Dec 2009 23:58
I'm having a lot of trouble with animations, actually. Meshes work fine following the instructions, but whenever I try to export with animation, the content I get from Blender is completely broken.

When I was in school, using Maya, I remember that a limitation of the .X format was that no vertices could be affected by more than one bone. I also remember there were ways to set this up beforehand in Maya, so that it was automatically done that way.

Is there a similar option in Blender? And what other things are necessary to think of, apart from the fact that all vertices must be assigned to a bone in the first place?

Any ideas about best practices for DBP/GDK animation exporting are extremely welcome! Especially Blender-related, of course.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 6th Dec 2009 00:17
I've done multiple bones to a vertex from CharacterFX to DarkBASIC in .X format before and it works great. Maybe it's changed?

entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 6th Dec 2009 11:22
In that case, maybe I'm doing something wrong. Or there's a limit to a vertex' number of influences? The export from Blender seems to function properly, but read into the GDK, it becomes corrupted. It loads, but looks like a random pile of vertices and not how it should look.

Any ideas?
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 6th Dec 2009 11:43
Checking it in the DX viewer, I can see that it doesn't work there, either. I have also been looking into using weight painting rather than "Bone Heat Weighting," as suggested in the tutorial, but haven't had the time to make a first implementation yet.

I'll return here with results, once I have any.
entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 6th Dec 2009 23:20
So, after having tons of trouble even following the animation parts of the tutorial with a model of my own, I completely reinstalled Blender (2.49b) and did the tutorial again, from scratch.

It worked.

All I can say is this: don't tweak Blender with custom scripts of any kind, if you don't know exactly what they do.

Great tutorial, Greenlig! I think I'm finally on the right track, after a weekend of cursing.
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 7th Dec 2009 10:38
Hey guys, I just drove 2200km and moved house/state, so I have been out of things for a while.

Glad to see the tutorial worked for most. Blender 2.5 wont have exporters for a while, as it is being released in steps. I will still be using 2.49b for everything till 2.5 is stable enough.

I don't use DGDK, so I don't know what the go is there. In the tute, I suggested Bone heat as the easiest way to get the results, but simply applying the vertexes to a bone is also a possibility. On complex models, weight painting is good, but simple models works fine with just applying the vertex to a bone.

Greenlig

entomophobiac
23
Years of Service
User Offline
Joined: 1st Nov 2002
Location: United States
Posted: 7th Dec 2009 11:43
DGDK and DBP are the same, internally. At least that's the way I've figured it. Whatever works with one also works with the other.

I'm on track now, anyway. Thanks for a great tutorial!
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 7th Dec 2009 12:09
You're welcome ento.

hookkshot
19
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 20th Dec 2009 21:12
ok ive attached my file all rigged and animated. no matter how i try i cannot get this to work in db pro its a simple rig and animation so it should work.

So if anyone can get this to work i would be very greatful.

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
hookkshot
19
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 20th Dec 2009 21:33
ok UPDATE if i export with out the armature it loads into dbp fine.

so is there a trick with armatures or something.

I have ik chains and pole targets in my armature, would that make errors.

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
hookkshot
19
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 27th Dec 2009 17:09
has anyone been able to figure this out

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
hookkshot
19
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 1st Jan 2010 20:55
I've discovered you cant have any IK chains or pole targets when exporting to direct x.

To get around this i select my mesh set how long the animation goes for then use the bake script. it creates a second armature.

Delete your first armature and rename the second to just armature(it should currently be called armature.001) then re-parent the mesh to the armature.

Delete all bones that don't have vertices attached such as your IK pole targets and control bones. from here on i followed greenligs tutorial and got it working fine

NOTE: sometimes even doing this blender will make mistakes it can be very random at times and i am unsure why.

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
MayoZebraHat 1979
18
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 8th Jan 2010 04:49
I've had success so far. I had some problems but I fixed my problem by making my armature a real armature modifier instead of leaving it as a virtual armature. That works for me for now. I don't think it's random, just complex enough that you just might be missing something. I'm using an edited version of the default exporter that came from http://www.geero.net/directx-exporter.html. It's the only one that does it perfectly for me.
greenlig
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 22nd Feb 2010 01:13
Bumping to help a few questions that have arisen lately...

Greenlig

leo877
18
Years of Service
User Offline
Joined: 6th Mar 2008
Location: san antonio, tx
Posted: 10th Mar 2010 17:55
another bump so it won't freeze

Login to post a reply

Server time is: 2026-06-11 22:05:56
Your offset time is: 2026-06-11 22:05:56