PDA

View Full Version : Blender Model import/export scripts



Pages : [1] 2

theli
01-13-2010, 12:25 PM
Since 3ds Max 8 is old/pricy/windows-only i am working on a Blender Import/Export Scripts

Screenshots:
http://img6.imageshack.us/img6/3108/blendersavage2scout.th.png (http://img6.imageshack.us/i/blendersavage2scout.png/)http://img508.imageshack.us/img508/8994/blender.th.png (http://img508.imageshack.us/i/blender.png/)http://img693.imageshack.us/img693/8844/screenshot006pu.th.png (http://img693.imageshack.us/my.php?image=screenshot006pu.png)http://img25.imageshack.us/img25/6033/savag1predatorblender.th.png (http://img25.imageshack.us/i/savag1predatorblender.png/)

This is for Blender 2.6x:
Latest Vesion (WIP): https://github.com/theli-ua/K2-Blender/zipball/master
Follow http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python/Add-Ons to proceed with install.
Status: Imports mesh+uv+skeleton, imports clips. No export script yet. 'Surfs' are not yet supported.

Blender 2.49 (This is deprecated, I wont work on it anymore):
Last Version is 2010.06.20
k2_export.py (http://dl.dropbox.com/u/4443078/k2_export.py)
k2_import.py (http://dl.dropbox.com/u/4443078/k2_import.py)

Supported model formats: HoN, Savage 2 (they are the same) , Savage (import only, model + clips)

to import animations armature needs to be selected (it is already selected if you just imported model)
each animation imports as an action

sort-of support is in this thread... i also am usually online at #honlabs @ irc.s2games.com

scripts are not completely perfect .. but i just need input from artists using blender on that (if any)

disclaimer:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.


Support:
posts "it doesn't work","can't make it to work", etc wont be answered (at least by me)
How To Ask Questions The Smart Way (http://www.catb.org/~esr/faqs/smart-questions.html)

Warchamp7
01-13-2010, 12:27 PM
Is this a serious thread cause the image made me think otherwise.

theli
01-13-2010, 12:30 PM
Is this a serious thread cause the image made me think otherwise.
huh?
wth?
why won't this be a serious thread?
doesn't it belong to modifications?
have i ever created 'not serious thread' ?

Sephinator
01-13-2010, 12:39 PM
Nice work theli!

Dub
01-13-2010, 12:45 PM
I'm pretty sure that s2 doesn't want their models imported. That's why they only gave us the exporter. If they did want their models imported, they would have included an importer.

That being said, their model formats look just like an encrypted .fbx file with a couple rearrangements.

Wylker
01-13-2010, 12:45 PM
WC, what was wrong with that image?

theli
01-13-2010, 12:47 PM
their model formats look just like an encrypted .fbx file with a couple rearrangements.
no, thats actually pretty simple unencrypted custom IFF format

theli
01-13-2010, 02:02 PM
btw, just checked and there is really a hotlinking problem on an image... lol
changed it

also, i think s2 hasn't created an importer cause they never had a need for this :D

Warchamp7
01-13-2010, 03:08 PM
Yeah, image looks fine to me now. Weird :P

Penance
01-13-2010, 03:14 PM
Haven't used Blender much but I can only use 3DS at work (boooo.....) so I might try looking at it.
Don't really see a need to edit models that are already done, though, except a few fixes to models. Like Nymphora's nasty hands and feet and Magebane's floating spear. Otherwise I see no need to edit models. Looking at them in it would be cool. Be easier to do skinning and such as well, too.

theli
01-13-2010, 03:57 PM
Don't really see a need to edit models that are already done.
i'm working on importer only cause without documentation its easier to figure model format out by implementing importer and then create exporter using that knowledge

XjinEscore1
01-15-2010, 01:09 AM
Blender importer/exporter would be great. More so on the exporter. Being limited to 3DSMax 8 is no good. Either spend money on old software or pirate it if you don't own it prior.

Would be great to have it working with blender though :] As for importer is useful to make some minor changes, on models/animations and can make the texturing easier. I'd like to see it, hope S2 can help out where needed.

theli
01-15-2010, 05:14 AM
yay! bones :cool:

http://img508.imageshack.us/img508/8994/blender.th.png (http://img508.imageshack.us/i/blender.png/)

XjinEscore1
01-15-2010, 06:10 AM
Any idea when a release(beta?) will be available?

theli
01-15-2010, 06:22 AM
Any idea when a release(beta?) will be available?
well, i can release a preview importer today when i finish with bones

(haven't touched animations yet.. .also i'll work on an exporter after finishing importer(when i fully figure format out :D) )

Aleste
01-15-2010, 10:49 AM
Yes there is a need, and would be greatly appreciated.

theli
01-15-2010, 11:40 AM
well, i'm done for today
i added a link to alpha version of importer
it won't import animations yet

Sephinator
01-16-2010, 11:20 AM
Are you going to fix the exporter now or the animations? :)

MaxGhost
01-16-2010, 01:38 PM
Are you going to fix the exporter now or the animations? :)

Obviously the importer first. You can't export something that's isn't fully imported.

theli
01-16-2010, 06:50 PM
You can't export something that's isn't fully imported.
lol, why do someone need to export something he just imported .. exporter is for the real stuff - exporting something not native to hon
but yeah, i'm working on finishing importer first

anyway, i partly implemented animations importing - it seems i'm correctly importing position keys ... but rotation keys seems weird :(

gahd_damn
01-16-2010, 07:33 PM
... you are my new favorite person theli.

This plugin is what I have been begging for in S2 for sooo long, since a 'legal' version of max8 is still kinda pricey.

bookmarked; watching, waiting, and salivating.

MaxGhost
01-16-2010, 10:00 PM
lol, why do someone need to export something he just imported .. exporter is for the real stuff - exporting something not native to hon
but yeah, i'm working on finishing importer first

anyway, i partly implemented animations importing - it seems i'm correctly importing position keys ... but rotation keys seems weird :(

... Not what I meant. If you import something that is incomplete (no animations), what's the point of exporting it (even after editing)?

I also remember you saying that you're going to use your knowledge of the importer to build the exporter. That's also what I was basing my answer on.

Jaycoob
01-16-2010, 10:04 PM
exactly what does this do? it looks interesting! does it allow you to put any models that isn't already in HON to it? let's say, WC3 models? and it also allows you to take HoN Models?

MaxGhost
01-16-2010, 10:15 PM
exactly what does this do? it looks interesting! does it allow you to put any models that isn't already in HON to it? let's say, WC3 models? and it also allows you to take HoN Models?

Look at the screenshots. Tell me what you think afterwards. Everything you need to know is in this thread. Read it.

Jaycoob
01-17-2010, 01:09 AM
yes ye I know I already watched those a countless times, but my stupidity or lazyness keep me from understanding what exactly it does, well I do know for one thing it can use HoN models.

theli
01-17-2010, 06:06 AM
i'm having trouble with correctly importing animations :(
i'm probably doing something wrong when importing rotation keys ..
here is how animations are broken for now:
http://www.youtube.com/watch?v=RwS1XswAxRs
http://www.youtube.com/watch?v=t9ORVtlj_ZY

so i need help :(

Aleste
01-17-2010, 06:31 AM
Try PM one of S2 staff, the one who does animation preferably.

MaxGhost
01-17-2010, 10:43 AM
Lol that looks pretty funny theli :P

Good luck man, I really hope this gets completed at some point. I'd like to mess around with some of the hero models. Would be pretty interesting.

theli
01-18-2010, 02:51 PM
guess what :cool:
http://www.youtube.com/watch?v=e21zpALS-xQ

MaxGhost
01-18-2010, 04:00 PM
Nice. I'm so anxious to work with HoN models now :D

Sephinator
01-18-2010, 04:15 PM
Nice. I'm so anxious to work with HoN models now :D

Same here! :)

theli
01-18-2010, 04:46 PM
i updated link to script

MaxGhost
01-18-2010, 06:05 PM
Nice. It works pretty well!

Googling stuff about blender isn't informative enough for me. I have no idea how to apply textures. >.>

stony
01-19-2010, 06:17 AM
If you would be a Savage2 player and the system would be working i would do everything i could to get a persistant item to you (Rune for Savage2) ;-)I think, without your intention you could have done the Savage2-Community a HUGE favour if this works with Savage2 models as well.Keep it up - and it would be awesome if you could test that with Savage2-models as well.Thanks !

theli
01-19-2010, 06:28 AM
If you would be a Savage2 player and the system would be working i would do everything i could to get a persistant item to you (Rune for Savage2) ;-)I think, without your intention you could have done the Savage2-Community a HUGE favour if this works with Savage2 models as well.Keep it up - and it would be awesome if you could test that with Savage2-models as well.Thanks !
it should work, but i need some examples of sav2 (and preferrable sav1) models+clips to make adjustments for that to work with different versions

