Sign in to follow this  

Direct X8 - visual basic 6 (problems !!! - update #1)

This topic is 4109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am programming with directx 8 in visual basic 6.To model and export my objects I use blender 3d(GRAPHICS SUITE) .However when I export an object from blender to the .x format it does not appear in my application when it renders.This happens with all objects except from the cube.Also when I am trying to load suzzane , I get an error message(this does not happen with the rest of the meshes) Here is the code I use in visual basic 6 to load the object. Set Obj.Mesh = d3dx.LoadMeshFromX("c:\1.x", D3DXMESH_MANAGED, d3ddevice, Nothing, buf, 1) mesh is a D3DXMesh variable d3ddevice is a Direct3DDevice8 variable buf is a D3DXBuffer Thanks in advance [Edited by - SmaTheGreek on September 18, 2006 8:34:36 AM]

Share this post


Link to post
Share on other sites
Could you tell us what the error message is? There are a few things that can be going wrong:

First, try turning culling off. I've had a few problems with Blender's X exporter inverting my normals.
Second, check that the object being returned by LoadMeshFromX is valid. If '(Obj.Mesh Is Nothing)' returns true, then the function is failing. I found that D3DX9 had trouble loading some of the X files produced by the latest Blender X exporters. I had to revert back to an old version (of the plugin) to get things working.

Regards
Admiral

Share this post


Link to post
Share on other sites
update #1

I found more about my problem.
I've exported the object from blender to truespace(caligari).Then from caligari I exported the mesh to the .x format(after that it worked fine in my game).However when I imported the mesh to truespace, it had no materials and an error message appeared informing me that some textures were missing(I had used no textures in blender),but the model worked fine with my game(after exporting it from truespace.
After that I painted my mesh in truespace and the faces that were painted were missing in my game.So I believe that in my game textures or materials can not be displayed properly ,however my code has no errors.
Can somebody help me ?

P.S I've turned culling off and still the same.I get no error messages

Share this post


Link to post
Share on other sites
It sounds like at least one of your exporters/importers isn't doing what it should be. Check all of the options to make sure you're exporting everything you need to keep, and ideally nothing else. If that doesn't help, check the readme files to make sure that each plugin supports the features you need.
Failing that, you may need to simplify the process: Converting model data between formats is a notoriously error-prone process. Going via Truespace, unless necessary, is asking for trouble. There are probably a few alternatives to the Blender .cob exporter you are using. Maybe one of those will do a better job.

Regards
Admiral

Share this post


Link to post
Share on other sites

This topic is 4109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this