robotfan
Sep 30 2009, 06:06 AM
Hello. This is my first Animation:Master forum post. (At the top I meant to put "export function", but the computer abbreviated it as "fun"). I've been trying to use the new A:M Directx exporter from "www.patchwork.de."
The model exports fine (if you make sure your normals are facing in the right direction), but when I go to load it into Darkbasic Professional to be used in a game/program, or load it into the 3D program Blender, I get the model, but none of the decals that I applied in Animation:Master. Here is a screenshot of the settings I used once on a test model (I've tried changing the "generate model maps" size, but it doesn't make a difference) :
Click to view attachmentIf that image didn't go through, I have "export texture information" ON, "Generate model maps" ON, and "Min size" is 128 and "Max size" is 256. Any tips would be greatly appreciated. Thanks.
-Robotfan
Fuchur
Sep 30 2009, 08:00 AM
QUOTE(robotfan @ Sep 30 2009, 06:06 AM)

Hello. This is my first Animation:Master forum post. (At the top I meant to put "export function", but the computer abbreviated it as "fun"). I've been trying to use the new A:M Directx exporter from "www.patchwork.de."
The model exports fine (if you make sure your normals are facing in the right direction), but when I go to load it into Darkbasic Professional to be used in a game/program, or load it into the 3D program Blender, I get the model, but none of the decals that I applied in Animation:Master. Here is a screenshot of the settings I used once on a test model (I've tried changing the "generate model maps" size, but it doesn't make a difference) :
Click to view attachmentIf that image didn't go through, I have "export texture information" ON, "Generate model maps" ON, and "Min size" is 128 and "Max size" is 256. Any tips would be greatly appreciated. Thanks.
-Robotfan
Could you provide a model that isnt functional?
See you
*Fuchur*
wedgeeguy
Sep 30 2009, 08:42 PM
Robotfan ... Make sure that your images used for the decals are in the same folder as the model itself. It can't be in a subfolder either, if I remember correctly. This applies to X models being loaded into Dark Basic. I would assume it is why you are also having problems in Blender. If needed you can always open the Direct X file inside a text editor and rename the path where the images are located to make things a little easier. It's just when you initially export the X file it looks for the images to be inside the same folder as the model itself. By the way you can also display the back-facing polygons from Dark Basic Pro. Look under the command in Dark Basic Pro called "Set Object". Hope this helps ... Bruce
robotfan
Oct 1 2009, 08:40 AM
Thanks, Wedgeeguy, but I think I've already put the model and the texture in the same folder and embedded them in my Darkbasic Pro project; it still won't work. Fuchur, I'm providing a model in Animation:Master's .mdl format. I tried, but the forum wouldn't let me post a DirectX .x model. The .x file's texture is saved as "bottletest.bmp". It's the wine bottle model that came with A:M; I just re-colored it red and added a decal to it. I've also included an image of my Darkbasic Professional workspace and code.
Thanks to both of you for helping me.
-Robotfan
The A:M model:
Click to view attachment[The Directx texture:
Click to view attachmentAnd the Darkbasic Professional workspace and code:
Click to view attachment
robcat2075
Oct 1 2009, 09:00 AM
QUOTE(robotfan @ Oct 1 2009, 11:40 AM)

but the forum wouldn't let me post a DirectX .x model.
If needed, anything can be put in a .zip file
wedgeeguy
Oct 1 2009, 11:04 AM
Robotfan ... I think it might have something to do with your .bmp file. I really didn't see this decal applied to the model but it did request two other decals ... "template with bill and dodo 21" and "Daruma for short01" ... although that's not really that important. I did create a .jpg image of a red background and with white lettering that says "Coke is it" and applied to to your bottle then exported it and everything seems to work okay from within Dark Basic. I have attached a zip file with the following enclosed:
Zip file "CokeIsIt.zip" includes the following files:
cokebottletest_version2.mdl
cokebottletest_version2.X
CokeIsIt.jpg
The only different thing I did do with the previously posted X export settings is that I unchecked the "Generate Model Maps" and also left the "Model Orientation" to "left-handed". Changing it to "right-handed" displayed the decal backwards in DBP. But you should be able to just flip the decal backwards before applying and it should straighten it out when displayed in DBP ... I think.
If you can, I would suggest either .png or .jpg files for any decals you might use in Dark Basic to cut back on the file sizes ... but that's of course up to you. I also have a quick Dark Basic "dba" file and "dbpro" file that I can also upload that shows the coke bottle with the decal working. Just let me know and I will be happy to upload it. I'm still some what of a newbie with Dark Basic so you may be way ahead of me in that aspect.
Hope it helps ... Bruce
Click to view attachment
robotfan
Oct 1 2009, 01:46 PM
Can you please upload the Darkbasic Professional or Darkbasic file? The only way I can get it to work is if I export just the model from A:M, take a seperate jpeg, and apply it as a texture in Darkbasic Pro. Fine for the Coke bottle, but for more complex models where texture placement is key, I'm not sure that'll work.
P.S- I found that if you check "generate model maps" and then try to apply the .bmp file in Darkbasic Pro, it won't work, but if you use a separate jpeg file (that you probably don't have direct control over where on the model it will be placed) in Darkbasic Pro.
-Robotfan
pixelplucker
Oct 1 2009, 03:10 PM
When it exports out .x the created texture is just blank, baking doesn't seem to fix it. If you replace the blank created image from the export with the original image that was decalled it shows as it should which indicates the uv's are still there.
I used Ultimate Unwrap to reassign the bitmaps to the model. Everything else seems to be working ok.
You should also be able to use Blender to reassign the texture.
robotfan
Oct 1 2009, 04:52 PM
The problem with Blender is, I have no idea how to assign textures in Blender... In fact, I know next to nothing about Blender. I also don't have Ultimate Unwrap. And, in fact, I don't know much about UVs except the bare basics of what they are and how to apply decals and materials in Animation:Master.
wedgeeguy
Oct 1 2009, 05:19 PM
Robotfan ... I applied 3 separate images as decals to the coke bottle and then re-exported to Direct X. I have also enclosed the "dba" and "dbpro" files that should display it properly. You will see that all of the decals were applied inside Animation Master and not DBP. The two smaller decals (the speed sign and the watermelon slice) placed on the backside of the model didn't cover the entire surface they were applied to thus I think that is why in DBP they loop the decal pattern to fill in that area. I was surprised it did that and it might just be human error on my part. Anyhow you will see that you can have more then one decal with more then one image used and it should export somewhat correctly. I didn't bake any of the textures ... my version of AM (version 13) doesn't have that feature. I would give you an example in a newer version of AM but my web subscription expired for version 15 about two months ago .. sorry. Here is the zip file again with some new things added:
CokeIsIt.zip contains:
cokebottletest_version2.mdl
cokebottletest_version2.X
CokeIsIt.jpg
Watermelon.jpg
SpeedLimit.jpg
cokedecaltest.dba
cokedecaltest.dbro
If you have more question then I will try to help if I can ...
Bruce
Click to view attachmentp.s. I deleted the two decals that didn't have an image associated with them ... that may also have helped.
Fuchur
Oct 1 2009, 10:12 PM
I dont own darkbasic pro and cant help there and I didnt try it out with Quest3d yet (which I am using) but could it be the bmp-file?
Try using a jpg or a tga (if darkbasic can handle that).
*Fuchur*
maddle
Oct 2 2009, 03:43 AM
Try to export ur textures as a Jpeg file.
Hope it help.
robotfan
Oct 2 2009, 04:44 AM
Thank you all so much! I finally got it so that I can export my own models from A:M without having to reassign textures in Darkbasic Pro or another program! You have to set "generate model maps" to OFF in Amxtex, and then in the DBPro file add the .jpg textures that A:M calls to. In your DBPro source code, you don't have to do anything with the textures; it will automatically assign them because if the textures are there, the .X file must automatically call them. (At least that's my theory; correct me if I'm wrong). Thanks everybody for your help. If I have more questions, I know where to come to ask.
mshihrer
Mar 2 2010, 06:02 PM
QUOTE(robotfan @ Oct 2 2009, 04:44 AM)

Thank you all so much! I finally got it so that I can export my own models from A:M without having to reassign textures in Darkbasic Pro or another program! You have to set "generate model maps" to OFF in Amxtex, and then in the DBPro file add the .jpg textures that A:M calls to. In your DBPro source code, you don't have to do anything with the textures; it will automatically assign them because if the textures are there, the .X file must automatically call them. (At least that's my theory; correct me if I'm wrong). Thanks everybody for your help. If I have more questions, I know where to come to ask.
In DBPro, you have to use the additional flag set to 3 to load an .x file with textures applied, so, load object "filename.x",ID,3
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.