Development > Artwork

Scaling Question.

<< < (3/4) > >>

DarkRain:
But it's only a warning, right? Did you try to re-export the mesh and see if it works (it really should)?

ManDrake13:
Right. I was over thinking it. Sorry about that. So I ignored the warning. I did a clean start over again to my base value. Imported, scaled, and exported the md2 file. Confirmed that it had default values correctly.


--- Code: ---ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models
$ ~/ufoai/src/tools/md2.pl skinedit ../../../../../base/models/weapons/medikit/medikit.md2 minimedikit.md2 .minimedikit
IN = "../../../../../base/models/weapons/medikit/medikit.md2"
OUT= "minimedikit.md2"
TEX= ".minimedikit"
MD2 file found.
1 Skin(s) found
Skin 0 old: ".medikit"
Skin 0 new: ".minimedikit"
Writing model to minimedikit.md2
ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models
$ ll
total 28
drwxrwxr-x 2 ubuntu ubuntu  4096 Jun 29 08:53 ./
drwxrwxr-x 4 ubuntu ubuntu  4096 Jun 30 15:16 ../
-rw-rw-r-- 1 ubuntu ubuntu 15501 Jun 29 09:28 minimedikit.jpg
-rw-rw-r-- 1 ubuntu ubuntu  2864 Jun 30 20:03 minimedikit.md2
ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models
$ ~/ufoai/src/tools/md2.pl info minimedikit.md2
MD2 file found.
NumFrames: 1 (max is 512)
NumSkins: 1 (max is 32)
NumXYZ: 104 (max is 2048)
NumST: 95
NumTris: 158 (max is 4096)
NumGLcmds: 0
SkinWidth: 256
SkinHeight: 256

--- End code ---

Then I rebuilt my mod and started it up and got the following error.


--- Code: ---executing keys.cfg
executing autoexec.cfg
"version" is "UFO: Alien Invasion 2.6-dev AMD64 Jun 28 2015 Linux DEBUG"
R_LoadActorSkinsFromModel: Skin models/soldiers/ugv_ares/ares_w_default not found, defaulting to: models/soldiers/ugv_ares/ares_w
No skin for #0 of 'weapons/minimedikit/minimedikit'
80 static models loaded
CL_LanguageInit: language settings are stored in configuration: en
...using language: en_ZW.utf8
SDL_ttf version 2.0.11 - we need at least 2.0.7
...registering 14 fonts

--- End code ---

In the game, now instead of being blue it's red, this looks like what happened when I tried to use the real image name when I did my skin edit, it would show up properly in Blender, but gave me a red outline in the game. That was when I figured out that it needed .<jpgname> for it to actually show up and it couldn't have the file extension on it. I want this to be a typo, but I can't see it if it is.

DarkRain:
Well, that error means the game can't load the texture, double check the final directory structure once you 'install' your mod: you seem to be creating the md2 at mods/techmods_26/standalone/minimedikit/models while the log suggest the game is looking for it in weapons/minimedikit (which I'm not sure if means base/models/weapons/minimedikit or mods/<yourmod>/models/weapons/minimedikit)

If all else fails post your mod here (compressed archive) so we can have a look, another pair of eyes or two could help spotting what is going wrong.

ManDrake13:
I can complete understand the concern. I have 20+ mods for the game, so I had to start separating them to allow for easier debugging. So I work on them in the standalone directory and then do a build mod, which creates a proper mod directory for game usage. You are correct that the standalone directory would never work for the game.


--- Code: ---ubuntu@Ubuntu13:~/ufoai
$ git pull
remote: Counting objects: 29, done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 24 (delta 16), reused 0 (delta 0)
Unpacking objects: 100% (24/24), done.
From git://git.code.sf.net/p/ufoai/code
   7aa7b56..72898b1  master     -> origin/master
Updating 7aa7b56..72898b1
Fast-forward
 src/tools/blender/io_mesh_md2.py | 103 +++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------
 1 file changed, 47 insertions(+), 56 deletions(-)

--- End code ---

So I saw you pushed a new fix overnight, so I reran my tests and got the same result. Which made no sense to me. A single line of code change should change something even if it's absolutely minor. So I became suspicious that something wasn't actually being changed. And there is only one thing in the process that isn't us, and it's Blender. So even though I was reloading the new copy of io_mesh_md2.py every time, it appears that blender wasn't actually changing it. So I went back end and deleted the script completely from Blender. Then reloaded it from scratch.


--- Code: ---ubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64
$ ./blender
connect failed: No such file or directory
Read new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blend
found bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/python
reloading addon: io_mesh_md2 1435751192.8296928 1435752005.9417028 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py
Modules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()
trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend ok
addon_utils.disable: io_mesh_md2 not loaded.
Modules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' (io_mesh_md2)
trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend ok
Saved session recovery to '/tmp/quit.blend'

Blender quit
ubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64
$ ./blender
connect failed: No such file or directory
Read new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blend
found bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/python
reloading addon: io_mesh_md2 1435752038.5777032 1435752180.137705 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py
Modules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()
reloading addon: io_mesh_md2 1435752180.137705 1435752209.1097054 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py
Modules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()
trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend ok

Blender quit
ubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64
$ ./blender
connect failed: No such file or directory
Read new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blend
found bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/python
Reading: /home/ubuntu/ufoai/mods/techmods_26/standalone/minimedikit/models/minimedikit.md2....Done
Creating mesh.....Done
Model imported
minimedikit:  ('104 vertices', '158 faces')
Export progress: 100% - Model exported.
Saved session recovery to '/tmp/quit.blend'

Blender quit


--- End code ---

Sure enough after that draconian measure what came out the other end worked properly with your new code.

Now that it works, the next question comes along, but you'll need to see the mod to actually understand what I'm talking about. I think the scaling option is throwing things off on the mod, because it's confusing the placement routine for orientation, it's like it's having trouble treating it like a 1x2 object now. The logical center of the object seems to be off. It puts it in the wrong orientation compare to objects of similar type.


--- Quote ---For everyone else, this is a 2.6 only mod, built off of bleeding edge code and should not be considered stable or usable for any reason. The mod should be considered completely broke if found at some future date when 2.6 is released to the public, because the code changes could completely destroy the mod. DO NOT USE UNDER ANY CONDITIONS! Here there be dragons, run away.

--- End quote ---

DarkRain:
So blender didn't correctly update the script... well I always copy the file(s) directly to my ~/.config/blender/<version>/scripts/addons/ directory overwriting the previous one, I didn't think of that... glad to hear you got it working now

Anyway, check your minimedikit shape property you have it turned around, it should be "0 0 1 2", you might also want to tweak the center and scale properties, here's an (admitedly brief) explanation of most item properties: http://ufoai.org/wiki/UFO-Scripts/weapon_*.ufo in case you didn't see it already

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version