pdlab
pdlab

Reputation: 11

technical rendering drawing in qt3d

Is it possible to display objects imported from blender in a style of technical drawing as shown here on the picture (right): https://i1.creativecow.net/u/108860/st.jpg

All the best, Özkan

Upvotes: 1

Views: 114

Answers (1)

Florian Blume
Florian Blume

Reputation: 3345

I am assuming that you already have your scene set up in Qt3D just with the wrong materials (i.e. the objects are displayed but without your desired effect).

To achieve this effect you have to create a new QMaterial that makes use of your custom shader and attach it to your entity. If you don't know how to create a custom material have a look at the QPhongMaterial. You probably don't need the specular, diffuse and shininess parameters but could keep the ambient parameter.

You then have to write your shaders to detect edges. There is a good explanation here which should get you started. There is an example of a shader at the bottom of that page. A simpler solution is this one but I'm not sure if the effect is as good as in the first link.

Upvotes: 2

Related Questions