Home Technical Talk

3dsmax + dreamscape + bake texture loop

polycounter lvl 14
Offline / Send Message
NAIMA polycounter lvl 14
Hello I wanted to ask if is possible with the plugin dreamscape to bake a looped tiling texture of sea animation to create a set of sequenced images to use for a looping animation that is tiling and looping ....if so any idea where I can check to see tutorials etc?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I did this a while back, it ended up looking great.

    http://ericchadwick.com/examples/movies/dreamscape_waterbump.mov
    http://ericchadwick.com/examples/movies/waterbump_128x128_60frames.MOV

    All I had to do was position an ortho camera at just the right distance. Had to tweak the position a lot, until the tile was perfectly captured.

    Biggest problem is it has to be repeated like crazy to make a whole ocean surface, which causes the repetition artifacts to become really obvious. I solved this by blending it with itself, with the 2nd map rotated at a different angle (and different start frame),. I used a noise-pattern blend mask.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Oh , any tips on how to put the camera and how to capture the frames? I also noticed , dunno if I did something wrong that despite selecting loop animation there is a jump in the animation from the end to the begin .... also when I try to render the whole scene is flat and blue looking I guess I am doing something wrong but the only tutorial I found comprsed of sky , clouds etc and I just wanted tomake sea tiles ... and yes I noticed a lot of tile repetitions in the overall mesh animation etc , is there any other way to avoid or programs that do not create those obvious so visible tiles? And how to do for examle if I want to make a river , a pool or the like is this plugin still the one sugested?
  • Eric Chadwick
    Options
    Offline / Send Message
    NAIMA wrote: »
    despite selecting loop animation there is a jump in the animation from the end to the begin

    It's been a loooong time since I used Dreamscape. I only recall carefully adjusting my rendered frame range to match the wave frequency. It does loop perfectly. Most video players do not play looping videos perfectly, they add a pause. Quicktime is the best at this I think.
    NAIMA wrote: »
    when I try to render the whole scene is flat and blue looking
    For the height map render, I applied a sideways UV and used a black-white gradient map. To do a normal map, there are several ways to map it.
    http://wiki.polycount.com/NormalMap#Baking_Transparency
    NAIMA wrote: »
    I noticed a lot of tile repetitions in the overall mesh animation etc , is there any other way to avoid or programs that do not create those obvious so visible tiles? And how to do for examle if I want to make a river , a pool or the like is this plugin still the one sugested?
    Better not to use a looping animated texture for water. It wastes a lot of memory, and it repeats too much. I solved the repetition problem by using a carefully-adjusted blend mask, some screenshots here
    http://ericchadwick.com/img/gmts_landscape.html

    One popular method for water is to use a shader that blends two copies of the same single normal map, each scrolling in different directions. When it's done right it creates a "moire" kind of effect, which makes it look like more motion than it really is. For example...
    http://www.chrisalbeluhn.com/UT3_Water_Reflection_Tutorial.html
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    What I wanted to do is to bake out a set of frames images like 24 or 32 that I can then animate in a game engine using it only so as a animated texture slideshow that gives the illusion of waves ... is possible todo that? how can I bake out the images?

    Also the step is in the 3dsmax not really in the player as I didnt render out it yet .....

    also are there other better tools or plugins for doing that ?

    for example if I make a waterfall of lava and I want to bake the animation of it so that looks pulsing and slowly slimey flowing along a mesh , apart that I can make it scroll along it in the game engine but I cant animate the pusling or other animation effect , same if it was water or any other fluid , so my idea was to create trick illusions in the engine to play animation effects that would require hoard of resources to be done in real time ....
  • Eric Chadwick
    Options
    Offline / Send Message
    NAIMA wrote: »
    What I wanted to do is to bake out a set of frames images like 24 or 32 that I can then animate in a game engine using it only so as a animated texture slideshow that gives the illusion of waves ... is possible todo that? how can I bake out the images?
    Yes it is possible. This is what I did in my example. I rendered a top view of the waves mesh, using a camera set to Orthographic. I think the wave "period" (the time where it loops) is set in the Dreamscape controls, but I don't remember exactly where.
    NAIMA wrote: »
    Also the step is in the 3dsmax not really in the player as I didnt render out it yet .....
    Max can usually preview a loop without a pause. Maybe you need to make the time segment shorter or longer.
    NAIMA wrote: »
    also are there other better tools or plugins for doing that ?
    for example if I make a waterfall of lava and I want to bake the animation of it so that looks pulsing and slowly slimey flowing along a mesh , apart that I can make it scroll along it in the game engine but I cant animate the pusling or other animation effect , same if it was water or any other fluid , so my idea was to create trick illusions in the engine to play animation effects that would require hoard of resources to be done in real time ....
    The best tool for this is to use a shader that brightens/darkens/fades textures, like in the last link I sent.

    Particle emitters also help with making animated FX (waterfalls, sparks, etc).

    Animated textures are generally bad, unless they are very small and packed in a sprite sheet. A sprite sheet helps to increase the framerate, because the game doesn't have to keep loading and unloading individual texture files, instead it can load just one texture and re-use it.

    What a sprite sheet looks like:
    file.php?id=7843&sid=cf874005740a0e3f462fb5822c6555ae

    But still, it is generally better to use a shader that blends single textures together... because then you are not limited to one loop at one speed and one pattern... the blending and scrolling and moire create many more variations.
  • Eric Chadwick
    Options
    Offline / Send Message
    Here's an example of a blending/scrolling shader...
    [ame]http://www.youtube.com/watch?v=rdWrWfL5E4c[/ame]
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    but how you do bake texture animation?
  • Eric Chadwick
    Options
    Offline / Send Message
    In the Render To Texture window, in the General Settings rollout, push the Setup button, change the output to a Range (instead of Single), close, and Render from RTT.

    But for my animated map, I didn't use RTT, I rendered straight from the camera. Either way works.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    thanks , dreamscape can do only ocean waves or also pool water animations or the like?
  • Eric Chadwick
    Options
    Offline / Send Message
    I don't know, depends on what effect you want.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Oh I wanted to make severall different water types like pool , still water, caustics , shoreline , ocean etc...
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Ok I was trying to make this thing ; I set up the sea portion to 4 m x 4 m , created a camera and put on top of it but id doesn't grab the square of the repetition , plus the animation messes the borders of the sea surface square .... how I am supposed to do to capture precisely the sides in order to get tileable frames?
  • Eric Chadwick
    Options
    Offline / Send Message
    Set the camera to Orthographic mode. This removes perspective distortion.

    Set the render size to 128x128 (or whatever size you want the tile to be). Turn on the Safe Frame preview in the viewport. This shows you the render border.

    Adjust the camera FOV and position. This is the most difficult part... you need to find where the edges of the water tile, and adjust your camera edges to match. This will require very careful tweaking, probably by adjusting to the 100th decimal place. It is not easy... but I have proof it can be done!

    For caustics, look at this tool:
    http://www.dualheights.se/caustics/
  • Eric Chadwick
    Options
    Offline / Send Message
    btw, I think the Crysis engine only allows one Ocean in your level... I have heard you cannot use it with different heights/settings in the same level. So you cannot have a pool or lake, inland from the ocean. But I might be wrong.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Here is how I set it up , Camera height 4 m ,safe frame , 128 x128 tile res , 256 x 256 dimension of the mesh , ortographic projection ....


    Tough when I animate those holes come out , how cna I avoid this?

    seaur.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    Looks like about four tiles there. Move your camera, and change the FOV, so your safe frame matches this green box...

    naima_dreamscape_help.jpg
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Would it be possible to create a 2 or 3 different waves animations that tile with each other so to flank different animated texturesliders that share the same sides? In order to breack the pattern repetition or is there a better way to do this?
  • Eric Chadwick
    Options
    Offline / Send Message
    NAIMA wrote: »
    ... is there a better way to do this?
    A blending/scrolling shader is better than an animated texture.
Sign In or Register to comment.