x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Matching Gerstner Waves From GPU with BP

Keeping this short since its failed to post twice now.

Trying to fake bouyancy with my Gerstner Waves. Generating world displacement with tesselation in the material and trying to match the waves using a blueprint to sample the Z at world position of a point to compare height to wave. I am getting weird results though feeding the same inputs, namely the range of movement is correct but the speed at which its moving is completely out of sync with the waves coming from the GPU. Attempting to do this without render targets and just do a couple discreet samples of position instead of flushing and rebuilding a buffer every tick and across pretty vast areas.

Attached are the BP function and the Material Function.

alt text

alt text

Product Version: UE 4.16
Tags:
more ▼

asked Jun 17 '17 at 06:26 AM in Blueprint Scripting

avatar image

DeadlyMidnight
21 2 3 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Turns out that when running the gerstner function in the real world you need to divide the Wavelength by 2*Pi and then its perfectly in sync. Then to get the correct point for my box im doing two samples of the gerstner function, once to find the offset of where the box's coodinate was moved to in the function, then subtracting that from the box's position and sampling again. Its not quite right but it looks better. Need to figure out the math to find a point in the wave vs double sampling which is a hack. But this specific question is solved.

https://youtu.be/ZZ0o5vz2BSg

more ▼

answered Jun 17 '17 at 08:09 PM

avatar image

DeadlyMidnight
21 2 3 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Without looking in-depth, I'd guess that first thing worth checking is differences in time inputs.

more ▼

answered Jun 17 '17 at 03:27 PM

avatar image

Deathrey
7.9k 130 31 293

avatar image DeadlyMidnight Jun 17 '17 at 04:52 PM

I have done both internal time and fed the material game time on tick via dynamic material instancing so they should be on the same clock (or offset very slightly deppending on gpu vs blueprint execution)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question