I am creating program that translates lithological data to colored 3D-columns which can be imported into Blender. Because the amount of single objects would be huge and disastrous on the readability in in the "outliner" (list of all objects), I am planning to accumulate them in one Wavefront (.obj) object. However, I would like to have labels (stations ids) for each lithological column. Blender seemingly only allows to display the name of objects in Object- and Edit-mode.

Is there a way to at least label all lithological columns differently while keeping all columns in one single object? Maybe there exist an addon or a niche in the Blender Python API. As far as I know there would be the possibility to write a Python addon which scales and rotates 3D-text-objects according to the viewport movement of the user. Still, I am looking for plain 2D-text and the functionality is somewhere within Blender already, but not necessarily in the Blender Python API.

Thank you in advance!

EDIT: I intented to do it without the Blender Game Engine. The text should be displayed somewhere over or adjacent the lithological columns (which depends on the current viewport). It would be good if the labels could be switched on and off, to not always interfere with the final results. Additionally, it would be beneficial to preserved the labels in rendered images as well but this is not a necessity. Distance dependent scalability is also optional. The main purpose is to identify the columns/locations while working with them.

  • 1
    $\begingroup$ Would the existing name display feature work if you still imported each column as a different object, but for outliner purpose create per rock or section an empty under which columns can be parented? $\endgroup$
    – jesterKing
    Jul 1 '13 at 8:40
  • $\begingroup$ Drawing text is be done using the blf module. $\endgroup$
    – Aldrik
    Jul 1 '13 at 13:07
  • $\begingroup$ So, this means It would only be possible with the Blender game engine. I tested it with the newest version of Blender and I didn't work. Seemingly, the Blender Game Engine does not keep up with the rest of the program because it is not in development focus (avatarsofsteel.wordpress.com/2013/06/18/…). This way I just have to accept the massive amounts of objects, maybe write a plugin to manage them effectively. $\endgroup$ Jul 1 '13 at 19:42
  • $\begingroup$ As for jesterKings comment: The thing is, I am analysing the lithological columns to model the hydrogeological units accordingly, not the other way around. Your approach would reduce the number of objects but I would loose the reference to the seperate drillings which contain the paranted lithologies. $\endgroup$ Jul 1 '13 at 19:45
  • $\begingroup$ @Florian R. Klein, I'd like some more context with your question, can you explain how you intend to view the final result? Exactly how you generate text depends a lot on how you want to view the final result --- eg, is a static image ok? should it be interactive? is the game engine acceptable? Will this change over time? (animated graph) $\endgroup$
    – ideasman42
    Jul 2 '13 at 1:31

The features in blender for this task are not so advanced, so I would suggest one of two options...

  • Load in Empty objects and name them usefully, enabling the objects display -> name option in the object buttons. (note, these names wont render)
  • Create 3d text objects for each name (reduce the curve resolution to ~4 or so, for faster display), these will render which is their main advantage. (note, wont point towards the view though you could constrain them to face the camera).

You say that the amount of object would be huge and hard to view in the outliner. To workaround this you could...

  • Give them a parent, the outliner will nest them under the parent.
  • Put them on a second layer (probably a good idea anyway), then set the outliner to only view visible layers.

Other alternatives exist like using Python to draw text in the view-port or converting curve data to grease-pencil. But Im not sure these are worth the extra hassle of simply creating named empties or text objects.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.