Page 7 of 8

Posted: Sat Nov 15, 2008 12:16 am
by Compellor
I already tried that, it didn't work.
Compellor wrote:QUOTE (Compellor @ Oct 17 2008, 07:43 AM) I even tried using ImportImage("scorptestbmp", true) with a bitmap scorptestbmp.mdl instead of ImportImageFromFile.
It's possible I'm doing something wrong, of course. But, well, see for yourself:


I'm going to run a few more tests.

Posted: Sat Nov 15, 2008 1:26 am
by Andon
when using the importimage or whatever you have to include the extension as well. And capitalization counts as well

Posted: Sat Nov 15, 2008 4:08 am
by Compellor
ImportImageFromFile works fine if I'm testing it as a replacement for fig20bmp.mdl (bios fighter). It will load png or bmp, but will not load bmp.mdl, I assume it isn't supposed to. Using ImportImageFromFile (as opposed to a real bmp.mdl) with the artwork tools to create a mesh mdl gives me the translucent white result you see above. This means that whatever tools I'm using can't parse ImportImageFromFile.

KGJV's post on Text MDLs, referenced in the "How do I...?" thread, says:
QUOTE somename = ImportImage("somebitmapbmp",true); // this load "somebitmapbmp.mdl"[/quote]
which leads me to believe that the older ImportImage version of Text MDLs will load a bmp.mdl file. So I tried creating the mesh mdl with ImportImage, but that gives me the same result, a milky white look. I wanted to make sure that I'm using ImportImage correctly, though, so I tried to use it to replace fig20bmp.mdl. Specifically, I tried to load fig17bmp.mdl. Unlike ImportImageFromFile, this caused my game to crash. I tried it with or without the extension, I was careful about capitalization, and so forth, I just can't get it to work.

Possibilities:
1. The tools I'm using don't correctly parse any text MDLs
2. The tools I'm using will correctly parse the old ImportImage text MDLs, but I'm doing something wrong. Possibly I am misinterpreting KGJV

Note: You can't create a mesh MDL without a bmp.mdl file using these tools. It just refuses to finish. It doesn't matter if it's a real bmp.mdl file, it just gives you the milky white look if you use a text MDL file, or even a blank file.

Posted: Sat Nov 15, 2008 12:50 pm
by madpeople
you may want to try the other image loading thing if you are reading things like .png

Code: Select all

use "model";
mdl_file_namebmp = ImportImageFromFile("address_to/filename.png", true);
if you have the .png in the /textures folder then address_to/filename.png becomes Textures/filename.png
if you have the .png in the /artwork folder then it just becomes filename.png

Posted: Sat Nov 15, 2008 1:44 pm
by Compellor
I fail to see anything there that's "other," anything that I haven't already addressed.

Posted: Sat Nov 15, 2008 2:18 pm
by madpeople
I aplolgise, i haven't read the full thread, but i seemed like you were having trouble getting the loading a texture to work with text bmp.mdls , and since text bmp.mdls are usually used in conjunction with exteral non-alleg format image files, i sudggested you use the "ImportImageFromFile" function rather than the "ImportImage" function in your text .mdl

Posted: Sat Nov 15, 2008 11:20 pm
by Compellor
A recap, for those who don't feel like reading page 3: My problem is that the tools I'm using to create mesh MDL files are instead creating hybrid mesh/bitmap MDL files, and I need pure mesh MDL files if I'm going to use text MDL textures on my meshes. I need to know whether there's another version of the tools I should be using, or if there's something I can do with the current set of tools to get my desired result.

Posted: Sat Nov 15, 2008 11:37 pm
by madpeople
what?!

you mean the .mdl has the texture and the model in one file?

are you doing something like this in your text.mdl:

Code: Select all

ImportXFile("my_model", frame);
somename = ImportImage("somebitmapbmp",true);
and trying to optimize that?

if so, you're doing it wrong!

don't put the import image in the thing you -optimize

only -optimize the model, don't put the texture in there too, -convert it seperatly

If you've skinned the model already, then the references to the texture already exist in the model, the conversiopn process will make them look for a .mdl file of the same name instead

Posted: Sun Nov 16, 2008 12:27 am
by Compellor
the source.mdl file is generated automatically by makegeo.bat. Here is an example text:

Code: Select all

 use "effect"; frame = ModifiableNumber(1); object = LODGeo(ImportXFile("scorpion.x", frame),[ (64, ImportXFile("scorpion_static", frame)),(32, ImportXFile("scorpion_a", frame)),(8, ImportXFile("scorpion_b", frame)) ]);
As you can see, the texture is not mentioned.

As a side note, it never occurred to me before to check the files generated by the makegeo process, and see if any of them are text files with references to the texture. That line of inquiry turns out to be a dead end, but I did notice something I hadn't before: that cvh files are simple text files. This means that, rather than giving the missile mount cube a transparent texture (since for some reason it isn't being removed like supposedly it should be), I could simply remove the missile mount cube from the .x, then add it to the cvh by hand.

Posted: Sun Nov 16, 2008 11:59 am
by madpeople
not sure that [side note] will work.

the things get placed by the named bit in the .x, and you don't need the cube in the cvh.

an earlier tool in the tool chain is supposed to remove the meshes for the things with the special names...
If anything, try deleting the mesh data for the cube in the .x file, but leave it's position (or maybe only one vert?, or something which designates a position, but not a mesh).

do you have the texture files already as bmp.mdl in the same directory as the mdlc tool? It checks for their existance when converting and attempts to convert any .bmp with the right name f they aren't there. (might be safer using non-text bmp.mdl here)