Sign in to follow this  

XNA creating hole in wall

This topic is 2064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 [font=courier new,courier,monospace]clip/discard/kill[/font] 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 [i]natively [/i]this degree of control. You have to build it on top of the provided features.

Share this post


Link to post
Share on other sites

This topic is 2064 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this