• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

BlizzImporter upgrade?

Status
Not open for further replies.
Level 7
Joined
Aug 23, 2014
Messages
208
Hello dear modelers.

Not so long ago, I began to try to model unit for Gaias ORPG.
After hours of searching, I found that BlizzImporter script works best with Blizzard Art Tools.
However, it has some problems: it creates a new line of animation and it breaks events. Also, it does not support the import of visibility, ribbons and possibly other more complicated things.

Therefore, I decoded import script and rewrote it a little. Now it keeps sequence as is and events works good. I also tried to make visibility import algorithm, it is quite buggy, but works :)

So I want to know: Can I share result without author's (ProFeT) permission or it's prohibited?

And does it make sense to upgrade this script, or everybody already using NeoDex instead of Art Tools?
 
Level 7
Joined
Aug 23, 2014
Messages
208
try contacting him through email. Just ask for permission. I doubt he'll have any trouble as far as you reencrypt the script on release.

Thanks!
His email is hidden on the forum, but i wrote a personal message. I hope he will get an email alert about it.

I have finished visibility script. It correctly imports visibility from warcraft 3 standart models. However, errors may occur with edited models, because script is very sensitive to excess of visibility keys. Example with footman visibility in attachment.
I took as the basis that all elements of the scene are visible by default. Therefore, each 0 key in visibility marks all animation as hidden (if it placed at animation first frame, else it will look for closest opposite key in animation and create it if it doesn't exist).
You can see visible frames between animations. You can delete it, but after exporting Art Tools will create keys with 0 anyway, so it doesn't matter.
Also script trying to merge all visibility in frame to highest possible parent. You can see what main model animation is merged at bone_root, and cantine/handle/gutz merged as independent meshes.
P.S. Optimization of the script is terrible, because i used "voodoo coding", honestly do not know how maxscript works exactly :) just "try and run" tactics
 

Attachments

  • FootmanVisibility.jpg
    FootmanVisibility.jpg
    377 KB · Views: 102
You may need reduce the keys before importing
Code:
	local keys = vis.keys
	local times = vis.times
	for i = 1 to keys.count do
	if (keys[i] > 0) then
		keys[i] = 1.0
	else
		keys[i] = 0.0
	for i = keys.count to 2 by -1 do
		if keys[i] == keys[i-1] then
		(
			deleteItem keys i
			deleteItem times i
		)

Afterwards just create an On_Off controller:
Code:
		obj.visibility = On_Off ()
		obj.visibility.controller = On_Off ()
		local c = obj.visibility.controller
		local keys = ablock.keys
		if keys[1] > 0.1 then
			addNewKey c 0f
		deleteItem ablock.times 1
		for t in ablock.times do
			addNewKey c t
		c
 
Status
Not open for further replies.
Top