New model utilities

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

Ok, followed the instructions up to....

"4. Open a DOS-Box and switch to the folder with the model (and script). "

...switch to the folder with the model?

I'm a TOTAL noob here, it opens in C:/Programs and Documents/user

so I moved it all to there as a work around. the CMD box told me that obj2dat.py is not a command/function.

(nb, I'll have less gray hair at this rate.....I'm pulling it all out) :lol:
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

OK, I'm an idiot, needed to put the Tex bit in....still didn't work !
got this error-

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\User>obj2DatTex.py ship1.obj
File "C:\Documents and Settings\User\Obj2DatTex.py", line 1
SyntaxError: Non-ASCII character '\xfe' in file C:\Documents and Settings\User
\Obj2DatTex.py on line 1, but no encoding declared; see http://www.python.org/pe
ps/pep-0263.html for details


C:\Documents and Settings\User>

- any clue ?

ps..any idea what to say to ones wife when they ask why your screaming at the PC? :D
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: New model utilities

Post by Smivs »

Cmdr Radan wrote:

ps..any idea what to say to ones wife when they ask why your screaming at the PC? :D
"It's my computer and I'll swear at it in any way I want!"
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Re: New model utilities

Post by TGHC »

Cmdr Radan wrote:
ps..any idea what to say to ones wife when they ask why your screaming at the PC? :D
It's called an orgasm?
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

Smivs wrote:
Cmdr Radan wrote:

ps..any idea what to say to ones wife when they ask why your screaming at the PC? :D
"It's my computer and I'll swear at it in any way I want!"
any more diplomatic options?
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: New model utilities

Post by Smivs »

How about

"Why can't this thing be as nice and helpful as you, darling?"
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

Smivs wrote:
How about

"Why can't this thing be as nice and helpful as you, darling?"
I'll try that, but she will know there is something wrong :lol:
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: New model utilities

Post by Smivs »

Yeah, they seem to know, don't they?
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: New model utilities

Post by Svengali »

Cmdr Radan wrote:
Ok, followed the instructions up to....

"4. Open a DOS-Box and switch to the folder with the model (and script). "

...switch to the folder with the model?
Assuming you have a model with a UV-Map - if not you'll have to create it in Wings3D.

Once exported you have three files (.obj, .mtl and .png).

1. E.g. your model (myModel.obj, myModel.mtl and myModel_auv.png) is located in C:\Models.
2. Copy the obj2dattex.py in that folder (C:\Models) via Explorer.
3. Open a Dos-Box (cmd.exe).
4. Type in cd\
5. Type in cd Models
6. Type in Obj2DatTex.py myModel.obj

btw: Which Python version do you have installed?
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

hi thanks again for you help and patience.

1st. Python version 2.6.2
done as you say but found the problem (I think)

I only have 2 files, -
myModel_auv.png is missing, I'll go back into wings3d and redo the last parts again and re-export it.
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: New model utilities

Post by Thargoid »

You need to right-click on the texture file and export it ("make external" I think is the menu option - oh and make sure you do it in .png format, the default is .bmp iirc).
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

I'm giving up for tonight, (possibly for good) I cant seem to get anything to work :oops:

still get -

SyntaxError: Non-ASCII character '\xfe' in file C:\Documents and Settings\User
\Obj2DatTex.py on line 1, but no encoding declared; see http://www.python.org/pe
ps/pep-0263.html for details


I've got all 3 files and Obj2DatTex.py on 1 folder.

tried to do it backwards ie. got the dat2obj.py then tried to use the basic cobby. got the same error.

....I'll just go back to fixing REAL things, there is a fence needs my assistance (and it means I can get rid of some of this frustration with Hammer and Nails !!)


HUGE respect to all you guys who make OXPs and stuff, you are genious !
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: New model utilities

Post by Svengali »

Cmdr Radan wrote:
I'm giving up for tonight, (possibly for good) I cant seem to get anything to work :oops:

still get -

SyntaxError: Non-ASCII character '\xfe' in file C:\Documents and Settings\User
\Obj2DatTex.py on line 1, but no encoding declared; see http://www.python.org/pe
ps/pep-0263.html for details


I've got all 3 files and Obj2DatTex.py on 1 folder.

tried to do it backwards ie. got the dat2obj.py then tried to use the basic cobby. got the same error.
You could upload the files somewhere so we can take a look (and find out what goes wrong).
User avatar
Cmdr Radan
Competent
Competent
Posts: 63
Joined: Sat Feb 19, 2011 6:06 pm
Location: UK

Re: New model utilities

Post by Cmdr Radan »

WHOOT !!!!!!!!!!!!!

I did it at last !

I must give the most HUGE thanks to you all for your persistance.

Ok, I forgot to scale the ship, no biggie (it was tiny lol) spotted a post about that somewhere.

now to get the rest of it 'bolted' together, and Gimp me a skin.

Then figure out how to add a turret.
Ship:- Custom Cobra DTX ' The Narcissi '
Status:- Clean
Rating:- Competent
Occupation:- Trader/freelance private transporter
Location:- G1

'Would it help if I got out and pushed?'
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: New model utilities

Post by Svengali »

Cmdr Radan wrote:
I did it at last !
Very good .-)
Post Reply