Enhancement modification for DIF and Portal in some certain circumstances
by Huan Li · in Torque Game Engine Advanced · 04/29/2009 (10:22 pm) · 2 replies
Other than a FPS game, for example a virtual social game, when you're looking at the door of a room(dif) very far away, it may be not necessary to expose the inside objects to you, so those objects can be ignored for rendering. But the stock TGEA only use detail 0 of the DIF for zone-traversal, so whatever the detail level it is(may be a detail level that doesn't have any portals, just a closet-box),as long as you face the portal which is in detail 0, all the objects in side the DIF will be rendering.
Modification:
in interiorInstance.cpp, at line about 766, do the following, just replace the 0 with detailLevel:
ExtraInfo:
I have some more ideas for this type of enhancement about portal and dif, for example: add an effective distance dynamic attribute "visDist" to a portal, the portal will work only when camera faces it and the distance between the portal and cam is less than "visDist".Can someone give me some suggestion on how to implement this? Thanx.
Modification:
in interiorInstance.cpp, at line about 766, do the following, just replace the 0 with detailLevel:
//[ li-huan modified /*<< original bool continueOut = mInteriorRes->getDetailLevel(0)->prepRender(state, >>*/ //<< modified bool continueOut = mInteriorRes->getDetailLevel(detailLevel)->prepRender(state, //>>
ExtraInfo:
I have some more ideas for this type of enhancement about portal and dif, for example: add an effective distance dynamic attribute "visDist" to a portal, the portal will work only when camera faces it and the distance between the portal and cam is less than "visDist".Can someone give me some suggestion on how to implement this? Thanx.
Associate Manoel Neto
Default Studio Name
But don't ask me where this is done, it's been years since I messed with the zoning code.