Jump to content

  • Log In with Google      Sign In   
  • Create Account

XNA creating hole in wall


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 shifty89   Members   -  Reputation: 101

Like
0Likes
Like

Posted 21 April 2012 - 02:41 PM

Hi im really struggling to get info on how to tell a specific area of geometry not to draw. Basically for a project in looking at creating a hole in a wall via culling to stop a certain area being drawn. i cast a ray from the centre of the screen and i check to see if it has hit geometry e.g my wall model. When this happens i am trying to draw a shape which represents the area of the wall i want to cull. The problem is I have no idea how to tell the are contained within the shape not to draw to create the hole. Can anyone point me in the right direction ?

Sponsor:

#2 dAND3h   Members   -  Reputation: 214

Like
0Likes
Like

Posted 21 April 2012 - 06:54 PM

Are you trying to do it this way for a reason? If not, why dont you just draw a bullet hole texture wherever you shoot

#3 shifty89   Members   -  Reputation: 101

Like
0Likes
Like

Posted 22 April 2012 - 06:47 AM

Yes its for a project that exmaines weather or not punching a hole through a wall through entirely graphical means is a viable alternative to say a fracturing solution in certain situations.

#4 shifty89   Members   -  Reputation: 101

Like
0Likes
Like

Posted 22 April 2012 - 08:22 AM

Really want I need to know is does xna have functionality to select an area not to draw, or if I could do it through shaders and attach them to an xna project.

#5 Krohm   Crossbones+   -  Reputation: 3249

Like
1Likes
Like

Posted 23 April 2012 - 01:53 AM

There are a few ways to do that.
I'd be currently inclined to associated each fragment with a world position and issue a clip volume such as a sphere for each hole, calling clip/discard/kill if the fragments ends being in the sphere. Something similar has been done in Left Dead 2 if memory serves.

Messing with alpha maps might also be a possibility. It natively allows for a much higher hole count, I guess it'll also be much faster to render but the machinery required is fairly more involved.

In general, no, XNA/Direct3D does not feature natively this degree of control. You have to build it on top of the provided features.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS