Jump to content

  • Log In with Google      Sign In   
  • Create Account

Julian Mautner

Member Since 12 Jan 2008
Offline Last Active Oct 05 2012 12:21 PM

Topics I've Started

Beewilder - Minigame

21 January 2012 - 03:39 AM

Hi folks!

You probably heard of the Flash in a Flash Contest of Unity over chrismas. The task was to develop a flash game with unity 3.5 beta within 2 weeks!
Now I wanted to share our submission with you!


What do you think?

Performance comparison: HLSL Texture::GetDimension

05 July 2011 - 01:59 AM

Hi folks!

If you have a shader for some technique, it happens quite often, that you need the resolution of a certain texture the shader uses (RTV). Now I was wondering, since there are two methods to get this resolution, which one is actually faster. Consider the following:

1) I simply query the dimension of the texture inside the shader (lets make it a pixelshader - executed many times) using texture.GetDimension(w, h);

2) I could also pass the proper dimensions via a cbuffer. This would need an additional float2. Take the case, where the cbuffer is updated every frame (regardless of if the texture-dimension is added or not), and therefore only the additional bandwidth for transferring and the loading instruction inside the shader "hit" the performance.

Now what do you think is the faster way to this? Or is the performance difference negligible (therefore one simply uses the more comfort method)?

Joint issues (constraints)

28 July 2009 - 11:13 PM

Hi all! Again I have a question! I now implemented a PGS (after Erin Catto) as constraint-solver and modelled all collision through normal and friction constraints. So far, collision response works well --> therefore the solver seems to be implemented correctly. Now I wanted to add some joints. Started with simply once, like only-plane-movement. worked fine. Then I went on to ball-socket-joints. In the special-case the anchor-point is placed at each center of both bodies, it seems to work. But if not: eg for the pendulum-case it behaves very strange. Here some code how I implemented the ball-joint: Code snippet Annotations: - The c'tor of ogpVelConstraint takes the two involved bodies and the 4 vector-entries of the jacobian as argument. - I tried various values for fBias. The basic-behaviour of the sim. did not change - For those who wonder why the forth, and not the second jacobian-entry is negated, this is because of my special definition of the rotationmatrix and quaternions. Point-velocity in my case is computed after: vp = v + r x w To show you how my simulation acts, I uploaded two vids. (usually I simulate at 60Hz --> same problem). The big box is static and is used as anchor-point for the second-little box --> pendulum Without error correction With error correction (fBias == 0.1f here) I'm thankful for any suggestions what might be wrong! Thanks Black-Panther

Stack stability issues

15 May 2009 - 02:30 AM

Hi everyone! I've written some kind of dynamics simulation (rigid bodies). But now I've the problem, that stacks aren't stable yet. I've tried out some things already, but nothing seems to work fine. Now my suspicion is that the problem lies in the main physics step, because every single part (collision detection (broad and narrow phase), contact geometry computation, collision resolution (impulses), and contact resolution) seem to work fine. But togehter, they don't behave good enough. Simple testing situations, such as one box on a static floor, work perfectly, but bigger instances (like higher stacks) are not stable. Here two videos: Big instances without stacking work quite fine But stacking isn't stable! __________________________________________________________ Since I think the mainloop arrangement is of interesst, I'll explain you how mine works: 1) Change velocity (due to impulses) according to external forces applied and gravity 2) Save current state for each object and integrate forward for dt 3) Broadphase collision detection 4) Narrowphase collision detection. All colliding pairs of objects are stored 5) If there were any collisions restore old saved state (before current frame) of each object, otherwise jump to 13 6) For each collision pair search nearest-features. If overlapping, then search for minimal penetration axis (SAT) 7) Compute contact set for nearest/overlapping features 8) If iteration limit isn't reach jump to 9), otherwise to 11) 9) Do collision response for all contact points. (if this is the last iteration, then treat all contacts as inelastic collisions!) -- For each point calc relative velocity and determine wheter the point is a contact or a collision -- Solve all collision points (Newton, elastic collision) -- See if some of the collision points became contacts, if so, add them -- Solve all contacts (inelastic collision, with additional seperating velocity if they are overlapping (depending on penetration depth in normal direction)) 10) Jump to 2) 11) Do Shockpropagation step: BFS in contact-graph, which freezes current layer and resolves collision between this and next layer! 12) Integrate dt forward. 13) Save integrated state as current and return Is there any major error in my method? Or is there a better one? How may I solve my stack stability issues? I'm thankful for any suggestions! ________________________ Maybe you want to see the problem for yourself. [especially try test.ogam] Here's the download (Press F1 to get help for the inputs!)

Contact geometry in penetration case

20 April 2009 - 09:23 AM

Hi all! I need to compute the contact set (for collision/contact handling) for two convex polytopes when they are penetrating each other. The rest of my computation (non-penetration case) work very well, but til now I couldn't find a good algorithm which delivers me the correct penetration-contact set for (nearly) each case. For each contact-point-pair I'd need the collision points, normals and penetration depth! For collision detection I use V-Clip and my contact-set-algorithm by now uses the separating axis theorem to find the minimum penetration direction & depth. Afterwards I return those extremal features to compute the contact set... But it just doesn't work in each case. Is there a better way to compute it, or an existing algorithm which I could use (found nothing on google)? Atm it doesn't matter how good the performance of the algo is... Thanks in advance!