theli
01-19-2010, 06:59 AM
i just tested and sav2's models are of the same format version and are imported with this script
here is Sav2 screenshot for your savage2.com forum thread ;)
http://img6.imageshack.us/img6/3108/blendersavage2scout.th.png (http://img6.imageshack.us/i/blendersavage2scout.png/)

Tyzar
01-19-2010, 07:45 AM
beta release:
http://omploader.org/vM2FnMA/k2_import.py

http://omploader.org/vM2FnMA/k2_import.py
for now it works for Hon and Savage 2 models only (i'm planning to add savage 1 support later)



this is not fair, really. :mad:

theli
01-19-2010, 09:17 AM
this is not fair, really. :mad:

wtf?

oh.. lol .. i get it .. you get that 'lol you are gays' thing?
that is sometimes caused by hotlinkind, just refresh page lol

Sephinator
01-19-2010, 10:33 AM
wtf?

oh.. lol .. i get it .. you get that 'lol you are gays' thing?
that is sometimes caused by hotlinkind, just refresh page lol

I did this.

1. http://omploader.org/vM2FnMA/ (http://omploader.org/vM2FnMA/)
Right Click -> Select All
Right Click -> Copy
Open Notepad
Right Click -> Paste
File -> Save As -> k2_import.py

EDIT: Ok, didn't worked now for some odd reason..

DarkDefender
01-19-2010, 01:02 PM
Nice. It works pretty well!

Googling stuff about blender isn't informative enough for me. I have no idea how to apply textures. >.>
How about youtube tuts? :D
http://www.youtube.com/watch?v=k4pr3J45ESo&feature=related
Perhaps not the best but you should be able to apply textures. If the model is imported you with uv maps then you shouldn't have to create new ones (unwrap etc).

theli
01-19-2010, 01:31 PM
If the model is imported you with uv maps
it is
so, in that video only part from adding new texture (since empty material is already created) and till the loading from file is relevant

HellishINC
01-19-2010, 07:08 PM
I'm pretty sure that s2 doesn't want their models imported. That's why they only gave us the exporter. If they did want their models imported, they would have included an importer.

That being said, their model formats look just like an encrypted .fbx file with a couple rearrangements.

You don't need an importer to take models from a (any) game. All you need is something that will will analyze the gpu's buffer and rip it from there.

@OP
nice work and keep it up. Finally a proper way of looking at S2's rig/animations.

theli
01-20-2010, 02:30 PM
lol, i just found out that http://omploader.org/ now has
forums\.heroesofnewerth\.com
in their banned list so thats why some people got that nasty picture

from omploader's faq (http://omploader.org/about.html) :

Q: Why is it when I use omploader as a free image hosting service I get a nasty image?
A: Omploader will remain free as in FREEDOM, for as long as possible. However, we don't appreciate when people use omploader on their high traffic sites instead of using their own damn servers (especially if they have ads on their site). Here is what our rewrite list looks like. Also, if we just plain don't like your site's content we may add your site to the rewrite list. As of May/2009, google ads were added to deal with growing bandwidth and server costs.
and here is their banned rewrite rule: http://omploader.org/rewrites.txt

so i'll just use some other filehosting now :(

Tyzar
01-20-2010, 02:33 PM
thanks, i apologize for the mistake.

theli
01-20-2010, 02:35 PM
i updated link to importer
also, i started to work on exporter and hope to have first working release 'soon'

gahd_damn
01-21-2010, 09:39 AM
I get a console error trying to use your script; "struct.error: unpack requires a string argument of length 0"
last 3 calls; 279, 197,488

Ideas? when trying to open "resources0(Version 0.1.65)\heroes\behemoth\high.model

theli
01-21-2010, 09:57 AM
oops, broken version uploaded, lol
updated link

gahd_damn
01-21-2010, 09:59 AM
*checks new link*

*is very happy*

Aleste
01-21-2010, 10:59 AM
I hope you consider making an exporter/importer for Max 2010

theli
01-21-2010, 11:06 AM
I hope you consider making an exporter/importer for Max 2010
no way, sorry (well, unless someone pays me for that :P )

theli
01-21-2010, 12:07 PM
i finished first exporter version and changed link in op .. its now a link to both scripts zipped
exporter won't export animations yet

here is the example result:http://img693.imageshack.us/img693/65/shot0005c.th.jpg (http://img693.imageshack.us/i/shot0005c.jpg/)
here, i added 3 bones to savage 2 scout's model so that hon's state effects can be seen (here he is under effect of blood craze)

theli
01-22-2010, 10:27 AM
added support for savage1 models to importer
http://img25.imageshack.us/img25/6033/savag1predatorblender.th.png (http://img25.imageshack.us/i/savag1predatorblender.png/)

savage 1 predator in hon .. with animations of hon's predator :D
http://img709.imageshack.us/img709/1553/shot0006h.th.jpg (http://img709.imageshack.us/i/shot0006h.jpg/)

theli
01-22-2010, 01:04 PM
oldschool ftw :D :
http://img517.imageshack.us/img517/3164/shot0010k.th.jpg (http://img517.imageshack.us/i/shot0010k.jpg/)

Sephinator
01-22-2010, 01:17 PM
Nice Theli! :D

S2Ikkyo
01-23-2010, 03:23 AM
Your exporter looks pretty good overall. You're missing the "sign" block though, which controls the direction mirrored normal maps are pointing.

It's a byte array indicting the whether or not the sign of the area of a triangle face in texture space is positive or negative. This is per vertex, vertices that border faces of opposite signs need to be duplicated to avoid normal mapping seams.

See Kraken's stomach for an obvious example.

gahd_damn
01-23-2010, 09:46 AM
*I am drooling*

*hope you make this official*

stickie?

Strider
01-23-2010, 12:43 PM
added support for savage1 models to importer
http://img25.imageshack.us/img25/6033/savag1predatorblender.th.png (http://img25.imageshack.us/i/savag1predatorblender.png/)

savage 1 predator in hon .. with animations of hon's predator :D
http://img709.imageshack.us/img709/1553/shot0006h.th.jpg (http://img709.imageshack.us/i/shot0006h.jpg/)

I want my sav1 Predieee D:

twincannon
01-23-2010, 01:11 PM
oldschool ftw :D :
http://img517.imageshack.us/img517/3164/shot0010k.th.jpg (http://img517.imageshack.us/i/shot0010k.jpg/)

Where are the tree files located? I was looking for them for like 2 hours one day before giving up, just couldn't find the right files for them.

Great work on the mod btw!

MaxGhost
01-23-2010, 03:25 PM
Where are the tree files located? I was looking for them for like 2 hours one day before giving up, just couldn't find the right files for them.

Great work on the mod btw!

\world\props\trees

theli
01-23-2010, 06:40 PM
Your exporter looks pretty good overall. You're missing the "sign" block though, which controls the direction mirrored normal maps are pointing.

It's a byte array indicting the whether or not the sign of the area of a triangle face in texture space is positive or negative. This is per vertex, vertices that border faces of opposite signs need to be duplicated to avoid normal mapping seams.

See Kraken's stomach for an obvious example.

oh, thank you ... i'll try to iplrmrnt that 'sign' stuff with blender

i think the only chunk i havent touched yet is the 'surf' one :D

XC33D
01-23-2010, 09:52 PM
OMG just what i was looking for cheers Theli!

should be stickied imo.


Nice. It works pretty well!

Googling stuff about blender isn't informative enough for me. I have no idea how to apply textures. >.> Basically you want to add a texture to the mesh with an "image" texture type. Once you have added your texture then you'll want to apply the texture by going to the UV/Image Editor Window.

gahd_damn
01-23-2010, 11:26 PM
Here I'm left wondering if he meant sine (http://en.wikipedia.org/wiki/Trigonometric_functions)...

MaxGhost
01-24-2010, 12:48 AM
OMG just what i was looking for cheers Theli!

should be stickied imo.

Basically you want to add a texture to the mesh with an "image" texture type. Once you have added your texture then you'll want to apply the texture by going to the UV/Image Editor Window.


I got the texture imported and all, but it shows up white on the 3d view if I chose "textured" view.

XC33D
01-24-2010, 01:11 AM
I got the texture imported and all, but it shows up white on the 3d view if I chose "textured" view.

You'll want to have a split window adjustment, to make things easier leave the left window in 3d View and put the right one in the UV/Image Editor like so: (Example) (http://img16.yfrog.com/img16/2313/23766238.jpg)

Then inside the UV/Image Editor you want to apply the texture file, by clicking the arrows beside the UV's tab here and then selecting your texture that you have added: (Example)
(http://img706.imageshack.us/img706/6027/60489168.jpg)
Now if you go into texture mode you should see the texture applied.

MaxGhost
01-24-2010, 01:13 AM
Already been doing the split screen thing. (it's a wonder I figured that one out >.>)

Thanks for the tip!

theli
01-24-2010, 03:15 AM
Here I'm left wondering if he meant sine (http://en.wikipedia.org/wiki/Trigonometric_functions)...
no, 'sign' chunk just has -/+

XC33D
01-24-2010, 04:49 AM
umm, If I wanted to create my own hero would I have to rework an already made character into my own or is there a way to create one from scratch.

I get errors when exporting my test model. :/ Is this because I am using quads and not tri's ?

theli
01-24-2010, 05:27 AM
Is this because I am using quads and not tri's ?
yes
i've no idea if k2 supports quads

Yuichi
01-24-2010, 06:05 AM
If you are using blender just select everything and hit ctrl+t while in edit mode and now you have everything in triangles.

Dr_Knickers
01-24-2010, 06:52 PM
Any chance of a version for 3ds max users? I know there's an exporter already out, but it'd be nice to be able to bind our meshes to S2's skeletons.

MaxGhost
01-24-2010, 07:58 PM
Any chance of a version for 3ds max users? I know there's an exporter already out, but it'd be nice to be able to bind our meshes to S2's skeletons.

He said he wouldn't make a 3ds max version.

gahd_damn
01-24-2010, 08:47 PM
Any chance of a version for 3ds max users? I know there's an exporter already out, but it'd be nice to be able to bind our meshes to S2's skeletons.
So learn 2 blender? You can always export your 3ds mesh to a standard file format, then use blender to bind it to an imported skeleton with animations.


@theli: Once you're done with the exporter script, think you could make your importer loop a bit and auto-import all the animations?

XC33D
01-24-2010, 10:25 PM
If you are using blender just select everything and hit ctrl+t while in edit mode and now you have everything in triangles.thx!

Succesfully imported my model. Extremely tiny and not rigged but atleast I can confirm this works perfectly. :P

Edit: Size fixed via hero.entity, model scale. Is there any other way to adjust scale? Sorry for noob question.

theli
01-25-2010, 02:59 AM
So learn 2 blender? You can always export your 3ds mesh to a standard file format, then use blender to bind it to an imported skeleton with animations.
i'm pretty sure you can do the opposite - export from blender to some format 3ds can import


@theli: Once you're done with the exporter script, think you could make your importer loop a bit and auto-import all the animations?
that is planned along with gui for scripts

Yuichi
01-25-2010, 06:12 AM
thx!

Succesfully imported my model. Extremely tiny and not rigged but atleast I can confirm this works perfectly. :P

Edit: Size fixed via hero.entity, model scale. Is there any other way to adjust scale? Sorry for noob question.
Ofcourse you can directly scale the model in blender via Skey.
Just import one of the HoN models and look how big they are and scale your model to same size.

Also great job on the importer/exporter.
Got myself to learn some blender thanks to you theli :)
Already got my little model ready.
Now it needs just a little uv mapping and texturing.

theli
01-25-2010, 12:34 PM
added a ui to exporter today and plan to add ui to importer along with a way to import all animations at once
also .. some more playing with exporter:
http://img651.imageshack.us/img651/8199/shot0011v.th.jpg (http://img651.imageshack.us/i/shot0011v.jpg/)http://img716.imageshack.us/img716/5896/shot0012.th.jpg (http://img716.imageshack.us/i/shot0012.jpg/)

DarkDefender
01-25-2010, 04:06 PM
A question came to my mind when looking at that blocky scout. Do the LODs get imported/exported also?

theli
01-25-2010, 04:31 PM
A question came to my mind when looking at that blocky scout. Do the LODs get imported/exported also?
there are no lods in k2/silverback models

ernst1
01-25-2010, 05:40 PM
wow, thats just what i was hoping for, thank you THAT much, theli!

DarkDefender
01-26-2010, 01:30 AM
there are no lods in k2/silverback models
Ah, ok :)

theli
01-26-2010, 01:52 AM
Ah, ok :)
yeah, scout looks that bad cause of my crappy integrated video on my work pc and jpg comression artifacts :P

