Jump to content

GDTF Forum

RKS: Preparing 3D assets for GDTF


Petr Vanek - Robe

Recommended Posts

3D models are one of the essential assets in GDTF. Lets see what we need to do to make our 3D files ready for GDTF.

You can either use generic 3D models already predefined by GDTF and available in the GDTF builder, or you can provide your models. Models can currently be provided in the form of 3DS files, or in the future it will be also possible to use glTF files. How to create models of the devices is out of scope of this post, what we will look at today is how to modify and adjust existing 3D models provided by the manufacturer for use in GDTF - apply position, rotation, alignment  and adjust the quality of the meshes.

I like to use Meshlab for assets preparation for GDTF, but you may choose to use other tools, like Blender, Cinema4D or some other software. We will look at a generic moving head fixture with base, yoke and a head.

What you usually get from the manufacturer's documentation is a complete 3D drawing, made of individual parts, assembled into the shape of a real fixture. What we need to do for GDTF is to separate each moving part into an individual model and adjust it's origin point and alignment.

Here is GDTF definition: The mesh of each fixture part shall be drawn around its own suspension point. The zero point of a device does not necessarily have to contain the offset related to the yoke, but it must be centered on its axis of rotation. The offset is defined by the geometry and has to be related to its parent geometry and not to the base.

Which means that in each model's file it's origin point is defining the rotation point.

Here is an example of a complete fixture before adjustment, we can see the individual models listed on the side (marked with 1):

2021-03-12_12-39.thumb.png.2fb666b8ed63aa52f84f10649e26864f.png

As you can also see, the origin point (2) is at the center of the base plate, but this is only correct for the base, not for yoke and head, so it will need to be adjusted.

Here is another part of the GDTF definition: The device shall be drawn in a hanging position displaying the front view. That results in the pan axis is Z aligned, and the tilt axis is X aligned. 0,0,0 – center base plate.

So the device must be drawn upside down, the head must point to negative values of the Z axis and not to the positive direction (3), which means that all models will need to be rotated and adjusted. Your model will most probably be rotated differently, so take this post as a reference.

Meshlab allow us to individually select each model and perform operations on it, like Rotations and Positioning (translate) by defining numbers (degrees or digits) of movement. At the same time, it provides a "freeze matrix" feature, which sets the current transformation matrix into the coordinates of the vertices of the mesh (and set this matrix to the identity). In other words, it sets the origin point to the place you need it to be at :), which is what is needed for correct application in GDTF.

Here are the Transform tools in the menu. What i like to use instead of multiple rotations is a tool called "Flip and swap axis".

2021-03-12_11-40.png

One important note: you must always first perform a translation (positioning, to define the origin point - point of the rotation) and the only a rotation, otherwise the rotation would happen along a wrong axis/point.

So in my case (your model might be different) we adjust the base by axis flipping and swapping as follows:

2021-03-12_11-42.thumb.png.8bc652d7b648f18b45c3703c241a034f.png

We can now see that the base bottom plate is facing positive direction of the Z axis, good.

Now we need to apply rotation to the yoke and head, because what we have so far looks like this (example of head):

2021-03-12_11-52.png.a44e2f0667badc7de44c05e7cc005eb7.png

The model needs to be positioned (1) and also rotated, so the X axis is defining our rotation (2). You will need precisely measured positions for these offsets, often these will come from manufacturer's drawings or other documentation. Here is the result after applying the Translation and then Rotation in Meshlab:

2021-03-12_11-48.png.fcad17c3c007be405e94626b79c49f08.png

And this is adjusted model of yoke:

2021-03-12_11-47.png.08554db1bb7cf331204431dbbca6df58.png

After we adjust all (base, yoke, head) and If you open all three models together, they will be overlapping each other:

2021-03-12_11-48_1.png.98c3f7958593122ae0a5bb1b6a112414.png

This is because the offsets of these models will be defined later, in the GDTF file. For the offsets in GDTF, we will again, need precisely measured values from the device's documentation.

Our files are almost ready, but we still must ensure that the models have certain complexity, as for example defining them too detailed (most common case) results in high demand for processing power of the visualizers. You can prepare a detailed, high vertex count file if you perhaps have a demand for a particularly detailed rendering, but for normal operation, you should conform to the GDTF definition: All models of a device combined should not exceed a maximum vertices count of 1200.

To ensure this requirement, we must often simplify the model. Meshlab offers it's "Simplification" tool:

2021-03-12_11-56.thumb.png.365eb215435a551bebc8844f551c7d33.png

Before simplification:

2021-03-12_11-58.thumb.png.063e7c29b844bf1a852cd9159c2ac21a.png

Simplified, by adjusting the "Target number of faces". See number of vertices at the bottom:

2021-03-12_11-59.thumb.png.093f523b2efa0229c690ee7e96a94e1c.png

 

Now we can add the models into GDTF in the Builder, here is the result, with corresponding offsets. Here is the base:

2021-03-12_14-21_3.thumb.png.1bbaac1c7b3b7ea6d7e7977f3a0d0b5c.png

 

Yoke:

2021-03-12_14-22.thumb.png.1b416bfb1b0a23e23ee49dad5e9f9a11.png

 

And head:

2021-03-12_14-22_1.thumb.png.3d9dd8c0b363d7be867d9b806c10ca62.png

 

Hope this helps

Petr

 

  • Thanks 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.