User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 24

Thread: make swaying grass from a single image?

  1. #11
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Might sound like a stupid question, but how do i change the effects paramiters on the fly to create movement (ripples or waves)? I've tried set effect paramater> "Amplitude Y" and so on but it seems to have no effect.

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Location
    St. Ave France
    Posts
    1,166
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Also... when you say change one letter...where do you mean? Do you mean alther an actual text file to basically create a horizontal version or am I missing something in a paramiter which seem to be only number related?

  3. #13
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: make swaying grass from a single image?

    HolyMonkey I mean the source code of the effect. :P You'd need to change Y to X somewhere... but forget about this. Just use the Under water shader!
    Anyway, here's what you do: Open the effects dialog (Where you choose the effect, click on the one you want, and then, in that info box on the bottom of the dialogue, there's a list of parameters (fX,fY,fAmplitude....), you need to figure out which variable belongs to which parameter.

  4. #14
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    wait wrong topic

  5. #15
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    I would personally not involve bending the object or using pixel shaders. I usually don't go for the fancy solutions.

    I'd solve it like this, it's a simple rotation.

  6. #16
    Clicker Multimedia Fusion 2
    BrandonC's Avatar
    Join Date
    Jun 2006
    Location
    PA, USA
    Posts
    931
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Pixel shaders are simpler and more resource friendly then a simple rotation, unless your rotation is an animation.

  7. #17
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Okey, I've benchmarked it.

    Graphics card: ATI Mobility Radeon X1350

    Test 1:
    2000 Objects
    Object size: 32x32
    Pixel shader: None
    Rotation: None
    Average framerate: 260fps

    Test 2:
    2000 Objects
    Object size: 32x32
    Pixel shader: None
    Rotation: Continuous rotation of all objects, each object has a different angle.
    Average frame rate: 175fps

    [color:#FF0000]Note: From the process viewer, the framerate seems to be capped by the CPU, not by the graphics card, it takes a lot of processing power for MMF2 to evaluate the rotation expression 2000 times, and apply it to the object angles. This suggests that I'm still not hitting the GPU limitation.[/color]

    Test 3:
    250 Objects
    Object size: 32x32
    Pixel Shader: Blend Shader Example
    Rotation: None
    Average frame rate: 9fps

    Conclusion:
    A rotation is at least 160 times more resource efficient than a very basic pixel shader.

    Now, I had more or less expected this result. If you think about it, in MMF2 HWA, each object is afaik a polygon with a texture applied to it. In a real 3D game, it's extremely rare to see a polygon head-on with no rotation, they're almost always seen from some kind of perspective, so graphics cards are logically built to handle this very quickly.

  8. #18
    Clicker Multimedia Fusion 2
    BrandonC's Avatar
    Join Date
    Jun 2006
    Location
    PA, USA
    Posts
    931
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Aren't graphic cards built to handle pixel shaders quickly too? Also, how did you manage to get only an average framerate of 9fps with pixel shaders on 250 objects? I haven't experimented with this yet, but that seems unusually slow to be honest.

  9. #19
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Ouch! My mistake, I had used the blend coefficient, it was causing the slowdown. I get a lot faster speeds when I assign pixel shaders, without using that, but the average is 25fps for 2000 objects that doesn't move (I tested the monochrome shader this time) compared with the 175fps that I got with rotations (which was capped by the CPU and not GPU due to the MMF2 events, so we know the GPU could handle more).

    HWA is optimized to handle pixel shaders nicely but if you think about, in a 3D landscape, far from every polygon has a pixel shader assigned to it, but every single textured polygon is seen from a perspective and a 3D game today can have ten thousands of those visible on the screen at the same time (probably even a lot more) so it's very logical that displaying a polygon with a different rotation or from a different perspective must be a lot faster.

  10. #20
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: make swaying grass from a single image?

    Good solution, Nifflas! Thanks for sharing!

Page 2 of 3 FirstFirst 1 2 3 LastLast

Similar Threads

  1. Image annotation / Image modification with MMF2
    By titobal in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th September 2013, 04:13 PM
  2. Dat Grass!
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 8th September 2012, 07:56 AM
  3. How would you make a composite image in MMF2?
    By Watermelon786 in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 22nd March 2009, 09:27 AM
  4. Swaying Grass
    By izac in forum File Archive
    Replies: 9
    Last Post: 17th January 2009, 03:26 AM
  5. Plant swaying motion, Grass moving
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th September 2008, 09:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •