Re: Lugaru character modding in Blender
Posted: Sat May 15, 2010 7:33 pm
I noticed there's an animation importer for blender, is it possible to view game animations in blender?
Discuss all things Wolfire (or not)
https://forums.wolfire.com/
To fully understand what each individual Body.solid addresses, it's necessary to look at the source code with that mental filter applied. I haven't done that yet. All I can say is that Body7.solid is for getting a mashed head, Bodylow.solid is for low LoD and that the rest only work nicely if differences between them are minute.PsychotropicDog wrote: I am assuming to get a custom character to act like the character in game, it will be necessary to have 7 copies, each with corresponding adjustments as above.
I don't have Maya, so I can't look into this. But maybe the Blender DXF exporter auto-applies edge smoothing for some reason? Might even be a smoothing of 0.0.Edge smoothing?
I think I first tried exporting the imported solid to DXF format from blender, then importing into Maya.
I noticed some edge smoothing which does not seem to be present in OBJ version.
I should investigate, but I suppose the question is, how much edge smoothing?
The Belt.solid, its skeleton (Rabbitbelt), the Body meshes and the associated skeletons, are loaded into a player structure upon level start.I noticed a belt.solid as well.
No. Maybe down the line though, when opensource Lugaru has progressed beyond structural improvements.Textures
Character textures seem to be 512x512x24 jpgs. I wonder if other formats can be used.
Correct.A guess about the shirts and pants .. png overlays that correspond to UV's on the model?
Shirts and pants are referenced in levels. What they're called depends on what that level says.How are the textures associated with the models; what to name them?
I think i remember some old screenshots of an early version of Lugaru - some characters seemed to wear some sort of primitive 3d belt model. Maybe it has something to do with that? And if so, why did David take this out?rudel_ic wrote:The Belt.solid, its skeleton (Rabbitbelt), the Body meshes and the associated skeletons, are loaded into a player structure upon level start.I noticed a belt.solid as well.
I'm not sure what Belt.solid and Rabbitbelt do because again, it would involve digging into Lugaru sourcecode, and I can't do that right now. But I've done a lot of experiments while simply ignoring Belt.solid, that worked out okay.
Maybe it determines the holstered positions of weapons? Can't say, really. You'd have to either experiment or ignore this solid right now.
Thanks for making it!Thanks for using this stuff.
Code: Select all
// line 5401, from Person.cpp in Lugaru source code
if(!dead){
twitchdelay-=multiplier*1.5;
if(targetanimation!=hurtidleanim){
if(headmorphstart==0&&headmorphend==0&&twitchdelay<=0){
headmorphness=0;
// start of the animation (Body.solid)
targetheadmorphness=1;
// end of the animation (Body5.solid)
headmorphend=5;
twitchdelay=(float)(abs(Random()%40))/5;
}
// ready to reverse the animation
if(headmorphstart==5&&headmorphend==5){
headmorphness=0;
// end of the animation, back to Body.solid
targetheadmorphness=1;
headmorphend=0;
}
}
Note that the vertex groups are static across Body.solid - Body7.solid. But you may be right in the sense that maybe, only head stuff gets morphed at some point, leaving the rest untouched. Should be easy to confirm, not sure if it's worth the effort though.PsychotropicDog wrote: Anyhow, it does seem to me that the vertex groups are vital to getting a custom character to act properly in game.
You can directly import the skeleton, then you can see where the joints are located. The problem really just is that the vertex -> joint mapping is messed up, meaning it doesn't always match the game's hardcoded order of joints.Knowing where the joints are placed will make modeling better. I will probably take the skeleton using your scripts, and model a reference skeleton so I know where the joints are.
Nice. This should come in handy as a reference for the most hardcore of character modders.I have loaded Body - Body7 in the same maya scene, color coded ROYGBIV and grey, slightly transparent, and each mesh on it's own layer, and it is very easy to see what differences there are between the morph targets.
To be exact, the vertex -> joint mapping is a function. So each vertex has one or zero associated joints, and a joint can have any number of associated vertices. The joints are represented by the vertex groups.A question for later...
Is each vertex bound to a single joint?
Weird. Good to know. My transfer format of choice is COLLADA, if you're interested.DXF and edge smoothing- artifacts I presume, I reloaded another and the smooth shading was nonsensical. Thus I will stick to OBJ for maya importing.
Kill 'em all.Belt - I have an urge to kill some wolves and rabbits before I investigate belts.