static mesh/prop collision?

zexzex Join Date: 2009-10-07 Member: 68978Members
<div class="IPBDescription">how is it handled</div>how does the map editor handle collision in props? For example if I make a fancy column and place it in a level, how do I define collision for that object?

Comments

  • UncleRayUncleRay Join Date: 2010-03-08 Member: 70881Members
    For this editor, you just simply add in a prop, and BAM! Instant collision!

    Lol jk! I have no idea... Probably Thaldarin or someone else will chime in on this one.
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    The basic collisions works in that way yes.

    Although as we all know right now sometimes weapon models and the player goes through certain props. I've looked at Tram a few times as that has quite a fair bit of geometry covering props in the Collision Geometry layer, however unless there is something magic about the 'wall 128' 1024x1024 texture, I am at a loss as to distinguish it from normal geometry and what is making it so special to serve as additional invisible clipping.

    I think we'll find there's only a handful of people, who have that super secret access that can provide that answer.
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    edited January 2011
    <!--quoteo(post=1823058:date=Jan 10 2011, 05:47 AM:name=UncleRay)--><div class='quotetop'>QUOTE (UncleRay @ Jan 10 2011, 05:47 AM) <a href="index.php?act=findpost&pid=1823058"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->For this editor, you just simply add in a prop, and BAM! Instant collision!<!--QuoteEnd--></div><!--QuoteEEnd-->

    <!--quoteo(post=1823061:date=Jan 10 2011, 05:58 AM:name=Thaldarin)--><div class='quotetop'>QUOTE (Thaldarin @ Jan 10 2011, 05:58 AM) <a href="index.php?act=findpost&pid=1823061"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The basic collisions works in that way yes.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Are you guys referring to UW's prop models that are included with the game, or custom models, or both? In other words, if I create a prop model and import it into Spark, will it automatically have collision?

    Or, when creating the model, do I also need to create collision geometry as implied by Thaldarin's post?

    I wish UW would release their tools documentation to the public :(
    Is any documentation available to people who buy the game? It doesn't seem so...
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    You need to talk to a modeller and UW who can tell you how the collision works, not the mapping forum. Although I feel you may already know that.
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    I thought it was a safe assumption that someone interested in making custom maps for NS2 would have tried using custom models. I guess not :(
  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    I don't remember who or when, but I know a few folks have created some custom props. I wish I could offer something more then that. It can be done.
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    <!--quoteo(post=1823075:date=Jan 10 2011, 08:04 AM:name=McGlaspie)--><div class='quotetop'>QUOTE (McGlaspie @ Jan 10 2011, 08:04 AM) <a href="index.php?act=findpost&pid=1823075"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It can be done.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I certainly hope it can be done! An engine which is supposed to be easily moddable wouldn't be worth the bytes it's written on if it didn't have the ability to use custom models!
  • uffouffo Join Date: 2003-05-03 Member: 16026Members
    <!--quoteo(post=1823076:date=Jan 10 2011, 09:11 AM:name=zex)--><div class='quotetop'>QUOTE (zex @ Jan 10 2011, 09:11 AM) <a href="index.php?act=findpost&pid=1823076"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I certainly hope it can be done! An engine which is supposed to be easily moddable wouldn't be worth the bytes it's written on if it didn't have the ability to use custom models!<!--QuoteEnd--></div><!--QuoteEEnd-->

    This has once been discussed in some thread which I can't seem to find much to my shame since I need to know this too :P
    But as I recall it you have to model a 2nd layer which is the model's collision box. Either that or you specify the collision model in your .model_compile file.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    Yes it can be done.
    I'll assume you already have a custom model being compiled.
    In the model_compile file you need to add a new line.

    geometry "MyModel.dae" // this line you need to compile the model
    physics "MyModel.dae" //to get physics compiled

    Here is a link that'll help you out a bit as well: <a href="http://www.unknownworlds.com/ns2/wiki/index.php/Builder" target="_blank">http://www.unknownworlds.com/ns2/wiki/index.php/Builder</a>

    That being said, I have never been able to get the collision to work. I don't get errors or anything it just doesn't work in-game. That may have something to do with using a concave model however, so stick to convex if you can, at least initially.
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    <!--quoteo(post=1823094:date=Jan 10 2011, 10:28 AM:name=Dalin Seivewright)--><div class='quotetop'>QUOTE (Dalin Seivewright @ Jan 10 2011, 10:28 AM) <a href="index.php?act=findpost&pid=1823094"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->In the model_compile file you need to add a new line.
    geometry "MyModel.dae" // this line you need to compile the model
    physics "MyModel.dae" //to get physics compiled<!--QuoteEnd--></div><!--QuoteEEnd-->

    Is "physics" the same as collision and if so is what you are doing setting the model to use itself as a collision mesh? And if this is the case I guess any model (specifically a simplified version of the original) could be used in the physics line?
  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    <!--quoteo(post=1823076:date=Jan 10 2011, 02:11 AM:name=zex)--><div class='quotetop'>QUOTE (zex @ Jan 10 2011, 02:11 AM) <a href="index.php?act=findpost&pid=1823076"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I certainly hope it can be done! An engine which is supposed to be easily moddable wouldn't be worth the bytes it's written on if it didn't have the ability to use custom models!<!--QuoteEnd--></div><!--QuoteEEnd-->No, no. Sorry, I was mistaken. It can't be done. The entire Modding and Mapping forums are actually a huge scam by UW to goad the interwebs into thinking it could be moddededes..ess....
  • InsaneInsane Anomaly Join Date: 2002-05-13 Member: 605Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer
    Collision hulls are not controlled by the edtior, but rather set up as part of the model creation process. Take a look at <a href="http://www.naturalselection2.com/storage/physics_setup.swf" target="_blank">this video</a> which will hopefully outline what you need to do. I'm afraid it's not my area though so I can't answer detailed questions.

    You can define additional collision in the editor by adding geometry to the "CollisionGeometry" group, which will make it invisible but solid. This is for simplifying and controlling the collision of the spaces you build in the editor though, and isn't a substitute for giving props their own phyisics mesh.
  • ThaldarinThaldarin Alonzi&#33; Join Date: 2003-07-15 Member: 18173Members, Constellation
    edited January 2011
    So 'CollisionGeometry' should be added to grates on floors, walls and ceilings but left off of normal 'solid' props?

    I only ask as I see on Tram, after the marine spawn it is used on the curved ceiling for a solid prop.
  • InsaneInsane Anomaly Join Date: 2002-05-13 Member: 605Members, Super Administrators, Forum Admins, NS1 Playtester, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, NS2 Map Tester, Subnautica Developer, Pistachionauts, Future Perfect Developer
    There will be specific situations where you want to place CollisionGeometry over props. I can't say why Tram has it in that specific place because I wasn't involved in that, but making complex geometry easier for skulks to walk across is one good reason.

    What I mean is that you'll want to use it to optimise your level's collision, but it shouldn't be used in place of props having their own collision hulls.
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    On railings, which are kinda wonky for Skulk wallwalking, using the CollisionGeometry group is a must. However it also blocks Fade blink and most projectile based weaponry. Are we going to get more types of this "clipbrushing", because sometimes you want to simplify or block movement, while still allowing to shoot and blink trough those things. Railings are a good example for this, any news on this? :)
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    <!--quoteo(post=1823117:date=Jan 10 2011, 01:59 PM:name=Insane)--><div class='quotetop'>QUOTE (Insane @ Jan 10 2011, 01:59 PM) <a href="index.php?act=findpost&pid=1823117"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Take a look at <a href="http://www.naturalselection2.com/storage/physics_setup.swf" target="_blank">this video</a> which will hopefully outline what you need to do.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Hn, thanks for that.

    What are your (UW's) plans re: tools documentation and will you consider releasing your internal docs as a stopgap?
Sign In or Register to comment.