Help! I'm new at this!
Moderators: winston, another_commander
-
- Poor
- Posts: 6
- Joined: Mon Jun 23, 2014 7:44 pm
Help! I'm new at this!
So, I'm looking to import some preexisting assets into an OXP. What I have is this:
-.obj files
-.dds textures
Along with Blender, Wings3d, and a couple random conversion tools I used to get to this point. I'm basically trying to figure out how to merge the textures with my .obj files, and convert the whole shabang into .dat files that can then be compiled into part of an OXP. I have done some poking around, and have not yet figured out how to get any of the Python conversion utilities to work.
Any suggestions?
-.obj files
-.dds textures
Along with Blender, Wings3d, and a couple random conversion tools I used to get to this point. I'm basically trying to figure out how to merge the textures with my .obj files, and convert the whole shabang into .dat files that can then be compiled into part of an OXP. I have done some poking around, and have not yet figured out how to get any of the Python conversion utilities to work.
Any suggestions?
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Help! I'm new at this!
Hi RebelRunner, welcome on this board (which seems to be the firendliest this side of Riedquat ) !
If you are lucky then simply convert all .dds to .png (for example with the free irfanview), run Obj2DatTex.py and replace all .dds extension to .png in the .dat file.
Check the [wiki]OXP_howto[/wiki] and [wiki]OXP_howto_model[/wiki] pages in the wiki, look into other ship OXPs and feel free to ask as many times as you want until you will be done, there are very helpful folks here.
If you are lucky then simply convert all .dds to .png (for example with the free irfanview), run Obj2DatTex.py and replace all .dds extension to .png in the .dat file.
Check the [wiki]OXP_howto[/wiki] and [wiki]OXP_howto_model[/wiki] pages in the wiki, look into other ship OXPs and feel free to ask as many times as you want until you will be done, there are very helpful folks here.
-
- Poor
- Posts: 6
- Joined: Mon Jun 23, 2014 7:44 pm
Re: Help! I'm new at this!
How and where would I run the Python script? I had originally tried to set it up as a Blender plugin, but this was either incorrect or I did it wrong.
Thanks for the quick and friendly response
Thanks for the quick and friendly response
- maik
- Wiki Wizard
- Posts: 2028
- Joined: Wed Mar 10, 2010 12:30 pm
- Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)
Re: Help! I'm new at this!
Hi RebelRunner, and welcome.
You need to run the Python script from your command line. If you're on Linux or Mac OS X, then your system should already come with a Python interpreter, on Windows you would need to install one first.
You need to run the Python script from your command line. If you're on Linux or Mac OS X, then your system should already come with a Python interpreter, on Windows you would need to install one first.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Help! I'm new at this!
G'day, RebelRunner, and welcome aboard!
To:
(To be honest, all the mesh-conversion scripts should be updated to include this small detail.. or better yet, be re-written to run on Python 3.x)
(I've also just updated the download link on the mesh-converters Wiki-page to point to GitHub, instead of BerliOS)
Note also that the script requires Python 2.6 or greater, but will not work with Python 3.x. This is possibly the problem when you tried using the script as a Blender plugin, since Blender uses Python 3.3. It is possible to force a script to use Python 2 on a computer which has both 2 & 3 installed. Simply change the first line of each script from:maik wrote:You need to run the Python script from your command line. If you're on Linux or Mac OS X, then your system should already come with a Python interpreter, on Windows you would need to install one first.
Code: Select all
#!/usr/bin/python
Code: Select all
#!/usr/bin/python2
(I've also just updated the download link on the mesh-converters Wiki-page to point to GitHub, instead of BerliOS)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
-
- Poor
- Posts: 6
- Joined: Mon Jun 23, 2014 7:44 pm
Re: Help! I'm new at this!
Thanks. I've got the conversion scripts you mentioned. I also figured out how to open up the Python interpreter, but am unable to figure out just how to run the scripts. If the script is located at C:\...\Obj2DatTex.py, what would the command be to run it? Additionally, when/where would I point the script to the .obj I'm trying to convert?
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Help! I'm new at this!
Well, to quickly steal borrow the answer from another thread:
(oh yeah.. and you don't need to go near the Python interpreter at all.. all the scripts are run from a Command prompt in the same manner as the above)
On Windows, you'd say "Command prompt" instead of "terminal", but otherwise, the procedure is identical.Mauiby de Fug wrote:Okay, it's been a while since I last did this, and I haven't got it set up on my computer yet, but I believe that you first of all need to have the Obj2DatTex.py file in the same folder as the file you want to convert. Then, open a normal terminal, andcd
into the folder. Then, try running something likepython Obj2DatTex.py ModelToConvert.obj
and see if that does something...
(oh yeah.. and you don't need to go near the Python interpreter at all.. all the scripts are run from a Command prompt in the same manner as the above)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Help! I'm new at this!
edit: sorry, should have read Dizzy's post above he's already got this covered
If you're on WIndows 7 you can quickly open a command prompt at the folder where you've put your ship .obj files and the Obj2DatTex.py script by holding down the shift key then right clicking on your folder in explorer, there'll be a new option "open command window here" on the pop-up menu
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
-
- Poor
- Posts: 6
- Joined: Mon Jun 23, 2014 7:44 pm
Re: Help! I'm new at this!
Okay, this is promising...now what is this 'cd' the thread Dizzy directed me to? A way to point Python to the proper folder? How would I use it?
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Help! I'm new at this!
Hmm... if my memory serves,
cd
as a typed command means 'call directory'.I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Help! I'm new at this!
http://www.google.com/#q=change+directory
If you do not want to type your commands again and again then open a text file, type into and save as something.bat (if I guess right and you use windows) then double click on this file. https://www.google.hu/#q=Batch+file - the wikihow page contain nice screenshots.
If you do not want to type your commands again and again then open a text file, type into and save as something.bat (if I guess right and you use windows) then double click on this file. https://www.google.hu/#q=Batch+file - the wikihow page contain nice screenshots.
-
- Poor
- Posts: 6
- Joined: Mon Jun 23, 2014 7:44 pm
Re: Help! I'm new at this!
Okay, so I changed the working directory as appropriate, entered
The file and script are in the same directory/folder as they should be. I'm really starting to get confused here.
python Obj2DatTex.py modelname.obj
, and got the error message IOError: [Errno 2] No such file or directory: 'modelname.obj'
.The file and script are in the same directory/folder as they should be. I'm really starting to get confused here.
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: Help! I'm new at this!
Try to give the whole path of .obj file like "c:\windows\modelname.obj" , and use the quotation marks if there is a space in the name.
Re: Help! I'm new at this!
And without wishing to state the obvious, modelname.obj should of course be replaced by the actual filename of your model's obj file. Also when you installed python it should have put itself onto your command line path (again presuming you're in Windows) and associated itself with .py files.
When I do this kind of thing, I usually just copy the script file into the same folder as the obj/mtl/png files and type
When I do this kind of thing, I usually just copy the script file into the same folder as the obj/mtl/png files and type
obj2dattex.py myWhizzyShip.obj
in a normal DOS command line prompt, where myWhizzyShip.obj is the name of the relevant obj file. I guess explicitly adding python to the start won't hurt, but if you have proper association set up (type path
at a DOS prompt and it should show your search path, if that includes the location that the python executable is in then your machine will see it wherever you type obj2dattex.py).My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- spud42
- ---- E L I T E ----
- Posts: 1576
- Joined: Wed Mar 26, 2014 10:11 am
- Location: Brisbane,Australia
Re: Help! I'm new at this!
you can right click on the py script and then select "open with" if python isnt in the list then use the browse button...
Arthur: OK. Leave this to me. I'm British. I know how to queue.
OR i could go with
Arthur Dent: I always said there was something fundamentally wrong with the universe.
or simply
42
OR i could go with
Arthur Dent: I always said there was something fundamentally wrong with the universe.
or simply
42