Search Unity

Projector + Rendertexture??

Discussion in 'Shaders' started by konedj, Apr 30, 2011.

  1. konedj

    konedj

    Joined:
    Dec 7, 2010
    Posts:
    84
    Hi, im trying to make a water trail (it is made by the ship)
    I have attached a projector in one empty gameobject inside and the gameobject is a children of the ship (because the ship is moving all the time, also the projector..)

    Well i don't know how to do the rendertexture thing... and now it is projecting the texture to all the water surface..

    A picture of what i have:


    And this is a draw of what i want (the white thing)
     
  2. konedj

    konedj

    Joined:
    Dec 7, 2010
    Posts:
    84
    nothing?
     
  3. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    you just add a projector, it shouldn't be hard. the main thing you need is a trail texture and then it's a piece of cake.

    if fact i need to do it myself, so if you have a trail texture and post it here, i can post my solution with it :)
     
  4. nekokiller

    nekokiller

    Joined:
    Dec 9, 2010
    Posts:
    12
    I have the some problem, does anyone has solution ?

    How to make "trail texture" ?
     
    Last edited: May 10, 2011
  5. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    A particle system will probably give a better effect than a projector, assuming the sea surface is fairly smooth. Start with the default particle system (menu: GameObject > Create Other > Particle System) and set the Y and Z dimensions of the emitter's ellipsoid to 0. This will make the particles emit from a single line. Now, if you set the tangent velocity's Z component to a small value, you will see the particles slowly drift outward from the line. If you parent this emitter object to the boat and position it at the back, you will get quite a nice spreading foam trail as the boat passes through the water.
     
  6. immFX

    immFX

    Joined:
    Mar 20, 2010
    Posts:
    110
    unfortunately, this doesn't look good at all when there are waves in the ocean shader... So, the projector is the only way to go.

    (but works OK without projector in the Water3 shader)
     
  7. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    @immFX mind sharing your way? texture or particle texture...?
     
  8. immFX

    immFX

    Joined:
    Mar 20, 2010
    Posts:
    110
    I use particle texture but it's still wip. Andeeee's method above is pretty accurate