ivan.cuevas Posted January 30, 2013 Share Posted January 30, 2013 I want to use a particle system to represent a ship trail, but, as you can see in the attached screenshot, the trail disappears beneath the waves when the sea is not flat. To have the possibility to project particles on the water object would be perfect (as suggestion), but I'll be happy if there is any way render particles over the water object (but not over other elements) Link to comment
nat.harrold Posted January 30, 2013 Share Posted January 30, 2013 We have the same problem, though for us it is more noticeable as our wave heights need to be higher. It is on our list of problems to deal with, so any help here would be appreciated also. I would guess that we would need to make an expression that altered the height of the 'flat' particles and modified their z height (with a small offset) for their lifetime. Ivan, are you using 'ROUTE' or 'FLAT' particle type? Link to comment
ivan.cuevas Posted January 30, 2013 Author Share Posted January 30, 2013 I was thinking more in some material set up to render above waves material. At the beggining it was FLAT, but thanks your post I used ROUTE particle type ;) Link to comment
ulf.schroeter Posted January 30, 2013 Share Posted January 30, 2013 The key problem is: particles are not decals, so they will never align smoothly with the wave surface. Even standard decals would not solve the problem as the decal mesh geometry would have to be dynamically adopted each frame according to the wave motion. Therefore for realistic foam trail decals on a water surface with 'real' waves some specialized decal approach/object will be required. We realized these effects in a different engine via per-frame pre-rendering of all foam decals to a texture which then was projected per-pixel onto the water surface itself within the water mesh fragment-shader. Link to comment
nat.harrold Posted January 31, 2013 Share Posted January 31, 2013 Thanks for the insightful, more correct and clever suggestion Ulf. Though 'pretty', Unigine's water has many flaws and is too limited at the moment to warrant an investment just for the ship trails. We have many work arounds to make anything go with waves at the moment, so we would be ok with one more dodgey solution to 'fake' the ship trails. Is there a way to affect the spawned particles like we do the nodes? Node node = getNode(); Node parent = engine.world.getNode(2058937570); if(parent != 0 && parent.getType() == NODE_OBJECT_WATER) { ObjectWater water = class_cast(parent.getTypeName(),parent); forloop(int i = 0; node.getNumChilds()) { Node child = node.getChild(i); vec3 p = child.getWorldPosition(); p.z -= water.getHeight(p); child.setWorldPosition(p); } } We can get/set the normal from the wave and set a small offest as well. Link to comment
ulf.schroeter Posted January 31, 2013 Share Posted January 31, 2013 Don't think so. No direct access to particles and also you will have artifacts when they grow in size due to their planar nature. In UNIGINE OilRush the particle foam effects work as they use a flat ocean without big waves.For realistic foam trails on wavy ocean surface I am quite sure that you need a specialized solution from UNIGINE crew as described above.Maybe frustum has an idea how to solve this ? Link to comment
manguste Posted February 22, 2013 Share Posted February 22, 2013 Sorry, right now we cannot offer such solution out of the box. Though there are no stoppers from the technology point of view. You need to sync particles with sinusoidal movement of waves via shaders. Link to comment
nat.harrold Posted February 22, 2013 Share Posted February 22, 2013 Thanks manguste... Shaders are where I take my bat and ball and head home. Best left to the maths magicians and their respectable witchcraft.. (My brain leaks a little out my ears when I read shaders... Or is that vegetative dribble..? I can however, open boxes. ;)) +1 for this sometime in the future.. Link to comment
manguste Posted February 26, 2013 Share Posted February 26, 2013 Nat, Ookie-dookie, will take that request into account if there's suddenly (and not likely, sorry) a gap in our development plan :) Let thou master box opening in the meantime and rock the world by thine art! Link to comment
Recommended Posts