Jump to content

  • Log In with Google      Sign In   
  • Create Account


angelmu88

Member Since 09 Dec 2011
Offline Last Active Nov 24 2013 11:26 AM
-----

Posts I've Made

In Topic: Rain droplets technique

21 October 2013 - 06:56 AM

Looks somewhat similar to the roughly 10 year old "blood shader" sample from the time when "pixel shader 2.0" was considered the newest coolest thing, except of course raindrops aren't blood, i.e. they're colorless, transparent and refracting, less viscuous. And nowadays, the texture would likely be quite a bit larger (probably screen-sized).

 

Thank you all for your replies. Actually that blood algorithm is better than it seems. If I modify a bit the physics to take not only into account the gravity but also other forces like the wind and I store the resultant force instead of storing only the gravitational force I think I can get something quite good.

 

Thanks, again.


In Topic: Rain droplets technique

21 October 2013 - 04:17 AM

 

All it involves is just texture masking - not expensive at all. You create several textures with semi-transparent water droplets using the alpha channel (this can probably be done in photoshop) then have their vertical texture coordinates change as a variable of time in the shader code.

 

Is it texture masking enough when it comes to simulate the meandering of the drop? I want it to be as realistic as possible so I don't want the drops to go down following a straight path, in this case, the drop would have to follow this pre-baked random path no?

 

 

Also if you look at the first video, see how the drops are affected by the movement of the camera


In Topic: Rain droplets technique

21 October 2013 - 04:16 AM

All it involves is just texture masking - not expensive at all. You create several textures with semi-transparent water droplets using the alpha channel (this can probably be done in photoshop) then have their vertical texture coordinates change as a variable of time in the shader code.

 

Is it texture masking enough when it comes to simulate the meandering of the drop? I want it to be as realistic as possible so I don't want the drops to go down following a straight path, in this case, the drop would have to follow this pre-baked random path no?


In Topic: Billboard problem

30 October 2012 - 10:13 AM

Hi, i am using this method for my billboarding.
But it seems that i can only set my billboards at position(0,0,0)
otherwise it displays incorrcect.

I have tried to translate before and after but nothing works.

How can i set any other position than origin?

this is my method:
[source lang="cpp"]void CreateBillboardMatrix(const D3DXVECTOR3& particlePos, const D3DXVECTOR3& cameraPos, D3DXMATRIX& out) { // compute billboard basis D3DXVECTOR3 look = particlePos; look = look - cameraPos; D3DXVec3Normalize(&look,&look); const D3DXVECTOR3 CAMERA_UP_VECTOR(0, 1, 0); D3DXVECTOR3 camUp = CAMERA_UP_VECTOR; D3DXVec3Normalize(&camUp,&camUp); D3DXVECTOR3 right; D3DXVec3Cross(&right,&camUp,&look); D3DXVec3Normalize(&right,&right); D3DXVECTOR3 up; D3DXVec3Cross(&up,&look,&right); D3DXVec3Normalize(&up,&up); // set matrix values D3DXMatrixIdentity(&out); out._11 = right.x; out._12 = right.y; out._13 = right.z; out._21 = up.x; out._22 = up.y; out._23 = up.z; out._31 = look.x; out._32 = look.y; out._33 = look.z; out._41 = particlePos.x; out._42 = particlePos.y; out._43 = particlePos.z; }[/source]


I see an error in your code, the look vector is CameraPos-billboardPos (not the other way around). Take into acount that if you have two positions A and B the vector B-A is facing B.

In Topic: Changing Screen Resolution and Windowed<->Full Screen Toggle

10 September 2012 - 06:50 AM

I'm glad you solved it.
I'm sorry but I don't know much about using two monitors.

PARTNERS