|
I am building a tower with a spiral staircase in it. The problem I am having is this. If I build a spiral staircase in Maya, it has a huge polycount, bad, and I would have to use a mesh collider which I beleive uses more resources (correct?), this is also bad. If I build one step in Maya then import it add a box collider (less resources?) and create a prefab, I would have to place each step manually (100+ steps). Is there a third option which I am missing? Or a command that I am missing, like the Duplicate Special command, or duplicate with Transform in Maya. Thanks.
(comments are locked)
|
|
No, the only two ways you can do it are the two you mentioned, though I don't think you're understanding mesh colliders correctly. People often create entire levels in 3D modeling programs, and then import them with mesh colliders on them, and the games run just fine (I'm talking about potentially tens of thousands of verts on a single model, here). I remember 3DS Max had an Optimize feature that would drastically lower the polycount of the model without sacrificing quality. Perhaps Maya has something similar you could look for, but again, I wouldn't worry about your model. Just import it and put a mesh collider on it. Sidenote: Saying something has a "huge polycount" isn't helpful... what is helpful would be to post the model statistics, saying exactly how many tris/verts the model has, and even posting a picture of it. Thanks for your response, I had remembered seeing something in the manual that said a box collider would be preferred over a mesh collider due to performance reasons, but that was about all it said, so I definitely was not understanding mesh colliders correctly.
Jul 14 '10 at 08:21 PM
Paul 5
They're better if your object is relatively box shaped. Not really useful at all for spiral stairs
Jul 14 '10 at 10:59 PM
Mike 3
The manual probably intended it to mean that if you had a complex model, lets say a treasure chest, with 10k polygons, that it would be better to use a box collider, since the chest is boxed shape. Otherwise instead of a simple primitive check or 12 polygons (typical cube), it would/could end up checking all 10k polygons.
Jul 15 '10 at 06:05 AM
Noisecrime
As others have said, try importing the model and see what performance is like. If its poor, then look at how you can optimise the model or the collision geometry. For example you'll never see the back of the stair case so you could remove those polygons, or use a winding ramp as collision geometry instead.
Jul 15 '10 at 06:06 AM
Noisecrime
(comments are locked)
|
|
Use a simplified mesh for the collision mesh. For example, a ramp would be fine for collision (and more pleasant to walk up/down) rather than using every step. So you have a mesh for display and another mesh for collision.
(comments are locked)
|
|
Actually there is a third way, which is to make a prefab and place them by a script when the game starts. I had done a spiral around a circle this way (think of a spiral stair that itself has a curvature). Can be done with simple transform.Translate and transform.rotate. Or adjusted when instantiating, by instantiating them a bit higher and a bit rotated you can obtain a nice spiral
(comments are locked)
|
