Hi guys
Those of you that are maybe familiar with orthographic projection planes, I want to render the top, side and front view of a shape, but the catch is this. The hidden edges must also be rendered in dashed lines. Can anyone maybe give me some pointers what the approach for this would be? Is there maybe an open source library that can do this? Any help greatly appreciated!
There is “Vectrosity” on the asset store which can be used to draw lines (including wireframing objects and dashed lines). It should be easy to create the dashed wireframe if your object is not complex, but there will be some code to determine which lines to draw (you might have to do manual front-face culling on them).
Another option is create a clone of your object mesh in a 3D editing program and cut out the majority of the faces (create a wireframe-like cage of only the edges you’d want to show). Flip the normals and texture it with a dashed texture. Render it with a transparent shader after you draw your regular shapes (put it in the right render queue or render it in a separate camera later–depending on how you have your scene set up).
Vectrosity would give you constant thickness for your lines, but pre-generating your models would be faster at run-time.
Hi CS, thanks. Yes, the duplicate mesh route is what I am using currently, but it is very limited. Also, drawing lines is not the issue. My guess is that there must be some complex algorithm that can determine which edges are hidden and should be dashed lines. That part is a bit beyond me to be honest.