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

Started by
2 comments, last by TheAdmiral 17 years, 7 months ago
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]
Visit is my website:http://www.freewebs.com/smathegreek/or join the greek blender community at :http://greekblend.invisionplus.net
Advertisement
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
Ring3 Circus - Diary of a programmer, journal of a hacker.
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
Visit is my website:http://www.freewebs.com/smathegreek/or join the greek blender community at :http://greekblend.invisionplus.net
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
Ring3 Circus - Diary of a programmer, journal of a hacker.

This topic is closed to new replies.

Advertisement