LightWave to SMD converter beta

  • Thread starter Thread starter tunah
  • Start date Start date
T

tunah

Guest
I've made a converter for LightWave objects. There's no animation support yet, unfortunately, but I'm looking into it.
Hope someone finds it useful, I need more feedback on it.
The version I'm working on currently creates batch files to convert all textures used aswell, and will soon create VMTs' based on the surfaceproperties in LW.

http://coding.web.surftown.se/lw2smd/

Please try it and report any bugs you run into, I'll be checking this thread regularly.
 
Yeah, I've seen those scripts. I had trouble using them so I felt like coding my own. They do differ quite a lot feature wise.
 
ok that sounds good. does your script work with lightwave 7.5?
 
Yes. But it's a standalone utility, you use it as you would use vtex.
It also spits out a .qc and a batch file to compile the model after it has been converted to an SMD file.
I'm currently working on support for output of VMTs', since all the information needed is in the LW object, such as bumpmapping, transparency, et.c.
 
Updated to version 0.2b which adds conversion of textures to VTF format via another batch file and a couple of bugfixes. Please try it and report back :)
 
Could someone help me out. I have created a simple box in 3dsmax and applied a 256x256 BMP to the diffuse channel and given it a UVW map. I exported it out as an SMD file and converted the BMP to TGA and then to VTF. I placed the VTF in cstrike/materials and the then after I converted the SMD to MDL with the QC file and StudioMDL.exe, I placed the MDL in the cstrike/models folder. My problem is that whenever I selected the model as a world model in Hammer, the model does not show, I just get the coordinate coloured lines.

My QC file:

$modelname mymodel.mdl
$cd "."
$cdmaterials models
$model Rock "mymodel.smd"
$sequence Idle "mymodel.smd" fps 1

The SMD and QC files are in "sourcesdk\cstrike_sample_content\model_sources" and the TGA file is in "sourcesdk\cstrike_sample_content\materialsrc"

The MDL is then in "counter-strike source\cstrike\models" and the VTF in "counter-strike source\cstrike\materials\models"

Any ideas?
 
Well, you could start another thread since it has nothing to do with my converter.
 
I thought since you new about how to create a converter, you would know how to make all converters work... guess not!
 
That's like assuming that I'm a great painter because I've seen a brush ;)

Anyway, try this instead of your .QC:


$modelname mymodel.mdl
$cd "."
$cdmaterials models/
$body studio "mymodel.smd"
$sequence idle "mymodel.smd" loop fps 1
 
right i tried it and managed to get a simple box to work in model viewer(not tried ingame yet) but with missing textures. this may be because of a number of other possibilities but i couldnt see what was wrong with it. although i didnt persist for very long.

anyway looking very good and just as a thought, if you wanted, it could maybe put out the compile script i made, which does the COMPLETE compile process, intsead of your box_compile and texture_compile.

im going to find this tool useful. and if you make animation support and bone weights then it would become soo very useful.
 
Do you mean it should do all those things in a single sweep? I can do that, the question is, do you want to wait for the textures to get converted everytime even though you only changed the model itself?
I could also make it ask after compiling.
Nice to have some feedback. :)

By the way, where did you place your textures and what is the content directory of LW set to? The converter currently prefers having the textures under the materialsrc folder, mainly because vtex knows where to put the VTFs' afterwards. (Assuming VPROJECT is set correctly)
 
no it does a little more than that-although thats the just of it- and is a lot easier to use.

all you have to do is edit quite a small file which contains the information of the steamapps/username/ directory, the game the model is for, and wat the models name is. and you just have to edit this.
then you create a folder, bung all the files you need to compile, and run the compiler.

it does everything needed for the compile process and asks you if u want to compile textures/model and if u want to open texture driectory to edit vmts. and more.
iv also got a few other small scripts to do little useful things of compiling.
its all gonna be part of my hl2 compile toolkit
 
Ok. I think I'll work some more on the animation exporter before tinkering more with the compile scripts.
SomeOne, if you're an animator, perhaps you could contact me via email? I can't animate myself, so if you could perhaps supply me some simple test-animations, the converter would come along faster.
[email protected]
Thanks in advance.
 
no im not an 'animator' as such, iv only done a few animations really in lightwave. but il try and make something tonight if i find the time.

about the compile script. you might aswell use mine, well as a basis anyway. it saves you just rewriting what iv written...
 
Ok, nice. Send me the batch file and I'll see what I can do with it. I'll list you as a contributor ofcourse, perhaps I should make it an option which type of batch file it should output.
Oh, and if you find the time to make any animations, a simple box with "close" and "open" keyframes should be just fine. Thanks.
 
tunah do you have msn?
its just that it would be easier to talk to you on that rather than a forum. especially because i will explain the batch file to you...

if the anim u want can b as simple as that then il just go make it now :)
 
Back
Top