Portals and LOD...
by Mitovo · in General Discussion · 03/23/2004 (9:01 am) · 4 replies
Hello..
I've done some research, forum-searching and overall reading up on the portal/LOD system in Torque... and I believe I have a pretty good grasp on it. However, a few questions do come to mind.
1. I've noticed the suggestion of LODs for interior areas, like dungeons and such, several times. However.. I'm kinda curious about something. If you're using Portals to basically tell Torque what you can or can't see from any given location or angle.. If you're in, say, the very first room of a dungeon and there's at least 1 or 2 portals placed in a couple L-shaped hallways between you and another area that you nor the engine can see into from your current position.. doesn't the portal basically tell the engine "can't see beyond this point.. don't bother rendering anything"..thus making LOD redundant? Do portals override LOD, or am I missing something here?
I can definitely see the benefit in, say, an exterior situation when you're approaching a building from far away, or are approaching the entrance to a dungeon and the engine can see clearly through the portal (even if you can't), then definitely having that LOD in place is helpful.. but in situations where you *know* you won't see that far in, is it still necessary to have that LOD in place?
2. In the event that LOD is used.. given that the lighting is calculated in the editor for the world and interior geometry that's exposed to sunlight, etc (such as that "temple" area in the demo)... how do you ensure that all the "phases" of LOD will be properly lit.. even from what little you may see of them? Do you dynamically just switch out each LOD version in the editor and recalculate lighting for each independently and this information is saved for runtime?
I hope these questions make sense.. heh.. I'm ordering the Torque engine in a couple days (gotta wait for the paycheck to hit the bank!) and I'll be able to experiment with all these things.. but I'm just curious about some of the methods/techniques used in the meantime..
Thanks once again for any help or enlightenment :-)...
Mike
I've done some research, forum-searching and overall reading up on the portal/LOD system in Torque... and I believe I have a pretty good grasp on it. However, a few questions do come to mind.
1. I've noticed the suggestion of LODs for interior areas, like dungeons and such, several times. However.. I'm kinda curious about something. If you're using Portals to basically tell Torque what you can or can't see from any given location or angle.. If you're in, say, the very first room of a dungeon and there's at least 1 or 2 portals placed in a couple L-shaped hallways between you and another area that you nor the engine can see into from your current position.. doesn't the portal basically tell the engine "can't see beyond this point.. don't bother rendering anything"..thus making LOD redundant? Do portals override LOD, or am I missing something here?
I can definitely see the benefit in, say, an exterior situation when you're approaching a building from far away, or are approaching the entrance to a dungeon and the engine can see clearly through the portal (even if you can't), then definitely having that LOD in place is helpful.. but in situations where you *know* you won't see that far in, is it still necessary to have that LOD in place?
2. In the event that LOD is used.. given that the lighting is calculated in the editor for the world and interior geometry that's exposed to sunlight, etc (such as that "temple" area in the demo)... how do you ensure that all the "phases" of LOD will be properly lit.. even from what little you may see of them? Do you dynamically just switch out each LOD version in the editor and recalculate lighting for each independently and this information is saved for runtime?
I hope these questions make sense.. heh.. I'm ordering the Torque engine in a couple days (gotta wait for the paycheck to hit the bank!) and I'll be able to experiment with all these things.. but I'm just curious about some of the methods/techniques used in the meantime..
Thanks once again for any help or enlightenment :-)...
Mike
About the author
#2
LOD is really only useful for things you see from the outside. If you are inside the place, you can't really be any closer, so LOD doesn't mean anything. If it's a VERY large and open interior and LOD could be useful, then you could split up the interior into multiple pieces. But in general, you should just be able to use Portals for optimizing rendering from inside an interior. And with LOD being relegated to just outdoor scenarios, it will just use the lightmap from the highest detail version at all times. If you are far enough away for a lower detail version to show up, you wouldn't be able to notice any descrpencies in the lighting at that point anyway I'd think.
I don't really know what I'm talking about, but it's possible I'm right about something.
03/26/2004 (1:42 am)
Portals don't tell you want you can't see, only what you can see. If you can see the portal, that means the "zone" the portal encloses will be rendered. If you can't see the portal, it isn't rendered. At least that's my understanding. LOD is really only useful for things you see from the outside. If you are inside the place, you can't really be any closer, so LOD doesn't mean anything. If it's a VERY large and open interior and LOD could be useful, then you could split up the interior into multiple pieces. But in general, you should just be able to use Portals for optimizing rendering from inside an interior. And with LOD being relegated to just outdoor scenarios, it will just use the lightmap from the highest detail version at all times. If you are far enough away for a lower detail version to show up, you wouldn't be able to notice any descrpencies in the lighting at that point anyway I'd think.
I don't really know what I'm talking about, but it's possible I'm right about something.
#3
03/26/2004 (2:52 am)
Not 100% sure, but I think each LOD has its own lightmap computed, at least the more LODs you have the bigger the lightmap is and the longer the lighting takes it seems (but I didnt verify that yet in any sense, only guessing here ;) ...)
#4
03/26/2004 (10:31 pm)
Mmmm yep that's right. I went and implemented some LOD for the first time on a .dif model today and it lightmaps each of them. I also finally realized TGERAD is a map2dif mod I can use without having to touch the engine. Yayness =)!
Torque Owner Mitovo