View Single Post
Old 13th September 2005, 09:28 PM   #12
Dennis
Senior Member
Professional user
 
Dennis's Avatar
 
Join Date: Jul 2003
Posts: 899
Default

I don't know of any way around this particular problem. No matter how you arrange a line/polyline, you're still left with only 2 vertices per surface.

You have a few options that I can think of - the approach you end up with depends heavily on the point of view from which your players will see the chandelier (i.e., first person, third person top-down, side-scroll, etc)..

1. Replace each line with a cylinder. This is probably the most expensive approach for framerates in your game, as you're drawing at least 6 triangles where only a single line is needed, but this will probably give the best visual result as the number of sides in the cylinder increases.

2. Replace each line with a 2 sided rectangular polygon. If the player will be in a position to see the lines very closely, you may even want to texture a chain on the surface with transparency to make it look like a chandelier chain. The disadvantage here is if the user could walk around to the "side" of your rectangle, the chain will disappear (or at least it will become apparent that it's a 2-sided surface.

3. Do the last option of a single rectangle, but flag it in such a way that your code handles it as a billboard (if you haven't had experience with billboarding, Google for "3d billboarding" without the quotes). AC3D has a Data field associated with each object (hit F9 to bring it up while a single object is selected), which is great for sticking in hints about how to handle objects outside of AC3D.

4. Tweak the code that loads the models to handle these lines so you don't end up changing the model --- I don't know if this is an open source solution that you can modify like this...

There may be other options I'm not thinking of, but I hope this gets you started.

Dennis
Dennis is offline   Reply With Quote