(Solved) Animated Normals in bge

so i watched a video on how to make an animated normal map for an ocean, and it works when i run the timeline and the object is moving like an ocean like i want it to. The problem is that i can’t figure out how to get it to run in bge. I rendered the animation of the ocean, and then in a new scene/file i added a plane, added a new material, new texture, and in the texture settings i used the image sequence settings, then i have a normal modifier to add it to the object. When i run the bge the plane returns top being flat but in viewport it is rigid like an ocean. what i put the texture setting to single image instead of image sequence it is rigid but now animated. Any help is greatly appreciated

bake the textures all to 1 big atlas,

use object.color in nodes to drive uv in upbge

uv —seperate rgb (r is u and g is v)

add obj color red to u and obj color green to v and use py to set the frame or animate obj color

note uv are in 0-1
if your texture is 2048
u = 1 = 2048
v = 1 = 2048

Animated Ocean Normal Map2.blend (945.6 KB)

I am not really sure how to do that, but here is the .blend file

Is this the sort of outcome you’re looking for? There are a few tutorials on creating animated sprites for BGE including animated water normals.

I’ve got an example for tiled animated water here;
waterplane.blend (512.5 KB)

Hi.
The easiest way to do normalmap animation, is to make an UV animation, using the script.
wave_test01.blend (1.4 MB)
Thank you for attention.

Thanks i will take a look at these and see if i can understand how everything works

i apologize for the delay in response i will reply quicker next time, and if you reply to this then i greatly appreciate your help and patience :smiley:

I am familiar with UV Animation, have not done it before personally, but i did see a YouTube video when i had the idea before, but what i want this time is a rough (don’t exaggerate) sea with waves like a real ocean

i am making a boat game and an example of waves i want could be like the “Sea of Thieves” Game, where the ocean is dynamic, and interacts with players and the boats on it

This guy’s stuff can probably help you;

Martin Upitis

Good luck

Okay thanks i’ll try to find the one that works for bge if there is one

For anyone following this forum hoping find and answer like me. I just found this youtube video
https://www.youtube.com/watch?v=EZWDY3hmpb4

the setup is the following:
Always Sensor *Must have True pulse active
python Module - type: “waves.main”
and i will upload the script to be used.
waves.py (2.1 KB)

nothing pretty but it’s a good start if you manipulate the code right
**Note if your always sensor does not have true pulse the script will not continuously run

1 Like
  • if you create rough (physical) waves, then you must apply the deformation of the grid - in fact, create these waves in the plane. I do not yet know how to do this through Python. There were somewhere like Martins’s shaders of reflection + imitation of soft bodies - there when the cube collides with the surface of the water, a wave effect is created, but I do not have it. There like and copyright, his rights.

Thank you for attention.

1 Like

i know there is a way to do that easily in blender render with dynamic paints, but if you can do that in blender that would be awesome. In fact now that you mentions maybe i could change the point of origin of the wave to be where another object collides with it. Which is what i think you were saying so thank you for that suggestion i will look into it :smiley:

I have a work around to what i wanted to do, being the use of the python script i posted before. But i don’t feel that my question was answered, How can i make an animated normal map? and, How to then use that normal map to make waves like an ocean in BGE?

Try this tutorial. I’ve used it for flowing water simulations and it looks nice.

like this?

you guys must not have seen the post i made earlier

I am familiar with UV Animation, have not done it before personally, but i did see a YouTube video when i had the idea before, but what i want this time is a rough (don’t exaggerate) sea with waves like a real ocean

i am making a boat game and an example of waves i want could be like the “Sea of Thieves” Game, where the ocean is dynamic, and interacts with players and the boats on it

i am looking for genuine waves or a look alike, not an animated uv map, even an animated normal map is different because it modifies the normals of the object which changes the actual geometry/shape of the object and not just the texture

I want i want… look at your own title omg ‘Animated Normals in bge’.
What you are looking for is adjusting vertices, that’s something different.

Then i give you this:

blend in description, don’t whine about us again if you don’t know what to ask. Next time ssearch command: blender ge mesh deform or blender ge real water.

Anyway have fun.

@Cotaks it’s a nice showcase, but that is all it is. i already know that is possibly but i need to know how to actually do it, and in this video the guy imported his script as a module (aka hiding the script), therefore i can not see it, and when grabbing the .blend file from the dropbox in the video description, the script does not work and the python module he is importing has the extension “.pyc” and looks like some sort of hash, therefore i can’t read it

ok @haidme has something interesting here as well (found it trough youtube haha, so tart searching our resource section of the forum i would say): google has enough results to look trough and to pick the one you like to have.

but imagine this one, when your sailing over it, quite intresting

1 Like

Thank you :smile: