Page 1 of 3

Blender Editing: KS 750 Bike & Animation

Posted: Mon May 12, 2008 7:10 pm
by Motomouse
A simple untextured blender object (exported as directx text .x file) is already
  • imported into Scene Editor
  • making an appearance in a testing scenario [:)]
Further tests and details will follow soon.


P.S. This is a summary of the things learned up to now:

Blender DirectX Exporting
At this time I am using blender for static objects and map creation (only exploring and testing yet) following stridors excellent tutorials (->watch out for the necessary .xml files editing and naming conventions). For mapmaking I do not import a heightmap, but I create a grid mesh in blender and use the blender sculpt tools for terraforming. Beneath you can see the export settings I am using with the blender 2.45 directx exporter
No, don't flip the norms on second thought [;)]

Texturing
Important: Leave one face untextured or the blender model will not load into PCK, allthough viewable with DXViewer. When exporting take care of the length of the texture image names. If they are too long, the will be cut by the export script and you have to edit the name in the .x file (First thing to check, if DXViewer shows no textures)

Animation
If you like to export animations with Blender to DirectX, you have to make sure that every vertex is in exactly one animation vertex group (the vertex groups name matched with the armature bones) otherwise the export is faulty. (Load your exported .x files with the DXViewer.exe tool from the MS DirectX SDK to do a quick check for a correct export.)




Image

RE: Blender Editing

Posted: Mon May 12, 2008 7:41 pm
by Motomouse
That was too early ......
Anything sophisticated is also showing up as a simple untextured cube shaped object [:)]

RE: Blender Editing

Posted: Mon May 12, 2008 8:14 pm
by Motomouse
[:)] It works, it works, it works [:)] (with textures and complex mesh)

(Previous post: I made a mistake recycling an old blender object.)

Blender DirectX Export Settings: flipped normals, Y-axis up, right handed system, no smooth

Achtung! Hurdle! It is not enough to drop your .x file in the corresponding Media subfolder. Have a look into Stridors Tutorials on how to add a custom made object (add an entry in media.xml, etc ...)

No back to some serious work. Looking forward to your blender objects [8D]

Regards Motomouse




RE: Blender Editing

Posted: Mon May 12, 2008 8:34 pm
by rickier65
So are you able to make a map mesh with Blender then?

Rick

RE: Blender Editing

Posted: Mon May 12, 2008 8:49 pm
by Motomouse
I only tested a single map object yet, not a whole base map. 

RE: Blender Editing

Posted: Mon May 12, 2008 8:55 pm
by Stridor
Motomouse,

That is great news!

I tired working with blender but we just couldn't get along. I couldn't get the Direct X exporter working either.

But it sounds like you are making progress.

Just keep doing what you are doing [:D] Use the ideas / techniques that are in my tuts but are obviously applied to blender and it will be interesting to see how far you can go!

Oh and of course when you are finished write a tutorial [;)]

Well done again [&o]

Cheers

S.

RE: Blender Editing

Posted: Tue May 13, 2008 2:44 pm
by Motomouse
next test progressing


Image

RE: Blender Editing

Posted: Tue May 13, 2008 5:39 pm
by rickier65
After seeing Moto's post I got back to work going finishing your Tutorial #1. Then downloaded Blender.

LOL - THat was sad -looked at the scree - could hardly read the text in the menus - font soooooo small. looked at some tutorials to see what was there - lots and lots of tutorials - but none that said this is how you build a terrain mesh to use in Panzer Command Kharkov - (*g*).

Then, as is my tendency when faced with totally unfamiliar software - I started clicking around the screen just to see what explodes --- and it did -

One click and my monitor wen black - then I got the monitor diag msg - "check signal cable" Oh not good -

After staring in disbelief for a few minutes unable to get my monitor back, I did the all-powerful - off button on computer - waited and fired it back up - and low and behold back to normal -

I havne't gone back into Blender yet. ----- but my mouse keeps getting closer to that icon----

Maybe I'll wait until I see if you (motomouse) posts a tutorial to companion Stridors on map making (although I see I might have to work on models first - ).

Thanks moto for looking at Blender - hope it works.

Rick

RE: Blender Editing

Posted: Tue May 13, 2008 9:09 pm
by Stridor
Motomouse,

Is that your bike? It looks really cool!

