High polygon object

Started by EgonOlsen, March 18, 2009, 09:43:58 AM

Previous topic - Next topic

EgonOlsen

They are behind. Some parts behind seem to belong to another object, but most of them somehow still belong to the glass.
Anyway, here's how it looks right now. It currently renders @75fps on my machine:


paulscode

#16
Looks awesome!  If I may make a small suggestion - do you see the glass poking through the billboarded glow on the passenger headlight?  I figured out a way to fix that kind of behavior when I was playing around with glow effects a while back.  For the billboard itself, make it the same diameter as the longest diagonal length of whatever object is supposed to be glowing (the headlight in this case - the diameter you are using looks about right in this screenshot).  Then, offset the two polys of the billboard to half that distance in the -z direction in object-space.  Finally, place the center of the billboard at the center-of-mass of the headlight.  That way, no matter what angle you look at the headlight from, the glass will never be sticking through the billboarded glow effect.

--EDIT--
I drew a diagram in case my description above doesn't make any sense:



If you wanted to be really creative, you could put three smaller less transparent glows per headlight inside/behind the large glow (one at the COM for each bulb) using the same method I described above.  That might be a little bit of overkill...

paulscode

Ok, I corrected the problem.  I must have used the wrong method for selecting the glass last time.  Max is a great modeler, but it has WAY too many options sometimes!  Here's the fixed model:

Fixed Triant

Due to the change, the geometries I detached should now load in this order:
Windshield
BackWindow
DriverWindow
PassengerWindow
Headlights
SideMirrors
RearViewMirror
BreakLights

EgonOlsen

The new model works fine, thanks. I know about the lights poking through, but i don't care... ;D I'm not sure that your method will help here, because sorting of compiled objects is based on objects only, not longer on polygons like it is with the normal pipeline. Simply setting a sort offset may help too.

paulscode

Quote from: EgonOlsen on March 21, 2009, 01:49:03 PM
sorting of compiled objects is based on objects only, not longer on polygons like it is with the normal pipeline.
I can imagine where that would cause some really strange behavior, such as when two objects "pass through" each other in the camera-space Z-axis direction (in one frame, object A would be behind object B, then in the next frame object A would be in front of object B), and it would create problems with pretty much every billboarded-child special effect.  I suppose the way to avoid odd behavior would be by making sure objects in the "compiled pipeline" never pass through each other (removing the possibilty of some special effects).  It is definitely going to be a huge advantage that jPCT will let you choose between the two pipelines.

EgonOlsen

Quote from: paulscode on March 21, 2009, 04:01:45 PM
I can imagine where that would cause some really strange behavior, such as when two objects "pass through" each other in the camera-space Z-axis direction (in one frame, object A would be behind object B, then in the next frame object A would be in front of object B), and it would create problems with pretty much every billboarded-child special effect.  I suppose the way to avoid odd behavior would be by making sure objects in the "compiled pipeline" never pass through each other (removing the possibilty of some special effects).  It is definitely going to be a huge advantage that jPCT will let you choose between the two pipelines.
This is a problem for transparent objects only. Any others will simply rely on the ZBuffer and everything is fine.