Volumetric texture arrows axes

Started by
12 comments, last by Jason Z 11 years, 1 month ago

I understand what you are telling me and I even have an idea how to make it with primitives, BUT, here is another problem: how to mark axes with text (x axis, yaxis... like in picture above). Those lines will be moving all the time, how to make axis marks (text) to move with their axis arrows?

This is normally done by defining a point in object space of your axes model that you want the text to be located at. Then you can use your transformation and projection matrices to find that location in screen space. Once you have the location in screen space, then you can use your normal text rendering system to put the text in the appropriate place. If you haven't done any manual projection of vertices before, you can check out a 'picking' tutorial for the details, as it uses much the same technique.

I hope that helps!

Advertisement

Yes, you were right.

It helped!

Thanks for help

happy.png

On more question:

How to make those arrows always in front? When model is moving on it, the arrows are hiden behind the model. Playing with Z-coordinate gives nothing, only changing world position.. Maybe you have some ideas?

You could render the model first, followed by the axes. When you render the axes, simply disable depth writes and depth test for that draw call. This will ensure that the axes are drawn over the model regardless of the shape of the model.

This topic is closed to new replies.

Advertisement