Users browsing this thread: 1 Guest(s)
MaxBMD update
#1
I've started to update MaxBMD script from EmuTalk.
GitHub project: Link
This version is able to import a little more models. Some annoying issues are fixed.

[Image: MaxBMD.png]

However, I stumbled upon adding multiple texture coordinates and vertex color alpha component. If you are really good in MaxScript, please check this branch.
You may need a model to test alpha, here it is: model1.bmd
The alpha on this model must look like shown on the screenshot below. However, it is not updated in viewport, until you try to change it's value. Check it out, it's hard to describe.


Attached Files Thumbnail(s)
   
Reply
Thanked by: TGE
#2
At this rate you might as well consider rewriting it as a max plugin rather than a script. I can't see this script being very fast with how awfully slow the maxscript parser is.
Reply
Thanked by:
#3
this... plus it doesnt work for max users thats over 2012...

anything 2012 and up...
>> MAXScript FileIn Exception:
-- Compile error: Duplicate struct member name: chanControls
-- In line: chanControls = <<
Reply
Thanked by:
#4
I have no time and knowledge to rewrite it. There is an another much more important project I'm working on. But I'll check what's wrong with new versions.
Reply
Thanked by:
#5
Installed 3ds Max 2015 to try the script with it. It works, however, there are some more issues appeared.

1. To get rid of the error when you run the script, find this code in MaxBMD.mc. It is around line 2600.
Code:
-- 0, 1 - index into color1 (e.g. map_delfino3.bmd)
-- 6, 7 - index into color2 (e.g. mo.bdl)
-- 2, 3, 4, 5 - index into chanControls
chanControls = #(), -- u16[8];

color1 = #(), --u16[2];
chanControls = #(), -- u16[4];
color2 = #(), --u16[2]; //not in MAT2 block

Remove the second line with chanControls in it.

2. This version of 3ds Max has a different positioning of textures with Mirror option enabled. To fix these textures look for these lines in the script:
Code:
_currMaterial.diffusemap.coords.u_offset = 0.5
_currMaterial.diffusemap.coords.V_offset = 0.5

In total there are 4 of them. Set their values to 0.0

3. When you import any model, it will have broken normals. To fix them, remove or comment out this code around line 4010.
Code:
for i = 1 to vertices.count  do
(
    if (normals[i] != undefined) then
        setNormal modelMesh i normals[i]
)

4. Default Shaded preview mode causes draw order issues with materials that use Opacity map. Switch to Realistic mode or something else.

Maybe there are even more issues, but that's all what I could find for now.
Reply
#6
Just when I thought I wouldn't see any more surprises, this pops up. MaxBMD is like super old, if you wanted to make a proper thing you'd want to look at Whitehole which has most stuff looking like in-game. I can appreciate updating it though, the more ways to reach an end the better.
Reply
Thanked by:
#7
(07-23-2015, 04:25 AM)NWPlayer123 Wrote: Just when I thought I wouldn't see any more surprises, this pops up. MaxBMD is like super old, if you wanted to make a proper thing you'd want to look at Whitehole which has most stuff looking like in-game. I can appreciate updating it though, the more ways to reach an end the better.
But does Whitehole also supports exporting?
Reply
Thanked by:
#8
What exactly IS whitehole? Ouch!

and ill try fixing the script later with what u said Avatarus

edit:
got the script to work just fine now! coolio~
altho this 1 model still gives me errors

o well, at least it works fine for me now

edit2:
when it comes to the alpha... i changed the value's, but it didnt fix itself... mind giving us a more detailed explanation to fix that?
model from GCN game with WWHD textures applied
[Image: SOQpPB5.jpg]
Reply
Thanked by:
#9
(07-23-2015, 10:26 AM)Demonslayerx8 Wrote: What exactly IS whitehole? Ouch!

and ill try fixing the script later with what u said Avatarus

edit:
got the script to work just fine now! coolio~
altho this 1 model still gives me errors

error
NYI: Fan

o well, at least it works fine for me now

Whitehole is the SMG2 level editor.
Also regarding the error, appears to be that triangle fan indices aren't supported yet.
Reply
Thanked by:
#10
ah i see... so thats why the last boss fight stage wont import... bummer :c

any idea on how i can fix the alpha value's tho? it wont fix on my end lol
Reply
Thanked by:
#11
I can only guess, but I think the reason of alpha not being assigned correctly is how vertex colors (and alpha) assigned to them. Change alpha for just one vertex and you'll see that everything with the same color will be changed as well. Same goes to vertex colors cuz they are using the same indices in BMD format.
It appears, these vertices are welded on vertex color (and alpha) map, same how you can weld their texture coordinates using Unwrap UVW.
Reply
Thanked by:
#12
well, did what u said.. no dice.. i know that some scripts act different between 2014 and 2015...

Reply
Thanked by:
#13
I've assigned alpha through the Editable Mesh properties. There it shows correct alpha values, but they are not matching to what is drawn in viewport. Try to import the model from the first post.
Reply
Thanked by:
#14
hmm i see... well dang.. i'd like it if they were assigned to the vertex colors.. since im a brawl stage maker, its useful if its in the vertex paint.. i was able to get it to show through edit mesh, but its somewhat of a nice breakthrough.. hope ya know what im trying to say tho lol
Reply
Thanked by:
#15
(07-24-2015, 01:33 AM)Demonslayerx8 Wrote: hmm i see... well dang.. i'd like it if they were assigned to the vertex colors.. since im a brawl stage maker, its useful if its in the vertex paint.. i was able to get it to show through edit mesh, but its somewhat of a nice breakthrough.. hope ya know what im trying to say tho lol

Do they get exported to the DAE?
Reply
Thanked by:


Forum Jump: