www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Setting Clear or Deleting Parts of Terrian for Tunnels « View previous topic :: View next topic » 
Author Message
LumaArcade
PostPosted: Mon Sep 22, 2008 7:36 am    Post subject: Setting Clear or Deleting Parts of Terrian for Tunnels Reply with quote



Joined: 12 Sep 2008
Posts: 8

Hey,

I am busy working with Grome and have a map that requires tunnels through terrain. With that said I need to delete faces (old terrain called it 'set clear face') on the terrain to allow my player to enter and exit a tunnel. This tunnel would be built from DIFs or DTSs, but not terrain.

Does Grome or Atlas mapping even allow for face deletion?!

Thanx Very Happy
_________________
Game Dev Journal
http://bydersjoint.wordpress.com
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Sep 22, 2008 8:44 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi, Grome allows to have portion of the terrain completely transparent (just paint all the masks in that point transparent). I don't know if ATLAS support this, you may need to ask a GarageGames developer. What I know is that they require that opacity maps are normalized (their channel sum is 255, that is 100% opaque) so it may be that ATLAS doesn't allow transparent portions. To test if they allow this, you can take the exported opacity map and paint it completely black in some portions using an external program (all channels, including alpha to be black) and see how ATLAS reacts to this. If they allow it I can quickly change the exporter to let the completely transparent masks portions as black in the ATLAS opacity masks.

Regards,
Adrian L.
Back to top
View user's profile Send private message
LumaArcade
PostPosted: Mon Sep 22, 2008 8:49 am    Post subject: Reply with quote



Joined: 12 Sep 2008
Posts: 8

Hi ALicu,

Thanks for the info, I will definitely give that a try... the next consideration (when assuming we are looking simply at opacity or the visuals) is what happens in terms of the collision... if the collision is still there, then opacity will not help.

Thanks again!!!

~C
_________________
Game Dev Journal
http://bydersjoint.wordpress.com
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Sep 22, 2008 8:56 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Yes, you are right, you need to preprocess the opacity masks to see what faces of terrain are completely transparent and keep those special faces somehow so they are used differently by the collision code. This is an engine issue, so either TGEA already supports this or you need to implement it yourself in the engine.

Regards,
Adrian L.
Back to top
View user's profile Send private message
LumaArcade
PostPosted: Mon Sep 22, 2008 8:58 am    Post subject: Reply with quote



Joined: 12 Sep 2008
Posts: 8

Awesome! I will look into this now Very Happy

Thanks again for your help!
_________________
Game Dev Journal
http://bydersjoint.wordpress.com
Back to top
View user's profile Send private message
LumaArcade
PostPosted: Mon Sep 22, 2008 10:10 am    Post subject: Reply with quote



Joined: 12 Sep 2008
Posts: 8

Just a quick question!!

When you say paint completely black on the opacity map... are you meaning the '_masks' images... or the file which does not appear to be an image called 'opacity.atlas'

I successfully paint the terrain transparent in Grome, but as you say i think your exporter normalizes it... coz nothing shows up on any of the textures/masks/etc... and in Torque it shows as a black patch on the terrain!

I am beginning to wonder if implementing some sort of NULL texture system (as is used on DIFs), but with collision removal might be a wise idea... but we'll look into that Smile

~C
_________________
Game Dev Journal
http://bydersjoint.wordpress.com
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Sep 22, 2008 10:17 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Yes, paint the _masks images. These are PNG with alpha so be aware that some programs (example: Photoshop) don't treat this as we would want (it discards the color information where alpha is completely transparent since it consider alpha as transparency channel).

Also it would be a good idea to ask about this problem on the ATLAS GG forums, I don't know if they support this kind of behavior.
Back to top
View user's profile Send private message
LumaArcade
PostPosted: Mon Sep 22, 2008 11:36 am    Post subject: Reply with quote



Joined: 12 Sep 2008
Posts: 8

Yup, looks like 'out the box' atlasmap does not support it!
We're gonna go ahead and put in our own system!
Thanks for all your help!!!
_________________
Game Dev Journal
http://bydersjoint.wordpress.com
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Sep 22, 2008 11:42 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Yes, also in the exporter we need to add the check: if all the masks are blank, don't normalize, keep that portion completely black. Let me know if you can modify ATLAS to handle this case and I will add this check in the exporter code.
Back to top
View user's profile Send private message
LumaArcade
PostPosted: Tue Sep 23, 2008 12:04 pm    Post subject: Reply with quote



Joined: 12 Sep 2008
Posts: 8

Something worth posting on this thread

Topic: Atlas Terrain : Removing faces
http://www.garagegames.com/mg/forums/result.thread.php?qt=79326
_________________
Game Dev Journal
http://bydersjoint.wordpress.com
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Sep 23, 2008 12:22 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Yes, I think that is hard to have faces removed from chunked LOD but they at least support texture masks that are completely transparent on some areas.Then you will keep the holes information separately, not necessarily directly in the terrain data. Your collision code can then perform collision and if the collision point is on a face covered by all-transparent faces ignore that point and perform collision again, this time not considering terrain surface.

I will do some tests myself to see how the ATLAS generation reacts at completely transparent opacity maps.

Regards,
Adrian L.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group