but, also, all hon models are pretty low-poly as you see them at a much distance and there is absolutely no need for such details as in savage 2 models

Zerath
01-26-2010, 08:03 AM
Thanks theli! This is really hot stuff, and should be stickied. I really hope you'll get the animations in the exporter soon. Blender is lovely, and as a student you really can't beat the price of free.

I got the python script error though at the first time, said that there is no variable named "glob" at all. I just commented the whole "import glob" line and now it works(?).
Keep up the good work! I'm working on a model that I plan to put in HoN, then make own skills and all. Maybe I should name the hero Theli :P

theli
01-26-2010, 04:30 PM
Your exporter looks pretty good overall. You're missing the "sign" block though, which controls the direction mirrored normal maps are pointing.

It's a byte array indicting the whether or not the sign of the area of a triangle face in texture space is positive or negative. This is per vertex, vertices that border faces of opposite signs need to be duplicated to avoid normal mapping seams.

See Kraken's stomach for an obvious example.
while i still haven't figured out how to produce/use those direction signs in blender .. i just checked - and kraken in both http://www.heroesofnewerth.com/heroes.php and ingame (gl renderer) have a lighting bug/seam on his stomach

also .. i have no idea for what those ~20 submeshes with mode=2 in kraken's high model are used ... so i have no idea what to do with them and why those are needed

