JoshParnell wrote: Talvieno wrote:
what you mean by imposters... I thought you were still trying to billboard. I figured the thing to do would be just slap up a two-triangle plane with an image on it, and shade it so that it was lit correctly (e.g. facing towards the star it would be shaded to imitate being in shadow, facing away it would look bright, etc). I didn't figure that you'd see them up close... I'd just fade them out and fade the real stuff in when the player got close enough. I didn't think you were actually trying to make fully-functional fakes.
Any help I've given has been useless, then. lol
I feel so stupid.
I mean you're right - that's the general idea. They won't be viewed from up close. But still, you need a way of representing the object roughly
correctly from a distance, and a single, static image can't do that - because one image can only capture one angle of the object. So the real problem is that you need for this image to change according to the camera angle to the object. That change can of course be rough and inaccurate - but if you have a bunch of distant asteroids with the same model but rotated at different angle, you need for them not to all look like the exact same billboarded image
Well, yeah, ideally that'd be what you'd do, but that requires quite a bit of math even at the simplest level. Most games - even Crysis and the CryEngine, for example - do billboarding by taking a single static image of the object and shading it. They'd it up between a number of pre-taken static images, too, and not do one image for all objects.
I've never actually heard of any games that do it the way you're trying to.
I guess that's the source of my initial confusion. I'm sure you can manage it, though it might take you a while to figure it out if you haven't already. There isn't likely to be much documentation on this stuff lying around.
Yet again I spent a few hours on them today, and with great success! I revisited the classic three-billboard approach, but this time used a little magic to cull pieces of the billboards that aren't really appropriate to render (specifically, those that are almost at an oblique angle to the camera). The result is a whole lot cleaner than the previous result! It actually looks...really good! Combine that with adding in proper surface normal transformation so that the lighting is now globally correct, and you've got something that looks really darn convincing. Like, even at fairly close range! Ships and asteroids both look great using this technique. I haven't tried stations yet, but those will probably always be rendered with real geometry anyway.
Bravo, Mr. Parnell, bravo.