Game Development Community

Ignoring level geometry when placing assets

by Johntiel · in Torque 3D Beginner · 02/24/2015 (9:47 pm) · 7 replies

I'm not sure how to describe this, so here's a picture.

imageshack.com/a/img907/4762/Ewifdo.png
Basically, when you put something down, the polygons that make up the world itself are usually going to interfere in some way. This isn't noticeable in most cases where creators either make a point of flattening the ground or the bottommost part of the structure is inaccessible.

But what I'd really like to do is have a system set up so when a structure is placed down (by a player), intervening geometry is magically poofed away, so the tunnel into the cliffside isn't blocked by the cliff itself. The question I can't really fathom is how to make it go away. I figured one could just continually check to see if level polygons are exposed to the level's lighting, and if not, don't render or enforce collision for them, but that seems like it could get messy really fast given not everything is going to neatly fit into a quad or triangle.

The only other thing I can really think of is to have some sort of object that's unconditionally transparent to players

About the author

Recent Threads


#1
02/24/2015 (10:46 pm)
In the terrain editor there is a tool that removes terrain polygons. It's right there with raise, lower, etc - second from bottom....

docs.garagegames.com/torque-3d/official/content/documentation/World%20Editor/Editors/images/ClearTerrainStep1.jpg
#2
02/25/2015 (5:11 am)
Is there a way to do this dynamically as a match progresses? Call the method in Torquescript or something?
#3
02/25/2015 (5:52 am)
You're going to have to add that yourself - the editor support classes aren't loaded during a regular game, but the code is there so all you'll have to do is transfer it over and expose it to script. There have been a few different whacks at this with varying levels of success. You'll have to do something like Google for "torque 3d dynamic terrain" to find them (or use the broken site search - it's frustrating at best but you might get lucky).
#4
02/25/2015 (7:01 pm)
Do you figure it'd be possible to set a building to instead paint a transparent texture on the terrain instead within interior bounds? The big thing then would just be collision..

Forgive me, I realize I should probably be experimenting and figuring out for myself, but at the moment I'm just trying to figure out what's feasible without too much lower level work before committing.
#5
02/25/2015 (9:54 pm)
What genre are we talking? Is the player going to be going into the buildings? If so, then you just have to find a way to remove the terrain polygons that intersect with the building - making the terrain texture transparent won't fix anything.
#6
02/25/2015 (10:21 pm)
In a perfect world the player would make the building, and a method would be called to make it so that the interior is free of any intervening geometry.

You're right. I just need to spend some time to make expose that particular function of the worldeditor. It seems the only solution would be to implement that and just limit construction of buildings to correspond with the grid. An umbrella effect on the entrance would cover up the excess level geometry cleared - I'm thinking sandbags ;)

Thank you for your help.
#7
02/26/2015 (5:50 am)
No problem - I play sounding board a lot.