Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
01/14/2017 01:49 AM <DIR> ..
01/13/2017 09:34 AM 10,327 Obj_file_decoder.py
01/14/2017 01:47 AM 764 test3_blender.mtl
01/14/2017 01:47 AM 1,158,137 test3_blender.obj
3 File(s) 1,169,228 bytes
2 Dir(s) 777,362,202,624 bytes free
G:\Projects\Climbey_level_edit\scenes\level_test_01_convert\test>Obj_file_decoder.py
Traceback (most recent call last):
File "G:\Projects\Climbey_level_edit\scenes\level_test_01_convert\test\Obj_file_decoder.py", line 10, in <module>
import numpy as np
ImportError: No module named numpy
G:\Projects\Climbey_level_edit\scenes\level_test_01_convert\test>
I get this error when trying to run the script. I tried an obj file created by maya and blender. I'm using the newest version of python and I'm trying to run it from command prompt.
Looks like you don't have numpy installed, you can download it at https://sourceforge.net/projects/numpy/. Thank you for including the error message.
Yes. Use the material names "[CameraRig]" and "Finishline" without quotes. Only have one of each. Their size and rotation are hard-coded for error reasons, altering these parameters in the .obj file will do nothing.
If you are using blender: create a rectangle object, give it a material named "Metal", create all other metal blocks by making a copy of the initial "Metal" block, the will automatically be assigned the materials "Metal.001", "Metal.002", "Metal.002.001", etc.. since the code drops everything in the material name after the first period these will all be assigned the material "Metal".
Valid type names are:
"Icy", "Metal", "Glass", "Grabbable", "Spikes", "Jumpy", "GravityField", "[CameraRig]", "Finishline"
My .obj file export settings: http://imgur.com/c8nhhLn. (see the edits I made in my previous post)
Any thoughts on adding Pyside as a dependency? If so I could knock up a simple UI to make it a bit more easy to use.
Yeah, its definitely not a golden piece of code. I've never heard of Pyside. I'm all for making the script easy to use, but at the moment I don't know exactly what a simple UI's (purpose would be)/(would add to it). Let me know if you have an idea though. Since I have a version which "works" without Pyside, I would probably default to it if importing Pyside fails.
You could also use the GUI for options like setting the level settings (number of checkpoints, etc.) for the files you convert. Plus it's just generally more user friendly for people who aren't used to the command line.
You can find my code here: https://github.com/DrHibbitts/Climbey_File_Converter
To get the same behaviour as you had by default you now need to do "python Main.py -r" as it does not recurse through directories by default.
Would you be willing to add a license such as MIT in to your repository so that it's a bit clearer about me releasing the code?
It's still a work in progress but should be a much more generic framework for building on now.
Wow, that is very well written. I see you are a fan of dictionaries :p. Thaks for taking a pass at the code. So I've never done the Github thing before, and since your code is better written, is the idea that your code becomes the new go-to code, and I should link to your github in the main description, or should i overwrite my github with your stuff?
I'll do that as soon as i have access to a proper internet connection and a PC (both are in short supply a.t.m.)
Sorry for the delay, I've been obsorbed in climbey level creating. If you've used the code, have you noticed that the climbey level is mirrored on...the x-axis?... Need to know if its my Blender .obj export settings or a change I need to make to the code.
Thanks! Dictionaries and lovely and make things nice and readable which I'm a fan of for stuff like this. Plus they serialize really nicely for JSON which is what the Climbey files are stored in.
Normally the way it would work is I'd create a pull request on your repo which you can then choose to merge in, however because it was such a large change and it's now more general so it can handle more than OBJ files in the future I kept it separate for now. I'm not opposed to merging it back at some point though, although perhaps a rename of the repo is in order to reflect the more general nature of it?
I've actually only tested some very basic levels and wasn't paying too much attention to axes, I'm actually busy this weekend but I may have a play next week when I get some more time. Probably the easiest way to check is to make a little axis guide in blender, have three cuboids, one along each major axis (+x, +y, +z) and give them a different material so you can identify them. When you import them you should be easily able to see the axis system. It's quite likely that Unity is using a different coordinate system to Blender so we may have to do a coordinate system transform. (They're pretty trivial, just a matrix multiply, or you can do it as some swaps and negations in the vectors / quaternions)