Forum

This forum is for swapping tips or ideas with fellow users, suggesting new features, or showing of what you have created with the system etc, there is no guarantee of an answer to questions posted in the forum. All support questions must be submitted via the Support ticket system

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Dynamic Ripple Modifier
sloopidoop-
i
Newbie
Posts: 6
Permalink
Post Dynamic Ripple Modifier
on: May 8, 2012, 22:09
Quote

Hi Cris,
at last I got time to play with mega-fiers πŸ™‚
I saw the dynamic ripple video and thought i could make this with the latest version of MF (1.90) but I got problems.
i have a plane-mesh and added the Dynamic Ripple component(no further change to the component). When I run the scene I got an IndexOutofRangeException at the splashAtPoint Method.
Do I have something to consider when I use this component?
Or is it just a beta feature and not ready at this time?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Dynamic Ripple Modifier
on: May 8, 2012, 23:00
Quote

Hi There
The modifier is still in Beta so has some rough edges at the moment. I hope to do a video showing how to use it soon.

Firstly you will need to use a mesh with more points on it than the Unity plane so just make one in a 3d package with say 128 by 128 vertices. Then bring that into Unity, add the Modify Object component then add the Dynamic Ripple, set the Columns and Rows to 128 and then hit the 'Reset Physics' button, you may need to change the axis depending on your 3d package and what up is. Then you should have a working ripple.
Chris

sloopidoop-
i
Newbie
Posts: 6
Permalink
Post Re: Dynamic Ripple Modifier
on: May 9, 2012, 00:11
Quote

Many thanks for your quick reply!
I try it out tomorow. (It's 2.00 AM and my head is empty πŸ˜‰

sloopidoop-
i
Newbie
Posts: 6
Permalink
Post Re: Dynamic Ripple Modifier
on: May 9, 2012, 11:37
Quote

Yeah, it worked. πŸ™‚
But I had to make a little change in the checkInput() method as my rows where fliped (row = (1.0f - hits[i].textureCoord.y)*(rows-1).
Looks great.
Which shader did you use in your pool video for the transparent water?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Dynamic Ripple Modifier
on: May 9, 2012, 11:45
Quote

Good πŸ™‚ Yeah I will sort out that little issue in an update. The shader is from the excellent Hard Surface Shaders package on the Asset Store

sloopidoop-
i
Newbie
Posts: 6
Permalink
Post Re: Dynamic Ripple Modifier
on: May 9, 2012, 13:10
Quote

Quote from spookycat on May 9, 2012, 11:45
The shader is from the excellent Hard Surface Shaders package on the Asset Store

YES! Hard Surface Shader rule. (Fortunately i bought them πŸ˜€ )

magicUnity
Newbie
Posts: 1
Permalink
Post Re: Dynamic Ripple Modifier
on: June 12, 2012, 10:11
Quote

can you make a video how to do it? thanks

spookycat
Administrator
Posts: 148
Permalink
Post Re: Dynamic Ripple Modifier
on: June 12, 2012, 11:56
Quote

I will do a video in the next couple of days, just putting the finishing touches to the first release of MegaShapes then I will do a full tutorial on how the swimming pool scene was built.

bodyprint
Newbie
Posts: 4
Permalink
Post Re: Dynamic Ripple Modifier
on: June 27, 2012, 13:08
Quote

Hi Chris,

Can I get you to make a couple of small changes to this Modifier and the BouyancyNew script to allow for varying water heights (non zero y axis). I'm making a game and decided to use this but I wanted a rising water level...

I played around and got it working using the following changes...

In MegaDynamicRipple.cs I made the following change to apply the Force at the correct height...

public void ForceAt(float x, float y, float force)
	{
		Vector3 lpos = Vector3.zero;
		lpos.x = x;
		lpos.z = y;
		lpos.y = transform.position.y;

And in BouyancyNew.cs I made the following change to return the correct height from dynamicwater...

private float GetWaterLevel(float x, float z)
	{
		if ( dynamicwater )
		{
			Vector3 lpos = Vector3.zero;
			lpos.x = x;
			lpos.z = z;

			return dynamicwater.GetWaterHeight(water.transform.worldToLocalMatrix.MultiplyPoint(lpos)) + dynamicwater.transform.position.y;
		}
		//		return ocean == null ? 0.0f : ocean.GetWaterHeightAtLocation(x, z);
		return 0.0f;
	}

This is obviously a hack and may break things that I'm not taking into consideration πŸ™‚ , but if you could implement this it would be great.

Cheers, Phil.

[EDIT] 1. I notice that the ripples aren't applying any changes back to the buoyant object when it's not at zero height :/

[EDIT] 2. The ripple effect from a buoyant object also shows up at the wrong spot when the z axis is changed.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.032 seconds.