To render or not to render.
by AllynMcelrath · in Torque Game Engine · 03/14/2006 (7:27 am) · 10 replies
I have what is most likely a simple question, but its one I don't know the answer to.
"Does the terrain block line of sight of objects, thus making them not be rendered?"
What I mean by this is, I have a very "Sculpted" terrain, most of the areas are bound by impassable terrain around the areas (as opposed to invisible walls).
What I need to know is, if the player is in a "bowl" of terrain, sounded by walls of terrain.. Do the objects beyond still get rendered? I don't really mean rendered on screen, as you can't see them, so no. But as far as polygons and whatnot... Does the terrain act like a wall, removing the object beyond it from even being considered?
Some what like the "zoning" that happens in interior instances.
The reason I'm asking is frame rate and optimization.
Thanks.
"Does the terrain block line of sight of objects, thus making them not be rendered?"
What I mean by this is, I have a very "Sculpted" terrain, most of the areas are bound by impassable terrain around the areas (as opposed to invisible walls).
What I need to know is, if the player is in a "bowl" of terrain, sounded by walls of terrain.. Do the objects beyond still get rendered? I don't really mean rendered on screen, as you can't see them, so no. But as far as polygons and whatnot... Does the terrain act like a wall, removing the object beyond it from even being considered?
Some what like the "zoning" that happens in interior instances.
The reason I'm asking is frame rate and optimization.
Thanks.
#2
The use of invisable walls in this case would not be used to obscure, only to stop players from going that way, its tipical in alot of games, i prefer naturial restrictions, thats why im using the terrain and incline restrictions.
Thanks for your reply. i will try that.
03/14/2006 (8:23 am)
Itsa not just the player, im talking about ALL objects that are blocked by the terrain.The use of invisable walls in this case would not be used to obscure, only to stop players from going that way, its tipical in alot of games, i prefer naturial restrictions, thats why im using the terrain and incline restrictions.
Thanks for your reply. i will try that.
#3
03/14/2006 (9:07 am)
Quote:in thata case you can move the raycasting stuff afurther up the render chain into shapebase or asomething.
Itsa not just the player, im talking about ALL objects that are blocked by the terrain.
#4
I need the answer before the solution ;)
Thank you for youe ideas =)
03/14/2006 (9:41 am)
Sadly, im not a coder. Im just wondering, for performance reasions, if the terrain blocks objects from being renderd.I need the answer before the solution ;)
Thank you for youe ideas =)
#5
so i tried out the Wireframe thing,
and yes, terrain blocks players from rendering.
it looks like it also does its best at blocking out interiors and other shapes,
but it's not perfect at those.
03/14/2006 (9:51 am)
Hi Allyn -so i tried out the Wireframe thing,
and yes, terrain blocks players from rendering.
it looks like it also does its best at blocking out interiors and other shapes,
but it's not perfect at those.
#6
1:Terrain blocks players from rendering.
2:it blocks Interiors and other shapes.
Can you give me an idea of what you mean by "it looks like it also does its best at blocking out interiors and other shapes, but it's not perfect at those."?
It does it only for some shapes and not others? or does it get over written by somthing like the distance oclussion? (xxx distance = "no render XXX Distance = "yes render")
Thank you for all your help.
03/14/2006 (10:25 am)
Cool, Im at work so i havent had the chance to test it. So", 1:Terrain blocks players from rendering.
2:it blocks Interiors and other shapes.
Can you give me an idea of what you mean by "it looks like it also does its best at blocking out interiors and other shapes, but it's not perfect at those."?
It does it only for some shapes and not others? or does it get over written by somthing like the distance oclussion? (xxx distance = "no render XXX Distance = "yes render")
Thank you for all your help.
#7
unfortunately i don't have enough time to really get quantitative,
basically it sometimes blocks interiors but sometimes not.
it's definitely doing something more complex than just culling by distance,
eg, it is definitely sometimes culling because of terrain.
what the proper meaning of "sometimes" is here, i can't tell ya.
are you able to compile the engine ?
if so,
compile yourself a debug build,
and when running that press F9,
and then cruise around the landscape.
you'll be able to see when it's culling out interiors, trees, etc.
if you can't compile,
give me an email address which can handle a 3 or 4MB attachment and i can mail you a debug build.
03/14/2006 (10:48 am)
Hey allyn -unfortunately i don't have enough time to really get quantitative,
basically it sometimes blocks interiors but sometimes not.
it's definitely doing something more complex than just culling by distance,
eg, it is definitely sometimes culling because of terrain.
what the proper meaning of "sometimes" is here, i can't tell ya.
are you able to compile the engine ?
if so,
compile yourself a debug build,
and when running that press F9,
and then cruise around the landscape.
you'll be able to see when it's culling out interiors, trees, etc.
if you can't compile,
give me an email address which can handle a 3 or 4MB attachment and i can mail you a debug build.
#8
I would apprecate that, E-mail in profile.
Thanks.
Let me know if i can ever return the favor.
03/14/2006 (12:15 pm)
Sadley, no i dont compile.I would apprecate that, E-mail in profile.
Thanks.
Let me know if i can ever return the favor.
#9
.. but i just realized you might be using tge 1.4,
but i'm only using 1.3.
maybe someone else has a stock debug TGE 1.4 around ?
03/14/2006 (12:19 pm)
.. mailed... but i just realized you might be using tge 1.4,
but i'm only using 1.3.
maybe someone else has a stock debug TGE 1.4 around ?
#10
03/14/2006 (12:42 pm)
Yes, im using 1.4... Its ok. I just want to look, i cant think that it would have changed that much between versions.
Associate Orion Elenzil
Real Life Plus
Walls by themselves do *not* prevent players from being rendered, even if the wall completely obscures the player. You need a zone for that.
As for terrain, i don't know if terrain blocks player rendering.
You might be able to find out by running in debug and pressing F9 to enter wireframe mode.
(I'm not actually sure if that draws the terrain as wireframe or not, but assuming it does)
Then just look towards your example player in different situations.
If it is rendering when it "shouldn't",
you might consider modding the engine the way i recently described here:
www.garagegames.com/mg/forums/result.thread.php?qt=41155
.. but including Terrain in the raycast typeMask, of course.