Peer-to-Peer Forum

 

Login Register    
Selective Area collision for Isectors
Posted: 24 April 2010 12:21 AM  
Newbie
Rank
Total Posts:  14
Joined  2008-12-23

Hi All,

I am posting in this forum after quite some time.
Anyways here is my problem, I have a flt which is set as a target to a particular isector. Now the problem is i have to make only a part of the flt to be collidable with the isector.

For Eg: If a shooter is given a shooting target( Shooting Target’ flt will have the poles and the target itself)

Now even if the shooter hits the pole of the target, it is considered as a hit. while it should be considered as a miss.

I know i can break the Shooting Target’  flt into two ,one of which will be a pole and will not be set as a target to the isector, hence making it non collidable.(But Since i do not have much modeling support , I cannot take this approach). Is there any alternative method to achieve this output?

Regards,
Rohith H N

 
Posted: 27 April 2010 05:06 PM   [ # 1 ]  
Sr. Member
RankRankRankRank
Total Posts:  112
Joined  2009-01-16

Have you taken a look at the isector masks? This allows any particular vsNode derived class to set a mask that will be bitwise or’d against to determine if an intersection test should or should not occur on a particular node

 
Posted: 10 June 2010 12:08 AM   [ # 2 ]  
Newbie
Rank
Total Posts:  7
Joined  2010-06-09

give a example.

 
Posted: 10 June 2010 09:20 AM   [ # 3 ]  
Sr. Member
RankRankRankRank
Total Posts:  112
Joined  2009-01-16

If you look at a vpObject instance within Lynx Prime, you will see a set of Masks that can be applied. You will see masks for Cull, Render, and Isector. Isector is the one that you would be most interested in. The bits set for the Isector mask on your vpObject will be bitwise anded with the isector mask on the actual isector to determine if any work will be performed. If the result of the and operation is true, the isector will be tested against the vpObject otherwise it will skip it. Just with this hypothetical example, you can see how you can control which vpObject can be part of an isector traversal or not.

The next level in this topic extends beyond just vpObjects. I used the vpObject as an example, but really any node in the scene graph can have their isector mask set. This means you can adjust isector masks for LADBM terrain, Marine oceans, etc. You can even dive into the graph hierarchy of a particular root node and set masks individually. In other words, you can access any node within a vpObject and set individual isector masks instead of just the whole object. That way you can allow your vpObject to be selectively traversed. Certain parts can be allowed to be intersected and others are not within a vpObject.

 
Posted: 14 June 2010 08:20 AM   [ # 4 ]  
Member
RankRankRank
Total Posts:  78
Joined  2007-07-23

In other words, set the isector mask of the root node of the flight file (vpObect()) to 0x000000 ... find the vsNode of the target in the flight file, set the isector mask of the target to something other than 0x000000.

 
Posted: 14 June 2010 12:06 PM   [ # 5 ]  
Member
RankRankRank
Total Posts:  78
Joined  2009-01-15

Case in point, I have to set the isector mask to 0 (0x00000000) for our ownship model so that it doesn’t get considered as part of the height above terrain (HAT) detection.

 
Posted: 14 June 2010 12:37 PM   [ # 6 ]  
Member
RankRankRank
Total Posts:  78
Joined  2007-07-23

exactly

 
Posted: 15 June 2010 01:06 PM   [ # 7 ]  
Member
RankRankRank
Total Posts:  78
Joined  2009-01-15

It was quite comical when I first discovered this.  I didn’t think to change the mask for the ownship at first.  We have a separate application for the aircraft simulation and it handles terrain collision response by my visualization app sending it HAT values. 

Basically my ownship model shot up into the air and kept going when its own isector mask was included!  The HAT value was negative because it hit, well, itself!  Those HAT values kept telling our aircraft simulator to replace the aircraft above ground.  This we done every frame so the ownship kept rising and rising!  Very funny to watch once I figured out what was going on.  I had to create a separate observer off in the weeds to view the ownship from a distance just to see what was happening.

Steve

 
Posted: 24 July 2010 08:45 AM   [ # 8 ]  
Newbie
Rank
Total Posts:  7
Joined  2010-06-09

I focus on it.

 
Posted: 01 February 2011 12:42 PM   [ # 9 ]  
Newbie
Rank
Total Posts:  4
Joined  2009-03-19

You mentioned doing this on an ladbm object.  Can you set a render mask on an ladbm object?  I want my ladbm terrain to show up in one channel of my app, but not a 2nd one.

 
Posted: 01 February 2011 01:06 PM   [ # 10 ]  
Member
RankRankRank
Total Posts:  78
Joined  2009-01-15
willidp1 - 01 February 2011 12:42 PM

You mentioned doing this on an ladbm object.  Can you set a render mask on an ladbm object?  I want my ladbm terrain to show up in one channel of my app, but not a 2nd one.

You can set isector masks on the LADBMGeometryGridDataset which is the object for a section of the terrain.  I am not sure if you can set render masks on it, though.  It doesn’t have a gui element to do so.  Maybe someone who uses multi-channel rendering with LADBM can help.

 
Posted: 01 February 2011 04:24 PM   [ # 11 ]  
Sr. Member
RankRankRankRank
Total Posts:  112
Joined  2009-01-16

It should be in the api view of the schema. Typically this is at the bottom of the acf instance and within that list of api calls should be “setRenderMask”.

If by chance it is not there, you can add it by right clicking on the root vpLADBM::LADBMGeometryGridDataset property in the api view and select “Add Items”. The “setRenderMask” should be an option to select if it was not originally there in the api view to begin with.

 
Posted: 03 February 2011 09:24 AM   [ # 12 ]  
Newbie
Rank
Total Posts:  4
Joined  2009-03-19

That was it.  There is a setRenderMask item in the API view.  Why isn’t that in the regular acf view?