How to create dashed hidden lines?

Software: Away3D 3.x

redhotbeani, Newbie
Posted: 30 July 2013 08:53 AM   Total Posts: 4

I’m working on a tool for primary school children to learn 3D shapes.

I combined a solid pyramid with a wire pyramid because I want to show hidden lines. In my endresult, hidden lines are gray instead of black (see attached image b: my away3D pyramid).
But in all school books, hidden lines are dashed (see attached image a: desired result).

I have no clue how to create these dashed hidden lines. Can somebody help me or give me a hint?

 

   

beers, Member
Posted: 30 July 2013 09:57 PM   Total Posts: 53   [ # 1 ]

2 models overlapped - one with its normals inverted.

Then create 2 single-sided materials: one with dotted line texture (with alpha) and the other a solid line texture (with alpha). You’ll have to setup your models with UVs etc. to get the textures to line up properly so to speak.

The model with the inverted normals gets the dotted line material.

That should give the effect you are looking for.

You could add a third overlapping model with a slightly transparent opaque material to give it color.

beers

 

   

redhotbeani, Newbie
Posted: 31 July 2013 08:41 PM   Total Posts: 4   [ # 2 ]

Hi beers, thank you for your quick answer. I like the completely different approach to solve my problem.

Inspired by your answer, I made a quick demo with two cubes:
- the first cube has a single sided transparent material with normal lines
- the second cube has a double sided transparent material (bothsides = true) with dotted lines
I think visually this will give the same end result as your solution.

When I look at it in Flash, not all viewing angles give the desired result (see attached image). For example, the bottom lines should be normal, but you mainly see the dotted lines projected by the inside of the second cube. I currently have no idea how I can solve this.

 

   

beers, Member
Posted: 31 July 2013 10:14 PM   Total Posts: 53   [ # 3 ]

Yeah the perspective on the textured line thickness is making the effect fall apart at certain view angles. Not too bad overall though.

I cant think of any other quick solutions - if you really need it to look perfect you could probably do it using some crafty AGAL.

beers

 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X