Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Oct 2006
Offline Last Active Oct 02 2013 09:00 PM

Topics I've Started

Placing particle emitters on dynamically clipped geometry

04 July 2013 - 04:35 PM

Hey Gamedev,


I'd like to create a reveal effect that slowly reveals the model in a scene. At the moment I have a very simple pixel shader that will reveal the model over time with a quick sin wave at the edge of the reveal for effect. The result is something like this...


Now, there is not a lot of impact with just this for a number of reasons. One thing that I would like to add is particle at the edge of the reveal. I'm trying to think of a number of ways to execute this but I could really do with some help since I'm sure that this is something that has been done a million times before. This is basically what I would be aiming for. Please excuse the extremely enviable msPaint skills


I'm developing this for use in Unity but I'm really new to it and don't really know exactly what's available to me. So if you have something that works specifically for Unity that is fine, but I'm really looking for just some general pointers on how to execute something like this.

Any advice, pointers, links, reference materials are all very much appreciated.
Thanks for taking the time to read my post.

How should I do environment reveal/texture blending?

06 July 2011 - 01:20 PM

At the moment I am trying to research possible ways to go from a solid black screen and then slowly reveal/hide the world to the player. This is not a short fade in at the end of a load but would take place over the length of a "round" which would be anything from 1-20minutes long. It would also need to be quite stylistic, allowing for highly creative reveals. Imagine a model transitioning from a wireframe into a fully textured model, only it doesn't just transition from bottom to top but instead, text is slowly written or paint splatter marks are projected to reveal the texture of the model. I guess it's something along the lines of multi-texture blending similar to what is done with terrain but I'm not positive, maybe masking? Anyway...

At the moment I have 2 or 3 different ideas that are floating around in my head.

1; UV map the environment and have a regular colour texture but also have a greyscale reveal texture (Revealing the colour texture underneath), black areas would be visible immediately and then whiter areas would slowly get revealed as the game progressed. This could allow for all sorts of creative reveals. The problems I currently see with it is that I don't know if there would be discontinuity between different parts of the UV map. Also it mean a full extra texture for each environment, but I think this is reasonable and the bit-depth of the greyscale can be knocked down a little if needs be.

2; If the camera is static, then the reveal could be done in screen space but I think this would not give the most convincing effect overall. It would be good for screen transitions etc that are quick but not for a long reveal. Perspective would be quite hard to deal with. Although I suppose if the camera was static then I could take the first approach to generate the reveal texture and then take a 2D snapshot of the environment with the reveal texture to generate a screen-space reference which should save on memory, but restricts us to a static camera.

3; Do a geometry check for distance/intersection and then manipulate the edges of this using some reference image to match the concept style.

I'm avoiding a straight-up programmatic approach for now as an artistic approach would provide a much better feel.

I'm trying to find material and reference to better illustrate what I'm talking about but I'm having a hard time doing so.
Something like the following but without the bouncing/animated effects, just the spreading; Youtube
Or picture Peter Parker being taken over from Venom, Predator going from visible->invisible, etc.

If you have any references, papers, articles, videos or know the official name of the technique I'm trying to describe that would be great. I hope that I've done a reasonable job describing what I'm trying to achieve so if you have any suggestions then I would be glad to hear them.

How to converse tangential velocity

03 April 2010 - 02:11 AM


I'm trying to write a hair simulation program at the moment and have come stuck on a little math problem that I'm hoping someone can help me out with. I want the strands of hair to "slide" over the head so I think I need to keep any tangental velocity of the strand when it collides with the hair. At the moment I'm just moving the strand out of the collision and zeroing it's velocity as so...

p1 = strand.Links[i].Position; 
//Move link out of head and zero movement.  
p1Dash = p1 + (contactNormal * (contactDepth)); 
strand.Links[i].PhysicsEntity.centerPosition = p1Dash; 
strand.Links[i].PhysicsEntity.linearVelocity = Vector3.Zero; 
strand.Links[i].PhysicsEntity.linearMomentum = Vector3.Zero; 
strand.Links[i].PhysicsEntity.angularVelocity = Vector3.Zero; 
strand.Links[i].PhysicsEntity.angularMomentum = Vector3.Zero; 

I figure I need to conserve the tangental velocity somehow, but I'm not sure how to go about this (how do I find the appropriate tangent, what do I cross etc...)

Here are some diagrams to illustrate the problem.

This picture is what I think I need. I need to send the colliding particle along the collision plane's tangent in order to have it move "around" the object.

These are some picture of what I have at the moment.

In the first slide you can see the bunching of the links as they are just stopped solid.
The second slide shows some progress but this progress is very bumpy as the position of the link is simply pushed out at each frame.
Finally, the 3rd slide shows the end result by just pushing out the links. Not bad, but it doesn't look good in motion.

[Edited by - SmellyIrishMan on April 3, 2010 8:46:00 AM]

Advice request for new project. (Sound input, networking, primitive graphics)

29 August 2007 - 03:39 AM

So I'm considering a new project and would like some advice as to how to approach things. The graphics will likely be very basic, probably some 2D primitive shapes, so I don't require any particularly fancy graphics API. However, the game would be networked and the two players would interact through voice comms. I would like to experiment with the XNA framework, but I'm not entirely sure what it is capable of since it is so new. Would sound input from the microphone be possible in C# using DirectSound, or would that have to be used in C++, does anybody know how sound input works in C#? Java seems like a possibility as the graphics required are nothing beyond simple primitives and 2D sprites, it's networking is quite straight forward and I think it's sound input is also quite friendly, it's not exactly a bustling game format but I guess that doesn't really matter. The last thing I can think of is to go with C++ which I know will be capable of all the things I wish to do, but it gives me so many headaches and I would rather avoid the annoyance of C++ for now and use a more "high-level" language. Any advice?

Float subtraction error.

01 February 2007 - 09:51 AM

Hello, this has really got me in a confused state of affairs and I was hoping that one of you helpful guys might be able to point me in the right direction. I am simply trying to subtract two floating point numbers, and all is going well until I am subtracting (0.101 - 0.001), instead of returning 0.1, it returns 0.0999998. I have this code in the main loop of my program and it works fine.
float testY = 0.101;
float testMove = 0.001;
cout << "testY: " << testY << endl;
cout << "testMove: " << testMove << endl;
cout << "testY - testMove : " << testY-testMove << endl;
testY: 0.101
testMove: 0.001
testY - testMove : 0.1
However, this piece of code in one of my classes breaks at that point.
cout << "\nCurY at start of move: " << curY << endl;
cout << "Moverate: " << MOVERATE << endl;
cout << "CurY - MOVERATE: " << curY-MOVERATE << endl;
curY = curY - MOVERATE;
cout << "CurY at end of move: " << curY << endl;
Which outputs: http://img484.imageshack.us/my.php?image=floaterrorey3.jpg .As you can see, it works fine up until 0.101-0.001 and then continues to work fine afterwards. I am hoping this is something stupid that I can't see, but it is evading me atm.