another thing is i have yet to look at lnk3 chunk ( the same kraken's high.model )

i think the next release will be when/if I or someone else figures this out or shares information :rolleyes:

S2Ikkyo
01-27-2010, 09:57 AM
while i still haven't figured out how to produce/use those direction signs in blender .. i just checked - and kraken in both http://www.heroesofnewerth.com/heroes.php and ingame (gl renderer) have a lighting bug/seam on his stomach

also .. i have no idea for what those ~20 submeshes with mode=2 in kraken's high model are used ... so i have no idea what to do with them and why those are needed

another thing is i have yet to look at lnk3 chunk ( the same kraken's high.model )

i think the next release will be when/if I or someone else figures this out or shares information :rolleyes:

The extra meshes are mistakes of artists when exporting, those will all be removed sooner or later.

lnk3 is an optimized version of lnk2 for faster loading. The max exporter doesn't use this yet, only my own tools. The main differences between lnk2 and lnk3 are it's limited to 4 weights per bone, those weights have to be sorted strongest to weakest, and the weights must be normalized (sum to 1).

The OpenGL renderer doesn't support rendering mirrored normal maps properly yet either, which is why you'd still see a seam on Kraken when using the OpenGL renderer. Support for that will come sometime in the near future as well. The screenshots on the website were taken before mirrored normal map support was finished.

theli
01-27-2010, 11:28 AM
The extra meshes are mistakes of artists when exporting, those will all be removed sooner or later.

lnk3 is an optimized version of lnk2 for faster loading. The max exporter doesn't use this yet, only my own tools. The main differences between lnk2 and lnk3 are it's limited to 4 weights per bone, those weights have to be sorted strongest to weakest, and the weights must be normalized (sum to 1).

thank you
i'll just ignore submeshes with mode=2 then :D

Dopefish`
01-28-2010, 11:26 AM
I'll have to port this over to a lua script for use with modo.

MaxGhost
01-28-2010, 03:58 PM
I'll have to port this over to a lua script for use with modo.

What about a 3ds max script or maya, etc?

cGcJAG
01-28-2010, 05:19 PM
OMG great news Theli !! GJ w00t

can u winRAR all the models .obj so people can use it on different apps ? i am a maya user :(

MaxGhost
01-28-2010, 05:19 PM
OMG great news Theli !! GJ w00t

can u winRAR all the models .obj so people can use it on different apps ? i am a maya user :(

You can do that yourself. Blender is free.

Yuichi
01-28-2010, 05:59 PM
OMG great news Theli !! GJ w00t

can u winRAR all the models .obj so people can use it on different apps ? i am a maya user :(
Its really simple...
Just open up blender.
Import the model and after that export to .obj or whatever you want to.
It only takes few seconds...

theli
01-30-2010, 08:47 AM
a little progress report

ok, i implemented 'sign' block calculation
( using http://www.terathon.com/code/tangent.html 'Calculate handedness' )
not sure if i am doing that right though ... while i get no seam on kraken's stomach .. anyway here are the screenshot of how it looks in direct3d renderer:
Blender export
With 'sign'
http://img191.imageshack.us/img191/7223/shot0002f.jpg
Without 'sign'
http://img715.imageshack.us/img715/6748/shot0003y.jpg

Original model file
With 'sign'
http://img300.imageshack.us/img300/3809/shot0004u.jpg
Without 'sign'
http://img189.imageshack.us/img189/9372/shot0005b.jpg

also, played a little with subsurfing model to have higher poly count
(not that i think its needed with hon's camera distance .. just messing around)
http://img682.imageshack.us/img682/2070/shot0000t.th.jpg (http://img682.imageshack.us/i/shot0000t.jpg/)
(yeah, i broke his weapon .. was lazy to reexport )

another problem i found out with kraken .. somehow i think i'm doing something wrong with importing clips.. as seen on this render of kraken's idle animation in blender (weapon is off) :
http://www.youtube.com/watch?v=b7-cffy_0-c
another one broken animation:
http://www.youtube.com/watch?v=rvLCMX25IV8

anyway, i'm working now on animations and ui for scripts
after that is done i'll release a new version with exporting of animations

theli
01-30-2010, 03:44 PM
well... just checked with opengl renderer on linux - and i don't get seams there with blender exported model :-/

original model file:
http://img686.imageshack.us/img686/2670/shot0001av.th.jpg (http://img686.imageshack.us/i/shot0001av.jpg/)

blender export:
http://img402.imageshack.us/img402/3828/shot0000dx.th.jpg (http://img402.imageshack.us/i/shot0000dx.jpg/)

while blender export does not have a seam it looks a little different :-/
i dunno if it renders right or not

gahd_damn
01-30-2010, 08:39 PM
0.0 Keep at it man, I'm still waiting, and I'm sure there's quite a few lurkers.

Amazing progress so far too.

gahd_damn
02-01-2010, 06:17 AM
Looking back at your last post there theli, I can't help but think that the bump mapping on the "original" file is backwards.

Look at the left side of kraken's body (right side of the picture) on the chest especially; it looks like the barnacle is indented instead of extruded.

Maby you unintentionally fixed a problem that hadn't been reported yet?

theli
02-01-2010, 06:40 AM
Looking back at your last post there theli, I can't help but think that the bump mapping on the "original" file is backwards.
well, that is the thing that makes me wonder - cause , as Ikkyo explained, its because of mirrored normal map .. and to fix that the 'sign' chunk is used ... but its not used in OpenGL renderer yet (mac+linux) ...
but with blender's exported tangents it looks ok even without using 'sign' chunk

theli
02-03-2010, 10:41 AM
sigh
well,with Ikkyo's help i sorted normal-mapping out .. but am now stuck with animations
i just can't seem to get them working properly :(

theli
02-04-2010, 04:48 AM
YAY!
animations are now imported properly!
http://www.youtube.com/watch?v=o2oOEUTIZfs
so, i'm starting work on exporting them

Aleste
02-04-2010, 11:27 PM
Excellent.

You need a donation button.

stony
02-05-2010, 02:18 PM
Indeed - even *I* as NoNHoN-Player would donate :D

Yuichi
02-05-2010, 04:54 PM
I just realised that I can finally have my Maliken throwing light sabers!
Its just that his ultimate form doesnt like me... The lightsaber just floats there.
I could be doing something wrong too.
Hope you finish this soon. :)
http://img689.imageshack.us/img689/5128/lightsaber.png

theli
02-06-2010, 09:47 AM
its alive! http://www.youtube.com/watch?v=N_75iE3sa0E

Sephinator
02-06-2010, 10:54 AM
its alive! http://www.youtube.com/watch?v=N_75iE3sa0E

YAY! :D

joshfiles
02-06-2010, 12:09 PM
now your just showing off, any chance of posting the updated scripts?

theli
02-06-2010, 01:33 PM
mmmmmmmmm
ok
i posted recent scripts
but consider this a beta still .... I doubt everything will work as expected :D

BlacRyu
02-06-2010, 05:32 PM
Our first new model is a walking tampon?

Yuichi
02-06-2010, 08:12 PM
Our first new model is a walking tampon?
Actually the first model was Khar the flying sword.

joshfiles
02-06-2010, 10:57 PM
awesome, now i can import/export things without issue. But I am unable to place effects on bones, any idea about that? i know its beta, just curious.

Yuichi
02-06-2010, 11:04 PM
awesome, now i can import/export things without issue. But I am unable to place effects on bones, any idea about that? i know its beta, just curious.
What do you mean by unable to place effects on bones?
You created new bone? If thats the case are you sure that you named it?
Im not sure but your bone might have to be linked with the other bones.
Are you trying to add effects with .effect files?(Might be stupid question)
Cant think of anything else right now.

Explaining what you did would help alot or what you were trying to do.
In detail please :)

joshfiles
02-06-2010, 11:20 PM
whoa, thanks for the fast response with offer of help.

i could not find a way to have a model have more than one effect active at a time. so i made a dummy model, with a armature containing a _bone_overhead. i then copy and pasted a small emitter (from andromeda circling jobbies), and just took the static floating ball portion attached to _bone_overhead.

the dummy model shows up perfectly (attached it to the main model via a gadget), but the effect wont come up. The effect works just fine if i apply it to the main model (im using pyromancer for testing).

thanks for any advice you can offer.

Yuichi
02-06-2010, 11:43 PM
Cant really think of any reason why it wont work. :/
If I come up with something that might be of use Ill post it here.
Edit:
Did a little testing and it seems that I have the exact same problem.
Atleast you are not alone. :P
See if I can work it out.

theli
02-07-2010, 03:47 AM
why don't you just make a combined effect file with different stuff attached to different bones in a single effect file? (fe look at hunter's ability_2 state.effect )

Yuichi
02-07-2010, 06:00 AM
Yea but the point was that adding bone and then trying to attach the effect to it doesnt work.
For example when I tried to create 2 new bones to pyromancer no effects showed when I tried to use them.

Anyways Im now getting error when trying to export animations.
line 479, in CreateK2Clip for bone in posedbones:
NameError: global name 'posedbones' is not defined

Any idea what Im doing wrong or what could cause this?

ReDsKiN
02-07-2010, 06:26 AM
When i'm exporting a model (in this case i used witch slayer) he becomes blocky
http://img526.imageshack.us/img526/6816/witchcomparison.png
The above pic was done by Yuichi
The right one is the exported model, noticing the blockiness present in arms and legs, and his head once hat is removed
I'm just hoping for a beardless Witch Slayer :(

theli
02-07-2010, 06:35 AM
When i'm exporting a model (in this case i used witch slayer) he becomes blocky
select mesh and press 'set smooth'

theli
02-07-2010, 06:50 AM
Yea but the point was that adding bone and then trying to attach the effect to it doesnt work.
For example when I tried to create 2 new bones to pyromancer no effects showed when I tried to use them.
as you are adding bone to pyro ... you use pyros original animations which do not have that bone (and model is always animated)
if your bone has parent - it then just sticks to its parent .. if it doesnot have a parent ... i dunno then

you can set vid_drawbonesnames 1 in console and look at how bones are handled by game's engine


Anyways Im now getting error when trying to export animations.
line 479, in CreateK2Clip for bone in posedbones:
NameError: global name 'posedbones' is not defined

Any idea what Im doing wrong or what could cause this?

my bad, redownload

Yuichi
02-07-2010, 07:01 AM
as you are adding bone to pyro ... you use pyros original animations which do not have that bone (and model is always animated)
if your bone has parent - it then just sticks to its parent .. if it doesnot have a parent ... i dunno then

you can set vid_drawbonesnames 1 in console and look at how bones are handled by game's engine

my bad, redownload

Thanks for info :)
Didnt know about that command.

What I did was that I attached the bone to parent like you said and it should stick with it...
Anyways Ill try with animations later.

Thanks for fast update too!

theli
02-07-2010, 07:08 AM
also, for vid_drawbonesnames 1 to work you also need to have vid_drawbones 1

ReDsKiN
02-07-2010, 08:46 AM
I cannot find a set smooth function :(
I'm using blender 2.49b, python 2.6.4
I selected the mesh by going space>select>select all by type>mesh

theli
02-07-2010, 09:15 AM
I cannot find a set smooth function :(
I'm using blender 2.49b, python 2.6.4
I selected the mesh by going space>select>select all by type>mesh
http://wiki.blender.org/index.php/Doc:Manual/Modelling/Meshes/Smoothing

joshfiles
02-07-2010, 01:46 PM
hey, thanks for the infos! i know why the effects are not showing up, anything i export has no bones in the game! even just importing a model, and exporting it unchanged. i gotta be missing some setting, i looked through the posts but im not seeing it. any ideas?

p.s. that show bones/bonenames command is awesome, thanks.

theli
02-07-2010, 02:02 PM
hey, thanks for the infos! i know why the effects are not showing up, anything i export has no bones in the game! even just importing a model, and exporting it unchanged.
I'm pretty sure thats impossible - script will just crash if there is no armatures (skeletons) in current scene
also, take into account that armature that is exported is just a first armature found in current scene .. so be sure you have only one

if you upload your files somewhere i may look at whats wrong

joshfiles
02-07-2010, 02:06 PM
if for example, i import pollywog's ult ward model. then just export it as is, no change what-so-ever. then make a gadget with that model, and spawn it in game, issue the commands you gave to show the bones/bone names, the gadget model shows no bones. it seems you may have updated the script for the last few posts, ill see if im just behind the times, thanks again.

joshfiles
02-07-2010, 02:15 PM
ok got it, the bones dont show up unless you have an animation. i added an idle animation for the model, and boom, everything is working.

amazing work theli, this stuff is awesome, thanks.

ReDsKiN
02-07-2010, 05:57 PM
Thanks for the help, it was weird that before it wasnt coming up but now it was there.. ima try some different settings to get it smoother coz it still turns up blocky, although now its triangular

theli
02-08-2010, 12:11 PM
well, i found out that blockiness you get is because most of edges is split in hons models (for double-side faces and mirrored normal mapping)
so it will work proper once i implement removing those duplicates on import and duplicating them again on export

as a workaround for now - uncheck 'HQ Normals' on export

ReDsKiN
02-08-2010, 06:00 PM
ok ill see what happens now :)
And what is the "remove doubles" you have then?

edit:nvm bout doubles, still blocky though. I'll just wait ;)

theli
02-10-2010, 07:04 AM
sigh.. while i implemented proper removing of duplicated vertices... i found out that animation importing is STILL somewhat incomplete ......
like:
http://dl.dropbox.com/u/4443078/HoN/dwarf_magi_taunt.gifhttp://dl.dropbox.com/u/4443078/HoN/behemoth_taunt.gif
i dunno whats so special about behemoth and blacksmith what makes their animations render like that ...
funny thing is - if i import animation and export it back ... it looks completely normal in hon :-/

MaxGhost
02-10-2010, 07:34 AM
I don't see what's wrong... What do you mean?

theli
02-10-2010, 07:50 AM
I don't see what's wrong... What do you mean?
their heads are turned ~90 degrees to right..
from | to -

Yuichi
02-10-2010, 09:41 AM
I also noticed that when I imported ophelia she holds the staff wrongly (rotated 180 degrees).
Also experimenting with witch slayer model and animations. Added Malikens sword to him.
The animation looks good in blender but in game he holds the sword from the tip
Like this ---I----------
^holds it from here and it looks weird :P
+ When I choose everything with A, do remove doubles, correct the normals(flip them) and export it somehow destroys my uv mapping.
Even when I have made seams and all.

This could be just me since Im pretty new to blender. Reading some tutorials/documentation atm.
Edit: Added pic about uv map. Left is after exporting. Right is before exporting.
http://img693.imageshack.us/img693/6029/uvmapk.png

theli
02-10-2010, 09:56 AM
I also noticed that when I imported ophelia she holds the staff wrongly (rotated 180 degrees).
Also experimenting with witch slayer model and animations. Added Malikens sword to him.
The animation looks good in blender but in game he holds the sword from the tip
Like this ---I----------
^holds it from here and it looks weird :P

ophelia .. hm .. yeah .. strange ..
i dunno why animations are off for some of the bones on some of the models :(


+ When I choose everything with A, do remove doubles, correct the normals(flip them) and export it somehow destroys my uv mapping.
Even when I have made seams and all.
cause that removes to much

Yuichi
02-10-2010, 10:07 AM
cause that removes to much
Actually when I posted that I realised the same thing myself and while thinking about it for 2 mins I got a solution. Hopefully...
Sometimes its good to write things down.

Also dont worry about the animations. You will get them eventually.

theli
02-10-2010, 10:10 AM
Actually when I posted that I realised the same thing myself and while thinking about it for 2 mins I got a solution. Hopefully...
Sometimes its good to write things down.

Also dont worry about the animations. You will get them eventually.
i may just post updated wip import script which removes duplicates properly
(duplicating vertices for proper normal mapping is not done yet in exporter though)

Yuichi
02-10-2010, 10:19 AM
i may just post updated wip import script which removes duplicates properly
(duplicating vertices for proper normal mapping is not done yet in exporter though)
Right now Im trying to do that by hand :D

theli
02-10-2010, 10:44 AM
interesting thing (about ophelia animations):
if i export just animation (right after importing) it looks the same way as it was on HoN (without change)...
if i export both mesh and animation - it looks in hon exactly the same way as in blender (with flipped weapon) ....
im confused

Yuichi
02-10-2010, 10:48 AM
That really is weird.

Btw got the blockyness fixed.
Seams from islands script helped alot.
I ended up duplicating each island after I removed all doubles.
So there are now duplicates where the seams are.
After that I deleted the original mesh.
Now I got some lighting issues to fix.
Some parts are darker than others and some parts seem to be glowing ingame.
Ill see if I messed up some blender settings.

theli
02-11-2010, 10:24 AM
ok, i workarounded those animation glitches (it was in fact just float precision issues)
so, once i finish proper duplication of vertices on export i'll post updated version

ReDsKiN
02-11-2010, 04:24 PM
Love your work theli, and to think when this started someone called it an unserious post lol

Jaycoob
02-12-2010, 10:34 AM
Wow you're really doing great in this! great progress there! so... Are you now able to import WC3 models to HoN? that would be genius!

Yuichi
02-12-2010, 11:22 AM
Getting WC3 models to HoN is pretty easy...
Someone did it ages ago but since you cant get the animations to HoN its pretty useless...
Btw WC3 models look ugly in HoN since they have so much less detail.

Jaycoob
02-12-2010, 11:31 AM
easy? cool! but the problem is the Animations... too bad! and btw, there are some costumely made WC3 models at Hiveworkshop which are good! :)

theli
02-12-2010, 11:37 AM
Getting WC3 models to HoN is pretty easy...
Someone did it ages ago but since you cant get the animations to HoN its pretty useless...
Btw WC3 models look ugly in HoN since they have so much less detail.
yeah, this ^^

DarkDefender
02-12-2010, 02:28 PM
When this importer/exporter becomes feature complete perhaps you are doing S2 a really big favor so that they don't have to pay lots of cash if they decide to move from max 8 ;)
I can't wait till blender 2.5 becomes 2.6 (stable)! :D
Is this plugin compatible with 2.5 BTW?

theli
02-12-2010, 05:37 PM
When this importer/exporter becomes feature complete perhaps you are doing S2 a really big favor so that they don't have to pay lots of cash if they decide to move from max 8 ;)
well, i am yet to see a game studio using blender for modelling xD
(yes i know of commercial animation projects using blender for production)


I can't wait till blender 2.5 becomes 2.6 (stable)! :D
Is this plugin compatible with 2.5 BTW?
no yet, i'll work on that once my scripts are completed
and ... i took a look at 2.5 ... UI is certainly SEXY
http://dl.dropbox.com/u/4443078/HoN/babayaga_taunt.gif

ReDsKiN
02-12-2010, 10:07 PM
HENTAI!!

At least it works correctly...

Yuichi
02-13-2010, 01:14 AM
I discovered the 2.5 alpha few days ago.
It almost made me cry in a good way :D
Got to love what they have done with the UI.

Btw after you finish with the importer/exporter we can show what blender is capable and maybe convert S2 to using it. :P

Edit:
Found one tutorial on how to work with WC3 animations but that is for 3dsmax.
Doesnt help much :/

theli
02-14-2010, 05:18 AM
well, i thought id just update scripts as they are .. cause i just cant find time to finish exporter..
anyway, updated links so yo at least won't have those animation glitches (as bs's head)... you need to reimport original model for that

Yuichi
02-14-2010, 05:40 AM
Thanks a lot. :)
Edit:
I also noticed that when you export you have to make sure that the model is in its default pose.
The pose when no animations is imported.
If you just export when you got it in middle of animation it will be very weird.
Weapons floating etc.
Just thought I would write this here incase someone else has the same problem.

theli
02-15-2010, 10:54 AM
i've finally added vertex duplication (for seamless mirrored normal-mapping) to exporter
also, model now exports in rest position automagically (fixes that bug Yuichi mentioned)
scripts updated

for now there are no known bugs

Aleste
02-16-2010, 10:45 AM
I like you.

ReDsKiN
02-17-2010, 08:42 AM
I cannot for the life of me import my model into Blender :(

theli
02-17-2010, 09:05 AM
I cannot for the life of me import my model into Blender :(
i know xD
i, actually, tried that myself - it didn't work cause i'm ignoring non-physique meshes

anyway, i've added support for those back .. just redownload script

ReDsKiN
02-17-2010, 10:35 AM
YAY!!
I'll start my nooby animations tomorrow :D

Jaycoob
02-17-2010, 11:40 PM
so now... wil someone be able to import the costume WC3 models? There are tons of good stuff here:

http://www.wc3c.net/resources.php?f=639

theli
02-18-2010, 01:27 AM
so now... wil someone be able to import the costume WC3 models? There are tons of good stuff here:

http://www.wc3c.net/resources.php?f=639
this thread has completely nothing to do with wc3 models

ReDsKiN
02-18-2010, 01:31 AM
The wc3 models are really low defined, i got it by using 3d ripper dx :D
The textures applied quite nice though, although some work is needed
I have 0 idea about animations, as my way removes armatures/bones (i think)
TY for the work theli, esp with that quick update :D

theli
02-24-2010, 11:11 AM
scripts updated...
import script:
now all duplicate vertices will be merged regardless of uv coords (since blender uses uv coords per face, not per vertex)
duplicate flipped faces merged into single twosided face

export script:
duplicating vertices if the same vertex has several uv coords
duplicating two-sided faces

one of the consequences is fixing the lighting seams caused by uv seams:

old script version:
http://img638.imageshack.us/img638/1687/blenderold.png
original file:
http://img695.imageshack.us/img695/374/originalo.png
new script version
http://img693.imageshack.us/img693/30/blendernew.png

MaxGhost
02-24-2010, 03:53 PM
I'm kinda outdated on this, does it work with the newest version of blender?

theli
02-24-2010, 03:59 PM
I'm kinda outdated on this, does it work with the newest version of blender?
with latest stable - yes
with 2.5 alpha - no

MaxGhost
02-24-2010, 04:33 PM
Any chance of an update to 2.5alpha then?

The new UI for it is so much better.

theli
02-25-2010, 01:11 AM
Any chance of an update to 2.5alpha then?

The new UI for it is so much better.

i was planning to port it to 2.5 once beta is out (first beta is planned to be the next version)

theli
02-25-2010, 06:03 AM
export script updated:
added orthogonalization of tangent vectors

t1ck
02-28-2010, 11:48 AM
greetings and a big thanks from the savage2 world!
importing models and textures / normal maps works great!

but i have a question and i think there is a litte problem with the animations/bones

first the question: i can use the normal and the color (texture) map in blender, but does anybody know if blender has some channel to put the glow map on?

now the bones thing:
screenshot from blender
http://img695.imageshack.us/img695/1923/malphwrong.png

screenshot from the s2 modelviewer
http://img402.imageshack.us/img402/4420/malphright.png


as you can see his wings are twisted in a weird way in blender.

edit:
p.s: its the taunt.clip i used

Yuichi
02-28-2010, 11:49 AM
I thought he already fixed this.

theli
02-28-2010, 11:50 AM
1. map glow to emit

upload that model file somewhere i'll check what the problem is

also, make sure you are using the latest scripts version (just look inside script ... latest is "2010.02.25" currently)

Yurixy
02-28-2010, 12:51 PM
im sorry but i really didnt understand this...
this is not a add-on for 3ds max 8 ? this is an add-on or script to use in the Blender (this is another program to we create models?)

if is this, where can I download the Blender program? and its easy to install and use these scripts inside the program??

I want to make a new model for HoN, so, try reply my questions plz.. thx in advance! :)

t1ck
02-28-2010, 12:56 PM
i was actually using an old version, sorry posting fixed bugs!!

i had downloaded it ages ago and downloading it again made firefox name it k2_import(2).py which i didnt notice :)

t1ck
02-28-2010, 12:57 PM
im sorry but i really didnt understand this...
this is not a add-on for 3ds max 8 ? this is an add-on or script to use in the Blender (this is another program to we create models?)

if is this, where can I download the Blender program? and its easy to install and use these scripts inside the program??

I want to make a new model for HoN, so, try reply my questions plz.. thx in advance! :)
did you even read the first page?

Yurixy
02-28-2010, 01:03 PM
did you even read the first page?
even reading i didnt understand how this works...
the thread is some confusing, it would be more simple if better explained :smile:

the .py files are for what? 3ds max8? blender? (where is the download link for blender if this is really a program)?

Yurixy
02-28-2010, 01:06 PM
hm strange.. blender.org is off for me.. oO'

edit: now its working.. im downloading the blender-2.49b-windows.exe , i hope this is the right program.. haha!

edit2: just to add content = http://www.python.org/download/ this is needed for the program to run =)

t1ck
02-28-2010, 01:31 PM
dont run the .py files with python directly.
python should already be included in the blender download.
just place them in the right directory.
for linux that would be ~/.blender/scripts/
in windows i guess its something like %appdata%/blender....

then in blender go to file, import and there it shows up as "k2 / hon ..."

t1ck
02-28-2010, 01:32 PM
p.s.: with the new version of the importer my malphas is happy now :)
http://img696.imageshack.us/img696/2689/render1l.th.jpg (http://img696.imageshack.us/i/render1l.jpg/)

Yurixy
02-28-2010, 01:38 PM
yup, im figuring out, after some headaches here... im very noob with this stuff, i only know to make textures... but i want to try make a new model...

t1ck
02-28-2010, 02:12 PM
blender is hard to get in and tends to drive you crazy.
you should start with some simple tutorials, but dont get toooo used to it, the blender UI is about to change drastically (with the upcoming v2.5).
but i dont want to discourage you, blender is like the most powerfull 3d tool i know and it doesnt cost a penny, so its definitely is worth learning!
it also has a very good/nice community.

if you can do textures, maybe you can team up with somebody that can make models :)

Yuichi
02-28-2010, 02:22 PM
blender is hard to get in and tends to drive you crazy.
you should start with some simple tutorials, but dont get toooo used to it, the blender UI is about to change drastically (with the upcoming v2.5).
but i dont want to discourage you, blender is like the most powerfull 3d tool i know and it doesnt cost a penny, so its definitely is worth learning!
it also has a very good/nice community.

if you can do textures, maybe you can team up with somebody that can make models :)
I only knew how to make textures too. After 4-5 weeks of blender I can finally make some simple models and get them to the game.
All I did was read about every tutorial I could find, practice and experiment.
I cant even count how many times I gave up at doing something and later realized that hey this is so easy...
After you start using blender and get used to the shortcuts its hard to use other programs :D

t1ck
02-28-2010, 05:56 PM
After you start using blender and get used to the shortcuts its hard to use other programs :D

i actually used blender a lot, then took a looooong break and forgot about all the shortcuts.
now i started again and its actually no problem,
the only weird thing about blender is the very specific UI, but once you got into the "way of blender thinking" its very efficient and you will never want to use any other tool again :)

TheDarkerOne
02-28-2010, 06:41 PM
I can't find where to place the .py files on their website.

ReDsKiN
02-28-2010, 07:24 PM
.py files go into C:\Users\<name>\AppData\Roaming\Blender Foundation\Blender\.blender\scripts
I'm using Windows(Vista), so it may be different for some people

TheDarkerOne
02-28-2010, 08:19 PM
Thanks. That folder was hidden for some reason but now it works.

Yuichi
03-02-2010, 11:49 AM
Any ideas what could cause this? Look at the hands and the head.
http://img408.imageshack.us/img408/3964/malikenbugged.png

theli
03-02-2010, 12:06 PM
Any ideas what could cause this? Look at the hands and the head.
http://img408.imageshack.us/img408/3964/malikenbugged.png
if it looks ok in blender then upload blend and i'll check what is wrong

Yuichi
03-02-2010, 12:32 PM
Looks like that in blender too. Ill doublecheck if I have the most recent version.
Yep I have the most recent version.
Also Jeraziahs "cloth/cape/whatever" has some minor issues too.
Download seems to have some issues too. It seems that I break everything today :D
Puts that to start of every k2_import.py that I try to download.
Edit: Noticed that you have somehow managed to sneak update this so that I didnt notice.
Got 1 day older script than that on the first post.
Still the same bug.

<html>
<head>
<title>Server Error</title>

</head>
<body>
<h1>Server Error</h1>
An internal server error occurred

</body>
</html>nton Romanov"

TheReaper
03-02-2010, 12:51 PM
Looks like a smoothing groups problem (or that's what it looks like if it was in 3ds Max). Can't give specific advice for blender though...

Yuichi
03-02-2010, 12:57 PM
Looks like a smoothing groups problem (or that's what it looks like if it was in 3ds Max). Can't give specific advice for blender though...
Its just that the uv map is all messed up. Its like someone did a puzzle and forced the pieces on random locations.
Its fixed by unchecking remove doubles but no idea how the game likes it
The result is blockyness and normal map seams.

theli
03-02-2010, 01:16 PM
Got 1 day older script than that on the first post.
Still the same bug.

still the same bug on import with latest script?


<html>
<head>
<title>Server Error</title>

</head>
<body>
<h1>Server Error</h1>
An internal server error occurred

</body>
</html>nton Romanov"
whats that?

also, i have no trouble downloading

theli
03-02-2010, 01:22 PM
i just checked, there is, indeed an uv-screw-up bug on import when 'remove doubles' is checked

i'll try to fix that

Yuichi
03-02-2010, 01:56 PM
Thanks.
Still got that download issue but its not so bad since I can just fix it with little editing.
Its weird that it only happens with the import script.
Puts those lines in the start of the .py file.
Ill just do some work on the animations until you get that fixed. :D

theli
03-02-2010, 02:18 PM
Ill just do some work on the animations until you get that fixed. :D
you can just import without 'remove doubles' checked

and then just remove doubles with blender (mesh->remove doubles in edit mode with allvertices selected) that works ok

Yuichi
03-02-2010, 02:20 PM
you can just import without 'remove doubles' checked

and then just remove doubles with blender (mesh->remove doubles in edit mode with allvertices selected) that works ok
Last time I tried to do that long time ago the uvmap got all weird but Ill try it now.

theli
03-02-2010, 02:23 PM
Last time I tried to do that long time ago the uvmap got all weird but Ill try it now.
you had that cause old export script versions didn't support several uv coordinates per single vertex

Yuichi
03-02-2010, 02:42 PM
you had that cause old export script versions didn't support several uv coordinates per single vertex
Okay that makes sense. Thanks again.

theli
03-02-2010, 02:44 PM
Okay that makes sense. Thanks again.
i already fixed the import script anyway :P
current version: 2010.03.02

berocca
03-06-2010, 01:46 PM
I've got a little question. How hard would it be to import models from WC3 to HoN, having no previous experience in blender. Is there an easy way or do I simply have to go through the entire tutorial and learn everything, even though I don't plan on changing anything.

Yuichi
03-06-2010, 03:29 PM
I've got a little question. How hard would it be to import models from WC3 to HoN, having no previous experience in blender. Is there an easy way or do I simply have to go through the entire tutorial and learn everything, even though I don't plan on changing anything.
The problem is that you cant import animations.
Importing models is pretty easy once you try it few times and have all files set up so that you can make it fast.
Ive also said this before but Wc3 models look really bad in this game.
They are so low detail that when put in to the game where everything else is so high detailed they just look bad.
Animating them would be too much work and there really isnt anyone in here who has done that or is good at it.
It would take ages from a complete noob and no one really seems to want to do that.

berocca
03-06-2010, 05:01 PM
I don't really care about the grafics, not now anyway.
About the animations, I thought I read that you could import animations, however, if you can't import animations, would the model simply float around in the air?

Yuichi
03-06-2010, 07:52 PM
I don't really care about the grafics, not now anyway.
About the animations, I thought I read that you could import animations, however, if you can't import animations, would the model simply float around in the air?
The models would just slide on the ground.
They would not move no matter what you try to do.

berocca
03-06-2010, 08:32 PM
Ah, that simply sucks.
Until recently I imagined (in my happy, colourful fantasyworld) that the animations could be stored from the previous hero :D. Oh well, I give up then.
Thank you for the help.

gahd_damn
03-07-2010, 02:14 PM
You can always make you OWN animations berocca.

WCIII models are kinda low-res to begin with; better to make a new model based of of them.

Kekoticmyth
03-10-2010, 07:00 AM
Hi.
I have been recently getting into some newbie modding, just editing stuff in notepad++ etc, and I wanted to try some modelling. I like learning all this stuff and have done a lot of photoshop and other things like map making before.

When I go to file>import>K2/HoN (.model/.clip) it says 'Error - Python script error please check console'
Console says


File"<string>", line 1, in <module>
File"C:\etcetc\Blender\.blender\scripts\k2_import.py", line 37,
in <module>
Import os
Import Error: no module named osI installed Blender, put the files the OP made into the scripts section and went to import.
Is there something else I need to be doing?


Edit: Nevermind I originally installed Python 3.1 instead of 2.6.4, installed 2.6.4 it's working now.

theli
03-10-2010, 10:30 AM
Edit: Nevermind I originally installed Python 3.1 instead of 2.6.4, installed 2.6.4 it's working now.
yup, it needs python 2.6

Jaycoob
03-11-2010, 11:16 PM
hey can joo tell me how to install/use these scripts to blender? thnks!

MaxGhost
03-11-2010, 11:19 PM
hey can joo tell me how to install/use these scripts to blender? thnks!

Is it so hard to read the thread for instructions?

Also, if you've never done modeling, don't expect it to be easy.

Jaycoob
03-11-2010, 11:25 PM
Of course I am not expecting this to be easy, but nothing will be lost to just try anyways... Blender is such a confusing program, what file does it specifically open?

theli
03-12-2010, 12:29 AM
Of course I am not expecting this to be easy, but nothing will be lost to just try anyways... Blender is such a confusing program, what file does it specifically open?
sorry, but this is not Blender support thread, read tutorials linked in OP and documentation on official site.

gahd_damn
03-12-2010, 03:42 AM
you install blender, you install python, you download the .py files, you put them in blender's python script folder.

Simple.

Yuichi
03-16-2010, 11:49 AM
Just thought I would ask this.

Double clicking *.model file would open blender and automagically import it.
Same with *.clip files.

Is there any way to get this kind of thing?
Is it even possible?

theli
03-16-2010, 02:35 PM
Just thought I would ask this.

Double clicking *.model file would open blender and automagically import it.
Same with *.clip files.

Is there any way to get this kind of thing?
Is it even possible?
I don't think its possible

gahd_damn
03-17-2010, 03:00 AM
that's windows file assoiation, you can do it if you feel like buggering around with your registry and having it trigger an import script.

MaxGhost
03-17-2010, 10:22 AM
that's windows file assoiation, you can do it if you feel like buggering around with your registry and having it trigger an import script.

If you figure out which keys to change, etc, let us know! I'd really love to know how if you can figure it out.

Solidsneak
03-18-2010, 12:56 AM
Theli, can you talk a little bit about the process used for MarioSmith? I've got various models from Super Smash Bros Brawl running in Blender, and was curious as to even a thin set of guidelines to working on the mods.

From what it seems, the Mario model was simply used to replace the Blacksmith model. All of his animations are intact as created by S2.

My question, is how the Mario model is (converted?) to be used in place of the Blacksmith model. I'm working on replacing Swiftblade with Link, and currently think that Jereziah's character animations would be best suited for another model using a sword and shield. The mod would obviously still use Swiftblade animations for abilities.

Any insight greatly appreciated.

theli
03-18-2010, 02:16 AM
for MarioSmith i posed mario to match bs rest pose, applied that pose to mesh, removed armature and replaced it with original bs armature

Solidsneak
03-18-2010, 03:50 PM
Does the export script essentially convert or repackage the model to be a .model HoN file?

theli
03-18-2010, 04:06 PM
well, yes ... export script stores all meshes in a current scene to a single .model file

Solidsneak
03-19-2010, 05:00 PM
for MarioSmith i posed mario to match bs rest pose, applied that pose to mesh, removed armature and replaced it with original bs armature

How do you apply a pose to a mesh?

Yuichi
03-19-2010, 05:05 PM
How do you apply a pose to a mesh?
There are plenty of blender tutorials that will tell you how to do this.
There are also plenty of blender related forums and you will probably find better support over there.

Just read some tutorials and you will eventually get it.

Solidsneak
03-19-2010, 09:34 PM
Whenever I try to use export (only with the script from this thread it seems) I get
IndexError: list index out of range

How do I counteract this?

theli
03-20-2010, 05:33 AM
you should have posted the whole error since it contains details on where this error occured ...

t1ck
03-20-2010, 03:20 PM
hi, im having some trouble with the export.

this is what i've done:
- import a savage2 model
- changed the mesh a bit
- export (tried various combinations of the settings
then this error appears in the console:


==========================export start=======================================
triangulating
triangulating
Traceback (most recent call last):
File "/home/tick/.blender/scripts/k2_export.py", line 657, in handle_button_event
CreateK2Mesh(mesh_filename.val)
File "/home/tick/.blender/scripts/k2_export.py", line 330, in CreateK2Mesh
ftexc = [[(round(uv.x, 6), round(uv.y, 6)) for uv in f.uv] for f in mesh.faces]
ValueError: face has no texture values


do i have to apply any textures to export the model? cant i just edit the model without touching the textures?

Yuichi
03-20-2010, 03:40 PM
You could upload the model you edited in mediafire or something and I could take a look at it.
This would allow me or theli to see if its your editing that causes this or the script.

I cant really say anything about that error since I didnt write the script.
I could only guess and it would be easier to see the model.
If you decide to upload it here just save it as .blend.

Just trying to help in the way I can...

t1ck
03-20-2010, 04:39 PM
here you go
http://rapidshare.com/files/365983240/malph2.blend
its 16mb because i packed the textures.
btw regarding the export problem it doesnt matter if there are textures in or not.

Yuichi
03-20-2010, 04:54 PM
It wasnt the script it was the model.
If you look at the outliner.(One of the window types.)
You can see an object called Plane.
After deleting that the export worked just fine. (Right click that and choose delete.)
I couldnt figure what it was.

Also a question for theli.
Does it matter if the scene has cameras or lamps in it?
Do these affect the export in any way?
I havent tried that and always export without them just in case.

Solidsneak
03-20-2010, 08:57 PM
Oops, sorry that I didn't post the entire error.


==========================export start=======================================
Traceback (most recent call last):
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\k2_ex
port.py", line 657, in handle_button_event
CreateK2Mesh(mesh_filename.val)
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\k2_ex
port.py", line 360, in CreateK2Mesh
write_block(file,'mesh',create_mesh_data(mesh,vert ,meshindex))
File "C:\Program Files (x86)\Blender Foundation\Blender\.blender\scripts\k2_ex
port.py", line 116, in create_mesh_data
meshdata.write(struct.pack("<B",len(mesh.materials[0].name)))
IndexError: list index out of range
I'm assuming that the mistake is really simple since I'm a noob at this. Also, when using the exporter I'm unsure of what animation file to use?

Anyways, here's a link to the blend if anyone can assist. Thanks!
http://www.mediafire.com/?jyolmzbjjnu

theli
03-21-2010, 03:53 AM
It wasnt the script it was the model.
If you look at the outliner.(One of the window types.)
You can see an object called Plane.
After deleting that the export worked just fine. (Right click that and choose delete.)
I couldnt figure what it was.

Also a question for theli.
Does it matter if the scene has cameras or lamps in it?
Do these affect the export in any way?
I havent tried that and always export without them just in case.
yeah, it tries to export all objects of type 'Mesh' in current scene + first object of type 'Armature', lamps and cameras should not matter
i'll think i'll add 'export selected only' somewhere in the future :-/


Solidsneak, you need to have material assigned to your meshes

t1ck
03-21-2010, 11:02 AM
thanks that worked!!

the model was a ground plane i used for rendering, i had it invisible (moved to the second 'layer') while working on the mesh.

t1ck
03-21-2010, 11:17 AM
still no full success, when i overwrite the .model file in the game, i have the new mesh, but no animations.
i can see the particles and effects moving (e.g. when i attack or taunt), but the mesh doesnt follow...

Yuichi
03-21-2010, 02:06 PM
Interesting...
I dont know what to do about that.
Its the same thing over here when I try it with the model you uploaded.
I hope theli knows more about this :)

theli
03-21-2010, 05:38 PM
t1ck , triangulate your mesh before exporting... script triangulates automatically but loses vertex groups then :( .. i'll see if i can fix that in script ...
for now just make sure your meshes dont have quads before exporting

BlacRyu
03-23-2010, 07:45 PM
Can anyone separate this into two models? I have no clue how to use blender, plus I tried importing it and it didn't seem to work right (animation looked all screwed up and there was a big box around the whole thing).
savageTurret.zip (http://www.mediafire.com/?iyjzkizmbde)

It's already divided into multiple meshes I think, just need to save them as separate models so I can make the top rotate.

theli
03-24-2010, 05:31 AM
BlacRyu, in fact there are more then two .. like .. each leg is a separate mesh
http://dl.dropbox.com/u/4443078/temp/turret_legs.model
http://dl.dropbox.com/u/4443078/temp/turret_gun.model

on a side not: i updated scripts a bit

RocketLLama
03-29-2010, 11:20 PM
I cannot for the life of me get exporting to work at all.

Could someone explain to me what could cause this error?

TypeError: Mathutils.DotVecs(): expects (2) vector objects of the same size

theli
03-30-2010, 09:45 AM
RocketLLama , what version of blender are you using?
i have no idea why that line of code fails for you
it would help if you upload (pm it if don't want make it public) your .blend file

RocketLLama
03-30-2010, 02:50 PM
Yeah i figured the line of code would matter, but it was super late last night.

Im fairly sure im using version 2.49.

theli
03-30-2010, 03:57 PM
Yeah i figured the line of code would matter, but it was super late last night.

Im fairly sure im using version 2.49.
the problem is - while deleting some parts of a mesh you deleted faces but that left some vertices which do not belong to any face anymore...
you can get rid of those orphaned vertices this way:
select mesh, switch to edit mode, select all , deselect vertices with material1 assigned, delete

RocketLLama
03-30-2010, 04:36 PM
the problem is - while deleting some parts of a mesh you deleted faces but that left some vertices which do not belong to any face anymore...
you can get rid of those orphaned vertices this way:
select mesh, switch to edit mode, select all , deselect vertices with material1 assigned, delete

Thanks

So`lare
05-13-2010, 01:14 AM
Can anyone help me to change color of rune model plz? Really raped by blender T___T Or just tell me which steps to do :-s I've tried to change model's color, and when I export, it tells me face has no textures >"< Even when I just import and export, did nothing, I still got this error :(

theli
05-13-2010, 01:19 AM
Can anyone help me to change color of rune model plz? Really raped by blender T___T Or just tell me which steps to do :-s I've tried to change model's color, and when I export, it tells me face has no textures >"< Even when I just import and export, did nothing, I still got this error :(
models has very little to do with color ... you need to edit textures for what you want to achieve

h3y
05-19-2010, 06:00 PM
What version of hon hod manager works with the retail release of HON now? I used to have mods working before they release the big UI update in beta about a month ago and I want to get them working again since I bought the game.

MaxGhost
05-19-2010, 06:24 PM
Read. The. Forums.

Jaycoob
05-28-2010, 11:21 PM
Can someone just explain to me how to install these scripts to blender? cause the link u gave leads to Blender's web page, I have no idea where to go next. just pls give me the step to step instructions in using these scripts. that way, it'd be easier. :/

DarkWorkx
05-29-2010, 05:20 AM
Excuse me, where can i download a s2z Importer for 3ds max or milkshape 3d??

Yuichi
05-29-2010, 10:26 AM
Excuse me, where can i download a s2z Importer for 3ds max or milkshape 3d??
There exists no such thing.
This is the only importer there is.

DarkWorkx
05-29-2010, 12:16 PM
When i import s2z files in blender it says error...

Yuichi
05-29-2010, 12:19 PM
When i import s2z files in blender it says error...
.s2z files are opened with winrar.
.model files are opened with blender.

DarkWorkx
05-29-2010, 12:40 PM
Oh i see... Thanks^^ I am a admin from one of warcraft 3 modding forums... if you need Game / Anime models we can help you...

Jaycoob
05-31-2010, 08:13 AM
Can someone just explain to me how to install these scripts to blender? cause the link u gave leads to Blender's web page, I have no idea where to go next. just pls give me the step to step instructions in using these scripts. that way, it'd be easier. :/

Sigh! can you guys just effing tell me where to put these phyton plug-ins? cause I srsly have no effing idea how to do it. how can simply just a link to their official website help? NO! ffs! such a simple question. yet not answered!

theli
05-31-2010, 08:20 AM
this is a second link in google's search results for 'blender installing python scripts windows' (http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Export_scripts#Creating_a_script)

Jaycoob
05-31-2010, 08:26 AM
wow, lol you know what? nvm, I give up ffs! I asked where to put the phyton files (exporter and importer) yet I get some link that leads to a noob tutorial (which doesn't even have sht) I cnt even find what I was looking for there. :/

theli
05-31-2010, 08:33 AM
wow, lol you know what? nvm, I give up ffs! I asked where to put the phyton files (exporter and importer) yet I get some link that leads to a noob tutorial (which doesn't even have sht) I cnt even find what I was looking for there. :/

you know, if you can't use search, read and follow simple instructions you shouldn't bother with this in the first place

http://img514.imageshack.us/img514/1234/scriptsp.png

Jaycoob
05-31-2010, 08:41 AM
ok, so I got it now, I got a model into Blender and exported it in HoN format, the problem is, how do I do it for the animations? :/

Jaycoob
05-31-2010, 08:52 AM
Lol! the Exporter thing is woorkingas intended or not? I click Export to export the model I importer into K2 HoN Format, but guess what? I get some shtty stuff that instead forces you to browse meshes and animations! wow, now how are we able to export now if that is the case?