View previous topic :: View next topic |
Author |
Message |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
Hi all,
Sometimes, when using Mr. F's "4ds Export" script to export models from 3DS Max to .4DS it throws up the following message mid-way through and stops:
"-- Runtime error: Map support not enabled for specified map channel: 1"
The part of the script it seems to get stuck on is highlighted in grey in the screenshot below:
Has anyone else had this and/or found a way around it?
Exporting to .3DS and putting the model through Zmodeler as an alternative messes up the mesh when I put it into the game.. _________________
The official Mafioso Mod thread
Last edited by AsaSK on Tue Jul 26, 2016 8:17 pm; edited 1 time in total |
|
Back to top |
|
 |
hdmaster
New Member


Joined: 14 Jan 2014 Posts: 3
12 Bank Notes
Items
|
|
This error occurs when there's no UV map on map channel 1. Here's a simple fix for the script:
1. Change line 184 to:
Code: |
if meshop.getMapSupport lodmesh 1 do
SplitVertsByMapVerts lodmesh
|
2. Change lines 525 - 540 to:
Code: |
if meshop.getMapSupport lodmesh 1 then (
face = ( (meshOp.getFacesUsingVert lodmesh #{i}) as array )[1]
faceverts1 = getFace lodmesh face
faceverts = #(faceverts1.x,faceverts1.y,faceverts1.z)
corrVert = 1
for j = 1 to faceverts.count do
(
if faceverts[j] == i then corrVert = j
)
mapface = meshOp.getMapFace lodmesh 1 face
mapvert = mapface[corrVert]
p01 = meshOp.getMapVert lodmesh 1 mapvert
--p01=GetTVert m i
WriteFloat f p01.x
WriteFloat f (1-p01.y)
--WriteFloat f 0
--WriteFloat f 0
) else (
WriteFloat f 0
WriteFloat f 0
)
|
|
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
Hi hdmaster, thanks for your reply!
I've put in the code at the lines you specified, but I now get the error:
This is the part of the script where it breaks down:
 _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
hdmaster
New Member


Joined: 14 Jan 2014 Posts: 3
12 Bank Notes
Items
|
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
Thanks for this, it works without a hitch It has flipped one of the planes making up the ground but apart from that it's perfect  _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
huckleberrypie
Member


Joined: 08 Aug 2014 Posts: 210
438 Bank Notes
Items
|
|
What about the import script? I end up getting similar errors whenever I import something i.e. vehicles or even simple stuff like weapons. |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
huckleberrypie wrote: | What about the import script? I end up getting similar errors whenever I import something i.e. vehicles or even simple stuff like weapons. |
Yeah does anyone have the import script? I've lost mine over a PC change.. _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
*Bump!*
Another query about Mr. F's export script, it doesn't seem to handle alpha channel/opacity mapping very well, but it's so much better than Zmodeler at exporting models properly.. has anyone had any success with opacity maps?
My textures renders fine in MAX but just shows up untextured in-game after being exported with Mr. F's script
(This is the MAX render, the 'bars' texture as it should look. In-game it just shows up as a blank face with no texture) _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
huckleberrypie
Member


Joined: 08 Aug 2014 Posts: 210
438 Bank Notes
Items
|
|
Also, has anyone had any luck with importing/exporting vehicles to .4DS using the script? I'd like to do vehicle conversions but I'm just not that used to tinkering with ZM1. |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 327
677 Bank Notes
Items
|
|
AsaSK wrote: | *Bump!*
Another query about Mr. F's export script, it doesn't seem to handle alpha channel/opacity mapping very well, but it's so much better than Zmodeler at exporting models properly.. has anyone had any success with opacity maps?
My textures renders fine in MAX but just shows up untextured in-game after being exported with Mr. F's script
<snip>
(This is the MAX render, the 'bars' texture as it should look. In-game it just shows up as a blank face with no texture) |
Do you mind sending me the model and texture via PM? I can have a look if you want. |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 327
677 Bank Notes
Items
|
|
AsaSK wrote: | *Bump!*
Another query about Mr. F's export script, it doesn't seem to handle alpha channel/opacity mapping very well, but it's so much better than Zmodeler at exporting models properly.. has anyone had any success with opacity maps?
My textures renders fine in MAX but just shows up untextured in-game after being exported with Mr. F's script
<snip>
(This is the MAX render, the 'bars' texture as it should look. In-game it just shows up as a blank face with no texture) |
Ok I found out what's wrong: The face group references the wrong material. The 'bars' material is material 7, but the face group references material 14. To fix that, open the 4ds with a hex editor, jump to offset 0xD6D1 and replace the 0x0F with 0x08.
It's possibly a bug in the export script. |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
ASM. wrote: | AsaSK wrote: | *Bump!*
Another query about Mr. F's export script, it doesn't seem to handle alpha channel/opacity mapping very well, but it's so much better than Zmodeler at exporting models properly.. has anyone had any success with opacity maps?
My textures renders fine in MAX but just shows up untextured in-game after being exported with Mr. F's script
<snip>
(This is the MAX render, the 'bars' texture as it should look. In-game it just shows up as a blank face with no texture) |
Ok I found out what's wrong: The face group references the wrong material. The 'bars' material is material 7, but the face group references material 14. To fix that, open the 4ds with a hex editor, jump to offset 0xD6D1 and replace the 0x0F with 0x08.
It's possibly a bug in the export script. |
Hmm.. I can only fine the lines 'D61B', 'D656', 'D691' and 'D6CC' in the .4ds that are similar to the one you described.. presumably I am making a silly mistake and not using XVI32 properly?
EDIT:
Sorry, XVI32 displays the offset in a weird way - used another Hex editor and got it thanks ASM! _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
mafioso313
New Member


Joined: 14 Jan 2016 Posts: 5
16 Bank Notes
Items
|
|
AsaSK wrote: |
Yeah does anyone have the import script? I've lost mine over a PC change.. |
Sorry, Do you have the import script ?
I am new here and can't seem to find it. Thanks. |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
mafioso313 wrote: | AsaSK wrote: |
Yeah does anyone have the import script? I've lost mine over a PC change.. |
Sorry, Do you have the import script ?
I am new here and can't seem to find it. Thanks. |
I have, here.
Hmm, I have another problem trying to export from 3DS Max using Mr F's script, it gets stuck on the bit highlighted. Any ideas?
"-- Unable to convert: undefined to type: Integer" _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
AsaSK
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 785 Location: London, England 12004 Bank Notes
Items
|
|
*BUMP*
Sorry all, still having problems with the issue above. Does anyone know how to fix this? Below I've included a fresh screenshot for context:
 _________________
The official Mafioso Mod thread |
|
Back to top |
|
 |
|
|