M3g drawing lines in a 3d space

Forum for discussion on 3D games for mobile platform and doubts related to M3G, Mascot capsule and other rendering engines.

M3g drawing lines in a 3d space

Postby ram » Sat Feb 17, 2007 6:15 am

Hi,

I need to connect 3d objects with lines. I don't want the lines to be 3d themselves (as in no depth to them) I just need a 2d line connecting 3d items in a 3d space. Can anyone point me in the right direction? Thanks,
ram
 
Posts: 10
Joined: Sat Feb 17, 2007 5:02 am
Location: India

Postby smackall02a » Sat Feb 17, 2007 6:16 am

try to use thin Mesh, this is the only way to do it. But you must always orient it on camera or using two side culling.
Reply With Quote
smackall02a
 
Posts: 23
Joined: Fri Sep 22, 2006 11:32 am
Location: India

Postby bpj1138 » Sat Jun 30, 2007 7:29 pm

I agree with Vishnu.. AFAIK, there is no 3D line primitive in M3G API. So, you'd have to make at least a couple 3D quads to make a line, so at least one of them is visible at all times. If these lines are static, you can just incorporate the quads into your model. If the lines are dynamic (change in real time), then you've got problems, because you'll have to create a new mesh every frame. This would probably end up pretty slow, since M3G probably does some sort of processing when a new mesh is created.. Never tried it though.
bpj1138
 
Posts: 3
Joined: Sat Nov 04, 2006 2:49 pm
Location: http://www.geocities.com/bpj1138

Postby bpj1138 » Sat Jun 30, 2007 7:41 pm

One more thing.. in J2ME, you can draw 2D lines on top of 3D, so that can possibly be used, although in that case they'll always be drawn on top of whatever's there, since you won't be using the depth buffer.. it's a thought though..
bpj1138
 
Posts: 3
Joined: Sat Nov 04, 2006 2:49 pm
Location: http://www.geocities.com/bpj1138

Postby DevelopmentTeam » Mon Jul 02, 2007 5:49 am

the second case can be used in case the mesh is always perpendicular to the line of visions, as it is not easy to bring depth when we draw 2d lines.
User avatar
DevelopmentTeam
Site Admin
 
Posts: 661
Joined: Tue Aug 15, 2006 8:39 am
Location: India


Return to 3D Mobile Game (M3G)

Who is online

Users browsing this forum: No registered users and 1 guest

cron