Home Technical Talk

animated lava

polycounter lvl 14
Offline / Send Message
NAIMA polycounter lvl 14
Hello , Iahve the need to make an animated lava texture and I was wondering how could I do ? I did one by hand bgut I took forever to just make 32 frames and it didnt look that good , I also tried a way to do it in 3dsmax , worked enough well but I dunno how to export as a tiling animated texture , so the problem is how to make it tiled , anyone has any idea or tips on how to make it ?:)

Replies

  • Mark Dygert
    Options
    Offline / Send Message
    The fastest way is to create a procedural lava material, animate its properties so it loops, create a camera set it to orthographic and render out the frames.
  • Eric Chadwick
    Options
    Offline / Send Message
    Usually this isn't done as a sequence of frames, that's too expensive in memory. Most games use multi-texture (layering two or more textures, bottom one shows thru alpha of the top one) or for refraction/heat/watery effects they use dUdV (distort a texture by using another one).
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    The fastest way is to create a procedural lava material, animate its properties so it loops, create a camera set it to orthographic and render out the frames.
    Any tut on how to make that?
  • Eric Chadwick
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14

    Thankyou , the first tut I knew and I followed it , but then I dunno how to make a render out of it so that it just renders the lava animation instead also fo the outside borders , and as for the second two , it dont says what he is using to make , what tools , is still 3dmsax or what is?
  • Eric Chadwick
    Options
    Offline / Send Message
    The bottom two links are tutorials I wrote a long time ago, using the Material Editor in 3dsmax.

    Once you have the map animating the way you like, right-click on the map's main image and choose Render.

    I created this animated fire material a few years ago, all by just messing around with procedural textures in the Material Editor.
    3dsmax_fire.gif

    3dsmax_fire_material.gif
  • Mark Dygert
    Options
    Offline / Send Message
    Yep that's max.

    LavaBubble.gif
    You can also create lava bubbles that pops by creating a hemisphere. Then create a lava texture with a roughed up opacity around the top, animate the UVs so they move vertically and the bubble will pop.
  • Muzzoid
    Options
    Offline / Send Message
    Muzzoid polycounter lvl 10
    Vig that is so freaking cool :O.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    The bottom two links are tutorials I wrote a long time ago, using the Material Editor in 3dsmax.

    Once you have the map animating the way you like, right-click on the map's main image and choose Render.

    I created this animated fire material a few years ago, all by just messing around with procedural textures in the Material Editor.
    3dsmax_fire.gif

    3dsmax_fire_material.gif

    cant find the bottom links :( ...


    Btw I have been doing this :


    make a material gradient ramp , then set up a bit the settings like this
    53932258.jpg

    tough when I render it displays always the background , that I put green behind , but then I need to go into each frame and cut and then make a cut and paste work to make just the texture apply , then also the texture isnt looping well since it has a junmp at the end and it doesnt tile :( .... any more help on how to make a decent tileable and looped texture anim for lava?
  • Mark Dygert
    Options
    Offline / Send Message
    Muzz heh yea so simple but works great in a lot of engines. I also forgot that to grow the bubble you can animate the objects scale. You can also create simple plane that sits under the bubble that animates ripples.

    - Create a camera, set it to orthographic view so you're not getting any perspective or lens distortion.
    - Right click the viewport name, turn on safe frame.
    - Open the Render Setup dialog (9), click the common tab, set the dimensions to that of your final texture size.
    - Now adjust the camera/viewport so it fits your tile perfectly.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    - Create a camera, set it to orthographic view so you're not getting any perspective or lens distortion.
    - Right click the viewport name, turn on safe frame.
    - Open the Render Setup dialog (9), click the common tab, set the dimensions to that of your final texture size.
    - Now adjust the camera/viewport so it fits your tile perfectly.

    cool thanks but how I do now to make the animation tileable if I apply it on sided panels in a game? and how to make it loop without looking it bouncing?
  • Mark Dygert
    Options
    Offline / Send Message
    You should probably go back and follow this to get the effect looping correctly.
    http://www.ericchadwick.com/examples/looping_a_procedural_texture.html

    And then follow this to clean up the edges and corners.
    http://www.ericchadwick.com/examples/tiling_an_animated_texture.html
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    You should probably go back and follow this to get the effect looping correctly.
    http://www.ericchadwick.com/examples/looping_a_procedural_texture.html

    And then follow this to clean up the edges and corners.
    http://www.ericchadwick.com/examples/tiling_an_animated_texture.html


    I didnt understand those much ....

    Here a quote :
    [FONT=Verdana, Arial, Helv]
    1) Use a Mix map. Add a procedural texture to the first slot. Animate the phase from 0 to 1, frames 0 to 30. Name it fubar.

    2) Copy it to the second Mix slot, name it wtf. Change its phase animation so it goes from -1 to 0.

    3) Crossfade wtf overtop fubar, by animating the Mix Amount 100 - 0, frames 0 to 30. Example: Looped (478KB QT).

    Loops ok at this point, but depending on your texture it may lose contrast in the middle during the crossfade.

    4) Add an Output map type on top of the Mix. Animate it on frame 14 to add the contrast back (I used Output Amount = 1.3, RGB Offset = -.1), then animate the ouput back to the default on frame 30. It helps to turn off Show End Result to remove the shading, so you can see what you're doing.

    5) Right click on the sample to render it out, frames 0 to 29 (skip f30 cuz its the same as f0). Example: Corrected constrast (466KB QT).

    Loops better, but this trick really only works with grayscale textures, because Output (or any other Levels-type filter for that matter) tends to mess up colors, over-saturating them.

    The phase-looping idea works with the Noise modifier too. I dunno how you'd fix the dipped contrast in the middle, but it hasn't been all that noticeable when I've done it.

    I'd love to hear other ideas for looping procedurals... this is probably more convoluted than it needs to be.

    Also, anyone have an idea for making an animated texture tile seamlessly? My current method is a bit unweildy.

    ec1icon_at.gifericchadwickicon_dot.gifcom
    [/FONT]
    first of all , is this intended to be in 3dsmax?

    second , I tried to copy drag the material I did in a mix material in the two slots , then I tried to change the phase from 0 to 1 for the first and for the second I couldnt couse it doesnt takes -1 as instead is stated in this tutorial ...

    then how I do crossfade one over the other?[FONT=Verdana, Arial, Helv]
    what means animating the Mix Amount 100 - 0 frames 0 to 30?

    mmm I think I got how but how I do add on top another map ? for the point 4?
    [/FONT]
  • Mark Dygert
    Options
    Offline / Send Message
    Yep 3dsmax.

    After Step 3 if it loops fine don't worry about the contrast correction (step 4). It only works for B/W materials anyway. Which you could do your lava in B/W and add a solid color overlay later I guess...

    To loop the phase:
    - Turn on Auto Key
    - Move the time slider to 30
    - Set the phase to 1 for material 1
    - Set the phase to 0 for material 2
    - Move the time slider back to 0
    - Set the phase to 0 for material 1
    - Set the phase to 0 for material 2
    * Note: You can't set the phase to a negative number in newer versions of 3dsmax, at least not in the material editor, it has to be done in the curve editor.

    - Open the curve editor (Graph Editors > Track View > Curve Editor)
    - Expand Medit Materials > YourLavaMaterial > Maps > Diffuse color: Map#1 > Color2:FUBAR > Click Phase
    - Click the first key, either drag it down to -1 or type -1 into the bottom type-in bar.

    Animate the mix:
    - Assuming Auto Key is still on.
    - Set the time slider to 0 and set the mix to 0.
    - Move the time slider to 30 and set the mix to 100.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    After Step 3 if it loops fine don't worry about the contrast correction (step 4). It only works for B/W materials anyway. Which you could do your lava in B/W and add a solid color overlay later I guess...
    but is not accepting the -1 for the second phase ....
  • Mark Dygert
    Options
    Offline / Send Message
    NAIMA wrote: »
    but is not accepting the -1 for the second phase ....
    Yea I updated my post on how to work around that, I forgot that the material editor doesn't allow negative phase numbers. You have to do that in the curve editor, see above for steps.

    I think the version Eric did that tutorial in was Max 3 maybe 4. So a few specific things have changed but the overall theory is correct and works.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    Yep 3dsmax.

    After Step 3 if it loops fine don't worry about the contrast correction (step 4). It only works for B/W materials anyway. Which you could do your lava in B/W and add a solid color overlay later I guess...

    To loop the phase:
    - Turn on Auto Key
    - Move the time slider to 30
    - Set the phase to 1 for material 1
    - Set the phase to 0 for material 2
    - Move the time slider back to 0
    - Set the phase to 0 for material 1
    - Set the phase to 0 for material 2
    * Note: You can't set the phase to a negative number in newer versions of 3dsmax, at least not in the material editor, it has to be done in the curve editor.

    - Open the curve editor (Graph Editors > Track View > Curve Editor)
    - Expand Medit Materials > YourLavaMaterial > Maps > Diffuse color: Map#1 > Color2:FUBAR > Click Phase
    - Click the first key, either drag it down to -1 or type -1 into the bottom type-in bar.

    Animate the mix:
    - Assuming Auto Key is still on.
    - Set the time slider to 0 and set the mix to 0.
    - Move the time slider to 30 and set the mix to 100.
    I cant find the phase you are referring to , also I guess you meant the second gradient map named WTF instead of the fubar no?

    I see severall subcategories right after the fubar but no phase only if I open other subcategories I see phase but I am not sure if its this I had to expand and where to click ....

    63489327.jpg


    I tired so to change the parameter's phase at .-1 in frame 0 and 0 to the final , but it reverted to 0 for all frames and if I placed -1 at beginning it set like so for all frames....
  • Mark Dygert
    Options
    Offline / Send Message
    That's the right phase (the one highlighted in parameters) just in a different spot than I said because its a different material type.

    Make sure you didn't animate the phase in "noise". If noise is turned off that phase track won't show animation. You have a few tracks selected so it might be hard to edit the right curve. Make sure you click on just phase. If it doesn't show animation check that you animated the right phase in the material editor.

    Using gradient ramps it should like this:
    LavaCurveEditorPhases.jpg
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Ok I did like so for the WTF second material and I set to -1 tough the outputted movie render it didnt loop and actually it interpones a black screen between the end and the rebeginning of it :( ....

    u think u can make a fast version that I could see ? I use max 2009 ...
  • Mark Dygert
    Options
    Offline / Send Message
    I suspect its because there are other elements that are animated and you've looped only one of the elements "phase". The other elements need to be looped also. Plus I'm not sure why you're using gradient ramps? Send me what you have vig_ at hotmail dot com and I'll see what I can do on my lunch, gotta get back to work tho...
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    I suspect its because there are other elements that are animated and you've looped only one of the elements "phase". The other elements need to be looped also. Plus I'm not sure why you're using gradient ramps? Send me what you have vig_ at hotmail dot com and I'll see what I can do on my lunch, gotta get back to work tho...
    Hello I sent the file to vigville mail the one u have in ur profile since the one u wrote didnt work , hope is ok ... thanks for u helping me :)
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Did u get my mail?
  • Mark Dygert
    Options
    Offline / Send Message
    Nope, not even in the junk mail folder.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Vig wrote: »
    Nope, not even in the junk mail folder.
    mmm
    K I sent u in pm a link for it ....
Sign In or Register to comment.