Jump to content

  • Log In with Google      Sign In   
  • Create Account

Corefanatic

Member Since 09 Apr 2010
Offline Last Active Feb 18 2014 08:06 AM

#4925729 Simulating object damage using shaders

Posted by Corefanatic on 27 March 2012 - 10:40 AM

I suggest you mask out the pixels where the damage occurs, something along the lines of this:

http://www.valvesoftware.com/publications/2010/gdc2010_vlachos_l4d2wounds.pdf


#4925382 D3D11 effect and Deferred context

Posted by Corefanatic on 26 March 2012 - 09:43 AM

Effects framework in DX11 is not thread safe, aka there are situations where you cannot use the same effect concurrently in multiple threads. These situations include updating constant buffers for example, nothing good happens when you try to update the same buffer at the same time from two different threads. I've tried using effects in deferred contexts, doesn't work well.

You have few options here, either make a copy of an effect for each thread you are going to use it on,do not use effects at all or use threading primitives like locks to control concurrent access to effects.

The problem with state is something I had to struggle with my self, as it seems that command lists generated from deferred contexts are "isolated", ie when you execute command lists on the immediate context after they are generated, the state does not continue from one to another.

Creating your own shader framework is what I have done, but it takes much more time than using effects.


#4921517 Calculate a path based on a 3D model

Posted by Corefanatic on 12 March 2012 - 06:08 PM

Well, if you have a pipe made of consecutive rings, then average the positions of all vertices belonging to each ring and you get a point in the middle of them all. Repeat for whole pipe, connect the midpoints and you have a path through.


#4921515 Game Engine *D Design

Posted by Corefanatic on 12 March 2012 - 06:06 PM

A 3D engine can handle both 2D and 3D without any problem. As you said, you will be drawing in 2D for your hud etc., so there isn't much of a problem with rendering.

However, engines are much more than rendering, and making a universal engine is no easy feat, especially when you are making your first. I recommend having a game in mind and create an engine for that. Then iterate or write a new engine.


#4915002 Gui: in percents or in pixels?

Posted by Corefanatic on 20 February 2012 - 06:11 PM

Generally, making a UI system pased on percentages or using universal coordinate system (ie. top left corder of any window is (0,0) and bottom right is (1,1)) is better since your UI will scale automatically, but set pixels is faster to implement.

I honestly think that best solution is one that incorporates both, for example if you want a console window in your ui, you might want it to scale to width of your window automatically, but you might want it to extend down only 300 pixels no matter what the resolution is (as long as it is more than 300 vertically of course).

Web pages implement both of these together and they work pretty well so take your inspiration from them.

Hope this helped.


PARTNERS