X 3D Viewer for VENUS 3D Models

Hello All,

I wanted to share a project I have been working on for viewing, editing, and converting 3D files especially with .x DirectX files.

Online Version: DirectX 3D Viewer

Desktop Version: https://github.com/zdmilot/DirectX-3D-Viewer/

DirectX .x files are increasingly being phased out or unsupported in modern 3D workflows. Even tools like Blender no longer provide a reliable built-in way to open and work with these files. For Hamilton automation workflows especially, this becomes a real problem because VENUS still relies on .x and .hxx model formats for deck resources and labware visualization.

The goal of this project is to provide a reliable, open, and practical way to keep working with these files without being locked into outdated or vendor-specific tooling.

DirectX 3D Viewer can help you:

Open and inspect legacy Hamilton .x and .hxx 3D assets
View .x, .hxx, .obj, and .stl files in a native Direct3D 11 viewport
Convert between .x, .obj, .stl, and .glb
Take clean screenshots of models
Apply basic transforms such as rotate ±90° and mirror on X/Y/Z
Use orbit, pan, and dolly camera controls
Toggle wireframe, grid, and perspective / orthographic views
Drag and drop files directly into the viewer

I spent a lot of time building this because I think the community needs a dependable way to work with these files as mainstream support continues to disappear. I would really appreciate feedback, testing, bug reports, and suggestions from anyone who works with Hamilton 3D assets or legacy .x files.

Best,
Zach

6 Likes

This is incredible, thank you for posting

1 Like

This was so needed by my lab, THANK YOU!

2 Likes

Great work and a useful tool for venus.

I have a few suggestions, you can use helix-toolkit to do 3D display in WPF and you can use assimp to load many other kinds of model files (which was supported by helix). Then you do not need to write and test so many codes to load these file types.

Also you can do these works in html with three.js, and then you can embed your work in electron to enable it run in other os.

all these can support more functions of 3D, like material with image and more model types.

2 Likes

Any chance you could add like a shell script utility that auto exports everything to a generic model format?

1 Like

Totally agree and there is a way to do this easily leveraging GitHub - adrs2002/threeXfileLoader: X file(directX 3d file) loader for three.js · GitHub

I can update you and the rest of the Automators when this is setup, should be a simple converter for browser based conversion that could be static and even hosted on GitHub pages.

1 Like

This already exists. You may just need to write a simple .bat file to automate it, but this is the convention for using the CLI tool:

CLI Reference

Run DirectX3DViewer.exe from any terminal to convert 3D files without opening the GUI.

Open a file in the viewer


DirectX3DViewer.exe model.x

Convert between formats


DirectX3DViewer.exe convert <input> <output> [--format <fmt>]

Show full CLI help


DirectX3DViewer.exe --help

Examples

Convert OBJ to DirectX .x binary


DirectX3DViewer.exe convert model.obj model.x

Convert STL to glTF 2.0 binary .glb


DirectX3DViewer.exe convert model.stl output.glb

Convert .x to OBJ using the format flag


DirectX3DViewer.exe convert model.x result --format obj

The --format flag overrides the output extension.

Convert .hxx half-precision .x to OBJ


DirectX3DViewer.exe convert *.hxx output.obj

1 Like

adrs2002\threeXfileLoader was based on very old version of three.js, I tried to port it to current version of three.js, but I failed. I wrote a loader (typescript) for x file of text format, and it worked fine for Hamilton’s model files. I can share it to your project, if you need.

3 Likes

Hi there,

tried to convert a a4s sealer model to .x but get an out of memory error of a 128 Gb RAM machine:

The .stl is 128 Mb, could that be the issue?

best
Dominik

That’s awesome! I have a commit pending on my laptop I keep forgetting to push, once I do would you want to take a look to see if I’m using the right version. I have to be honest web dev is not really my strongest asset so I really appreciate your help!

I sent you a DM about this, I wonder if it would work with the CLI version. Definitely appreciate any feedback good or bad for the next version!

I manged to fix it by reducing the size of the stl. I reduced the details and now it is working just fine!

€: I used MeshLab as recommended here: https://www.reddit.com/r/3Dprinting/comments/kvq47a/urgent_how_do_i_reduce_the_file_size_of_my_stl/

2 Likes

If you want to finish this tool quickly, I think you’d better use helix toolkit, which used assimp to load and export many types of 3d model files, which also have been developed for many years and by many developers.

Also, there are many tools on the web, which can convert between many types of 3D model.

I just made an online version hosted here: DirectX 3D Viewer

5 Likes

Hi,
This feature seems awsome !

  • I try to create a .x from one of my .stl, the model is very nice on your app : but it is a way darker on Venus

  • On Venus the object seems a way darker, it is difficult to see shapes, but I can see through holes, do you kwon how I can improve that ?

Thanks a lot !

1 Like

:+1:

It is amazing that you finish this tool in so short time, and it has all the functions which are neccessary

I decided to not go with Helix Toolkit as SharpDX is unmaintained and the Vortice 3.8.3 bindings are more modern and future proof.

As for larger models the issue is with the lack of backface or frustum culling, and synchronous loading on the UI thread, and no device-lost recovery. All added in version 1.1.0 here:

:+1: Actually, I think it will be easier to write some loaders of 3D model files for venus, and then enable venus the ability to display more types of 3D model files. Then we don’t need to handle with these old x files.

But I know that is impossible. Btw I am very confused about what Hamilton do on 3D, now they have three technologies of 3D

  • DirectX and .x File for 3D decklayout
  • unity for 3D run simulation, with different model files
  • P’X 5 with another different 3d file format

I think it will be very easier to use one technology or the same 3D file for all these situation, by only writing some loaders of model file.

Totally agree also this viewer enables the .hxx which is their compressed .x format which is even more frustrating but also was the reason I had started this project because I really wanted to get our layouts on Venus on par with what users are expecting.

I wish we weren’t using such an older 3d format for the shell and we could switch to some more modern gLB or OBJ formats for this but alas this is hopefully the next best thing.

As for @Thib 's question on contrast I did add a color selection tool for outputting the model in a different color to add more contrast. I added color swatches but in a new version the user could specify the color output and I could create a cli tool for this as well if needed.

1 Like

If there was a way to convert Venus layouts to a glb formatted scene that would be incredibly useful

2 Likes