Are you going to do a sidecar as well?

I am looking for a vehicle to do an animation tutorial on (it will have to be in MS3D at the moment, like Rick I tried going back to blender but it complained when I tried to reimport any of the direct X meshes back into the program so I gave up again!) if you wanted I could animate your bike and I am sure you should be able to pick up enough pointers along the way to translate that back to blender?

Good stuff

S.


RE: Blender Editing

Posted: Tue May 13, 2008 9:14 pm
by Stridor
Actually a bike will need a special "tank commander" (main rider) and sidecar rider as well, so that does up the ante somewhat. Also they won't be able to dismount to fight [:(], so make sure there is a MG on the bike somewhere.

RE: Blender Editing

Posted: Tue May 13, 2008 9:38 pm
by Motomouse
Hi Stridor, yes it is my bike, I did it today. Probably I will upgrade it later (rider, sidecar, animation ...). But it will take some time, for now it is a static model, for testing, learning and my entertainment [8D].

Looking forward to your animation tutorial, will try applying it to blender later. Next I have to tackle the texturing (technical side solved already). When the bike is in an approbriate state, I will be happy to make it available for tinkering, but I think it will be too late for your animation tutorial [;)]



Image

RE: Blender Editing

Posted: Thu May 15, 2008 5:36 pm
by Motomouse
After some texturing problems (At least one face had to remain untextured or I got an error, will explore later) some progress is made.

Image

RE: Blender Editing

Posted: Thu May 15, 2008 5:56 pm
by rickier65
Ah- nice - Can have some cycles lying around for the 34th Motorcycle Bn. Looking forward to seeing some tutorials -

Thanks
Rick

RE: Blender Editing

Posted: Thu May 15, 2008 5:57 pm
by Mraah

Very nice tractor !!! Oh, wait, the bike is new [;)] ...

All jokes aside, very well done Motomouse !!!

I can't wait till you add the rider, and animate him too.

I hate texturing ... I dread texturing ... I can never get it right!!

Rob

RE: Blender Editing

Posted: Thu May 15, 2008 9:10 pm
by Stridor
Sweet!

[:D]

RE: Blender Editing

Posted: Sat May 17, 2008 7:56 am
by Motomouse
Started to work on rider.

Image

RE: Blender Editing

Posted: Sat May 17, 2008 12:27 pm
by Erik Rutins
Excellent, looking forward to fielding a bike gang. [8D]

RE: Blender Editing

Posted: Sun May 18, 2008 7:30 pm
by Motomouse
You will find an update on exporting Blender animations to DirectX in the first post of this thread. [8D]

RE: Blender Editing

Posted: Mon May 19, 2008 11:12 am
by Motomouse
After some tinkering please see the proof of concept screenshot for a blender created unit. I found the necessary information in Erik´s Panzer Command Winterstorm Modding Articles in the Winterstorm forum.

Some things learned:
The textures have to reside in the folder in .dds format (update entrys accordingly in blender .x files)
export settings for unit meshes: Flip norm, Swap zy, Flip z, Bl.normals, Export Sel (only the object selected)

No, don't flip the norms on second thought [;)]

Image

RE: Blender Editing

Posted: Thu May 22, 2008 10:26 pm
by Motomouse
Never mind if you are not into the hardcore BLENDER to PCK animation export thingy! [:D]  else read on:

After some prolonged [;)] tinkering(manual mixing of the file contents of working PCWS Pz III Example wheels with my blender exported animations)  I acquired the basic knowledge for importing blender animations into Panzer Command Kharkov:

Blender is using a XSkinMesher with weight (vertex) groups for the bone animation. This led to an unvisible mesh for me in PCK (with a visible shadow [:)], that was an important hint)

Structure Change applied (manual editing for now: removing XSkinmesher, moving bracket ):
{AnimationFrame Bone} { ObjectFrame (XSkinMesher Bone)} --> {AnimationFrame Bone { Frame Object }} 

Funny thing noticed: Although blender is exporting a time based ticks per second "type 4" DirectX animation , not a "type 0" DirectX Rotation like in the Pz III Example, its working indeed in PCK [:)].

Now in the unlikely event I will have got some time at hand in the foreseeable future [:'(], I will try to finish the animated bike and perhaps I am looking into fine tuning the blender animation export.