Development > Artwork
Scaling Question.
ManDrake13:
OK, I'm taking another stab graphics after the previous success changing the color of something. So one of my mods is a Mini-Medikit. So my goal was straight forward enough, I'm not brave enough to try to build a completely new model, so I decided to steal the existing one and tweak it. I figured out from searching that what I call proportions is called scaling by artistic people. It appears the challenge with this is just learning an entire new language of terms. So my goal is to make 1x2 mini-medikit for my mod to use. So I did the standard thing made a model directory and copied in the original medikit to work with.
So I copied over the JPG file and renamed it to be minimedikit.jpg and I copied over the md2 file with provided perl script for doing such things. I remembered from my previous experience that I needed to give the JPG part the required naming convention rather than what the actual JPG name.
--- Code: ---$ ~/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
--- End code ---
So then I edited the JPG in GIMP. Once I realized the terminology problem it was fairly straight forward. Image->Scale Image, click the chain looking thingy to making it accept a different proportion, cut the image from 256 to 128 for the X axis, then export as a JPG. And you are done. Figuring all that out took an hour, but it's simple once you get the terminology problems worked out.
Then I went back to the beast Blender. I imported in the minimedikit.md2 file that I'd created with the Quake II Python script for md2. Loaded up fine and I could see the medikit model floating in space on the screen. It took me a bit, but I finally accidentally selected the image by clicking on the upside down triangle under the image name. That brought me up in image edit mode, which I'd been trying to find. And on the left hand side lots of new buttons came up,one of them said Scaling, which I recognized and clicked. Took a while after that to make my mouse movements to stop doing scaling automatically, which was completely annoying. I finally figured out I could click the scaling button twice and it would give me numbers I could type in to control scaling. Then I figured out X axis was what I would call the Z axis, and Y axis was what I would call the X axis, and Z axis was what I would call the Y axis. So once I figured out Blender world out of rotation with my world, I was able to edit the correct proportion. So I set the Y axis to be .5 instead of 1. The imagine on the screen looked correct, I was happy, so I decided I needed to get it saved and tested.
And that's where my dream of a simple process went completely off the rails. When I tried to export it with Quake II MD2 exporter I got the following error. It appears what I've tried to do violates some fundamental principal of what we expect to happen.
--- Code: ---Creating mesh.....Done
Animating - progress: 100%.
Model imported
Error: Modifier cannot be applied to a mesh with shape keys
Traceback (most recent call last):
File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 859, in triangulateMesh
bpy.ops.object.modifier_apply(modifier=modifier.name)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy/ops.py", line 189, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Modifier cannot be applied to a mesh with shape keys
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 984, in __init__
self.info = ObjectInfo(self.object)
File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 934, in __init__
mesh = Util.triangulateMesh(object)
File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 865, in triangulateMesh
bpy.ops.mesh.quads_convert_to_tris(use_beauty=False)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy/ops.py", line 189, in __call__
ret = op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "use_beauty" unrecognized
location: <unknown location>:-1
location: <unknown location>:-1
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
Traceback (most recent call last):
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls
func(self, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw
VIEW3D_MT_editor_menus.draw_collapsible(context, layout)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible
cls.draw_menus(layout, context)
File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus
layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())
AttributeError: 'ID' object has no attribute 'type'
--- End code ---
So I'm back for some help, either for what I should have done, or what step I've missed that will resolve my issue.
Noordung:
for exporting model you need to unwrap it first. search some tutorials on youtube how to unwrap it. its actually simple.
than model must be in 0.0.0. coordinates. press n in blender and in upper right corner you go to 0.0.0. coordinates. also i think you should done is press ctrl+a and click in rotation and scale. this should be done before unwrapping or you might have some problems with textures. also press shift+c to add you starting point to 0.0.0. coordinate. i think that is all... also there might be some wiki about here how to export that explains better than me.
ah yes you need to be in object view.
ManDrake13:
Wow, that was a very long and very nasty rabbit hole that led me to a dead-end. So I read over the documentation on models again, and I need to understand what exactly is happening. I saw a reference that some things get lost in translation. Is that what is happening to me? So I import the object in, but this unwrapping thing isn't embedded in the object. Instead the system has some other set of instructions it's using that maps it to the correct spots. Since it doesn't have the wrapping map any more, Blender guesses and it's guesses appear to always be wrong is YouTube is to be believed. So the reality is that there is no such thing as a working prototype to start from, because the game files are already in a non-Blender friendly format. My dreams of just changing the proportions and feeding it a smaller image and altering the mapping were always impossible?
Noordung:
well i think first aid kit is simple box, or am i mistaken? for suck simple form might be easier to just make new model.
dont have md2 importer on blender im using now so i cant really check it...
DarkRain:
@ManDrake13: Forget about unwrapping: the importer should have imported the UV map from the md2 already, the problem seem to be that the newest blender version is not fully compatible with our current script (originally tested with the 2.6 series) it still should work for your purpose, you'll need to uncheck the "Import animation" option (left of the screen below the recently used directory list) when importing the model — you don't need animation anyway, equipment uses static model in game — and make sure the option to "Export animation" is unchecked when exporting.
Edit: Also you don't need to scale the texture, just scaling the model should be enough
Navigation
[0] Message Index
[#] Next page
Go to full version