FAQFAQ    Board RulesBoard Rules    SearchSearch    LotteryLottery    RouletteRoulette    UsergroupsUsergroups
     RegisterRegister  ProfileProfile    Log in to check your private messagesLog in to check your private messages    Shop    Log inLog in 
View posts since last visit View your posts View unanswered posts

[HELP NEEDED!] For those who model with 3DS Max

 
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Tools
View previous topic :: View next topic  
Author Message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Fri May 09, 2014 3:09 am    Post subject: [HELP NEEDED!] For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
hdmaster

New Member
New Member


Joined: 14 Jan 2014
Posts: 3

12 Bank Notes
Items

PostPosted: Fri May 09, 2014 11:44 am    Post subject: For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Fri May 09, 2014 1:06 pm    Post subject: Re: For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
hdmaster

New Member
New Member


Joined: 14 Jan 2014
Posts: 3

12 Bank Notes
Items

PostPosted: Fri May 09, 2014 1:29 pm    Post subject: For those who model with 3DS Max Reply with quote

Hmmm Thinking. Here's the modified script I tested in 3ds Max 2014: 4DS Export by Mr. F.
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Fri May 09, 2014 2:35 pm    Post subject: For those who model with 3DS Max Reply with quote

Thanks for this, it works without a hitch Smile It has flipped one of the planes making up the ground but apart from that it's perfect Very happy
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
huckleberrypie

Member
Member


Joined: 08 Aug 2014
Posts: 126

253 Bank Notes
Items

PostPosted: Fri Aug 08, 2014 2:47 am    Post subject: For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Tue Nov 04, 2014 8:14 pm    Post subject: Re: For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Tue Jan 05, 2016 12:23 pm    Post subject: For those who model with 3DS Max Reply with quote

*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 Sad



(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
View user's profile Send private message
huckleberrypie

Member
Member


Joined: 08 Aug 2014
Posts: 126

253 Bank Notes
Items

PostPosted: Wed Jan 06, 2016 5:23 am    Post subject: For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 79

183 Bank Notes
Items

PostPosted: Sat Jan 09, 2016 1:39 am    Post subject: Re: For those who model with 3DS Max Reply with quote

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 Sad

<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
View user's profile Send private message
ASM.

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 10 Jan 2014
Posts: 79

183 Bank Notes
Items

PostPosted: Sat Jan 09, 2016 5:02 pm    Post subject: Re: For those who model with 3DS Max Reply with quote

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 Sad

<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
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Sat Jan 09, 2016 6:45 pm    Post subject: Re: For those who model with 3DS Max Reply with quote

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 Sad

<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? Thinking

EDIT:

Sorry, XVI32 displays the offset in a weird way - used another Hex editor and got it Smile thanks ASM!
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
mafioso313

New Member
New Member


Joined: 14 Jan 2016
Posts: 5

16 Bank Notes
Items

PostPosted: Thu Jan 14, 2016 7:12 pm    Post subject: Re: For those who model with 3DS Max Reply with quote

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
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Sun Jan 17, 2016 3:05 am    Post subject: Re: For those who model with 3DS Max Reply with quote

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? Thinking



"-- Unable to convert: undefined to type: Integer"
_________________

The official Mafioso Mod thread
Back to top
View user's profile Send private message
AsaSK

Mafiascene Veteran Modder
Mafiascene Veteran Modder


Joined: 24 Feb 2013
Posts: 556
Location: London, England
7696 Bank Notes
Items

PostPosted: Tue Jul 26, 2016 3:10 pm    Post subject: [HELP NEEDED!] For those who model with 3DS Max Reply with quote

*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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mafiascene.com Forum Index -> Ask a Modder - Tools All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Generation Time: 0.034 | Queries: 19