[SOLVED] (how to?) cartoony water

How to make cartoony water like in this video:
How to achive the effect when waves hit the shore and the effect when swimming, walking on the water?
And how would you make an ocean like that? Few supersized quads with tiled texture?

Oh and a happy new year (am i the only one here today?)

No each wave appear to be a different object. So create a huge one blue quad. Create models of far waves and make them roam accordingly. Create a splash wave animation and make them hit the shore. You might be able to position them programatically if you figure out terrain/water interaction. As for player swiming again its like a particle system. The spalsh is a particle system so is the trails following, the leading wake of player swimming an object.

Interesting approach. I always did everything in a single shader, with stencil maps, depth maps and ocean maps.

i get this one

what do you mean by far waves?

err, how?

dont get this paragraph too

what are stencil maps for here? and depth maps? And “ocean” map?
head hurts

far waves, look like models:

Splash is just a particle system:

Swim is complex, requires a wake wave leading wave and bunch of Oh’s like waves trailing the swiming object.

Shore is also complicated, But it looks like bunch of animating texture quads, going back and forth. You can probably get infinity complex with this like having the quads connected.

Now thats what I call a reply!
So what I understand so far:

  1. Ocean - huge blue coloured quad.
    Can I use a filled circle attached to camera’s x,y? Like the same way you use skydomes? Might make a horizon illusion

  2. Waves - 3d models rendered in front of the huge quad. Well in the video I didnt see him getting close to those waves, so i guess they are spawned randomly and removed according to the distance from camera/player.
    How about using transparent billboards for these? Since they are far and all…

  3. Splashes from walking - fountain-like particle effect and this splash quad in the end:.

  4. Swimming - “Lead wave”: a quad with animated texture (like this: ) attached to players x,y.
    “Trail waves”: quads that pop up in the players back, dont follow him, after texture animation finishes, they are removed. Texture looks like this:.

  5. Waves hitting shore - this is a hardest one. Now i understand how it technically works but have no idea how to do it… Its basically quads with animated texture (or scrolling texture), intersect with the land geometry a little.
    Image like this:

Ill try to achieve these in panda3d: and post my questions in this topic.
OK , first question: should the shore and wave quads be transparent? Otherwise i might have shading issues…

Wow I think you understand perfectly what needs to be done, but the devil is in the details.

I think you will get far just using the existing textures, but here is some more comments when you get that working (don’t start on the complex stuff until you master the simple stuff):

I think the leading wake wave is a little more complex for when the char moves left or right it changes. Maybe some thing like a Rope class in panda3d? Basically bunch of points move with the player, they are all connected by a wave and each other. When player moves to the right, points on the right bunch up an become more white… While points on the left sort of trail out.

Shore waves, I recommend connecting the waves and maybe giving them some geometry animation too. The texture for the shore hitting wave would have to be much larger so that no repeating artefacts come up.

Thanks 8) now all is left is to code it :frowning: lol
You are right about leaving advanced stuff for later…

Larger? Well from your own drawover it looks like it has to be thinner. Though that texture I made lacks detail and is just wrong.
So back to questions, is it okay to use transparency for these (speed wise)?
And how to make animated textures (im a noob you know). All I found is this: panda3d.org/manual/index.php/A … _Animation but it is different. I would like to somehow play the animation when I want like Actions and find out if animation is running or not (to remove the quad when finished)
This isn’t what I want too: panda3d.org/manual/index.php/P … _AVI_files

Also about particles: found a fountain particle in the samples. Nice. But something just isn’t right with the ParticlePanel: often crashes when clicking a button and the left, right arrows just don’t behave correctly. Or is it just me?

What’s wrong with egg-texture-cards? You should use that for making animated textures.

The manual says exactly how you should use them:

In this example ‘flip’ ends up as a SequenceNode. If you take a look at the new&shiny reference: panda3d.org/reference/python … ceNode.php you’ll see that a SequenceNode inherits from AnimInterface so you can use methods like play(), loop(), pose(), stop(), isPlaying() etc.

One note about the egg-texture-cards util… if you’re using windows you’ll need to type in manually all the names of your files. Wild-cards (*?#) just don’t seem to work.

Error: ‘libpanda.NodePath’ object has no attribute ‘stop’.

You need to call it on the SequenceNode as he said, not on the NodePath.

Hm, okay then…


What does this do?

It finds a NodePath that points to a SequenceNode, then retrieves the SequenceNode from the NodePath by calling node(). So the result of that is your SequenceNode.

Hmm, yeah I got a lot to learn…

I still don’t get this (and the ‘**/+SequenceNode’ thingy). Isnt foo that NodePath itself?

A NodePath is just a handle to a node. The node is what is actually stored within the scene graph, not the NodePath; and the NodePath does not inherit the special properties of the node that it contains. If you want to call any of the special methods on a particular type of node, you have to call them on the node itself, not on the NodePath handle.

If you haven’t seen them already, dotherwise’s pages do a really good job of explaining the difference between a NodePath and its underlying node.


But I didn’t ask that

You’re right; I misunderstood, sorry.

foo is the return value from loader.loadModel(). It is the parent node of a hierarchy of nodes that includes all of the contents of the model, including the SequenceNode. Foo is not itself a SequenceNode; the SequenceNode is one of the nodes deeper within the model.

You can use foo.ls() to list the contents of foo and all of its children. This might make it a little clearer.


The part I don’t understand is in bold:

Do you mean foo NodePath contains other NodePaths, among which also ‘SequenceNode’ nodepath, and the find method retrieves that nodepath from your given string? Maybe its my English, couldn’t understand from that sentence

The Nodes are in a tree.

The root of that tree is foo.

The find() function searches through the tree’s branches (nodes beneath foo) for a Node of type “SequenceNode” (type, because it begins with a “+”, more on that here: panda3d.org/manual/index.php/S … cene_Graph ).

It returns the NodePath pointing at the found SequenceNode. To get the actual node, you put .node at the end.

flip=flip.find(’**/+SequenceNode’).node() turns ‘flip’ into a SequenceNode. There’s some more magic inside and it’s not exactly true that it turns a NodePath into a SequenceNode but it’s a perfectly acceptable lie. Don’t worry if you don’t understand it, you don’t need to.