Flowing water - Animated Displacement Maps?

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Flowing water - Animated Displacement Maps? // Tech Forum

1  |  

Post by watupbrudda // May 5, 2009, 6:05am

watupbrudda
Total Posts: 25
Hey,


I'm making a cutscene intro for a game, involving a castle, and would like to have a river flowing in the scene. I understand this affect can be achieved via an animated displacement map? Could someone please explain to me how to do this? Or any other effective ways of making animated water?


Cheers


Matt

Post by frootee // May 5, 2009, 11:49am

frootee
Total Posts: 2667
pic
The shader which Noko made may be of help:


http://forums1.caligari.com/truespace/showpost.php?p=89153&postcount=9


ivampretti was working with real time fluid sim stuff as well:

http://forums1.caligari.com/truespace/showthread.php?t=7018&highlight=ivampretti


http://forums1.caligari.com/truespace/showthread.php?t=6847&highlight=ivampretti


I wrote a Blender fluid sim importer plugin for Workspace:


http://forums1.caligari.com/truespace/showthread.php?t=7504


http://forums1.caligari.com/truespace/showthread.php?t=7817


http://forums1.caligari.com/truespace/showthread.php?t=7559

Post by noko // May 5, 2009, 11:11pm

noko
Total Posts: 684
Since a cutscene, are you going to render using Off-line renderer or do you want a real time solution?

Post by watupbrudda // May 7, 2009, 8:19am

watupbrudda
Total Posts: 25
Lol - to be honest noko i don't actually know what the difference is?

Post by Jack Edwards // May 7, 2009, 10:22am

Jack Edwards
Total Posts: 4062
pic
Basically are you planing to render with Lightworks, VRay, YafaRay, or some other external render engine, or do you intend to use the "render to file" feature which is basically a screen grab or the realtime display minus UI elements. ;)

The render to file approach does have the advantage of being able to render out HD resolution animations in a matter of minutes. :D

Post by fahembree // May 7, 2009, 11:19am

fahembree
Total Posts: 123
pic
Check post at:

Http://forums1.caligari.com/truespace/showthread.php?t=7233


I saw this a few weeks ago, Might be of use.;)

Post by noko // May 7, 2009, 8:17pm

noko
Total Posts: 684
Yes, how you want or what you will be using to render the final images makes a difference. For lightworks one uses a series of bumpmaps in the material with reflection and refraction settings, normal maps are also possible. With lightworks one can use a video file which I've done with actual water and used it as a bumpmap. Turns out good from my experience.


For real time or off line water animation or simulation Frootee fluid sim plugin would be most accurate in duplicating water characteristics.


Now for game like water, not as realistic in behavior compared to Frootee fluid sim plugin, I've done some DX9 shaders that work in real time. One is limited to 7.61 which isn't released yet while the other will work in 7.6 but is not really finished but that is by my standard, it is fully functional otherwise. The tS-E shader found in the Material - DX9 can do water falls, rain, fountains and alot of other special effects.


The displacement map example listed below is also very cool so another option as well.


So need more input from you in order to hopefully get you what you need.

Post by mrbones // May 7, 2009, 8:42pm

mrbones
Total Posts: 1280
pic
Just the ebb and flow of a simple uv scale adjustment can do water wonders

Post by watupbrudda // May 8, 2009, 9:02am

watupbrudda
Total Posts: 25
I guess since i don't possess Vray or Yafaray then I will be using lightworks. I need it to be animated to i guess render to file won't do.

Post by Jack Edwards // May 8, 2009, 10:00am

Jack Edwards
Total Posts: 4062
pic
YafaRay is free. You just need to download it. ;)

The YafaRay4tS add-on is available from the link in my signature. The YafaRay render engine is available from: YafaRay.org
I haven't added the animation support yet, but it should be available by the time you're ready to render out your work. I can post development versions to the YafaRay4ts.org forums. So if someone needs animation support immediately for a project, let me know.

The DX "render to file" does support animation. In fact it's an awesome way to render animations because you render HD resolution animations out VERY quickly: 0.5 seconds per frame! :D It's an awesome tool for prototyping your animation before spending days/weeks waiting for a more traditional animation to be rendered frame by frame via YafaRay or VRay.

Post by watupbrudda // May 8, 2009, 11:48am

watupbrudda
Total Posts: 25
Ahhh - thanks for that Jack. Thanks to everyone for their help with this - and my apologies for being so unknowelegable. I will keep you all updated on progress, and possibly start a WIP thread for it.

Post by Jack Edwards // May 8, 2009, 1:12pm

Jack Edwards
Total Posts: 4062
pic
You're certainly welcome! :D

Post by noko // May 10, 2009, 3:36am

noko
Total Posts: 684
Ahhh - thanks for that Jack. Thanks to everyone for their help with this - and my apologies for being so unknowelegable. I will keep you all updated on progress, and possibly start a WIP thread for it.


Very good question plus anyone who searches will find :). Maybe here is good place to do some real time water effects using pixel shaders plus explore the strengths of tS Link Editor which is simplier I believe then what most folks think. tS brings to the user a level of power, control or choice and freedom that is not present in almost in any other software except maybe Ice in XSI.

Post by watupbrudda // May 11, 2009, 7:43am

watupbrudda
Total Posts: 25
OK, so i got my water working. It's an animated displacement map that takes a displacement map and offsets it a little every frame, using a timer event. (THanks to the person on this forum that made it)


I want to export a little animation using offline renderer to see what it looks like, but my water only animates when i click "Active" in the timer event box. So, what i'm essentially asking here is how do i tell the animation to export with "active" clicked, and how do I use the offline renderer?


THanks very much for all your help. WHen i get it exported I'll post a little video here.


Cheers


Watup

Post by Jack Edwards // May 11, 2009, 7:50am

Jack Edwards
Total Posts: 4062
pic
You need to keyframe the turning on and off. I'm not sure if you can keyframe checkboxes. :confused:

Maybe noko can answer that one? I've got some alternate ideas if that doesn't work. ;)

Edit: actually that wouldn't work since the frame rate would be relative to the system time instead of the animation time. You'd need to replace the timer part with a keyframed value so that the animation updates relative to the current time in the animation.

Post by watupbrudda // May 11, 2009, 7:56am

watupbrudda
Total Posts: 25
Ahh - I understand what you mean for me to do, but I'm not sure how?

Post by noko // May 11, 2009, 8:06am

noko
Total Posts: 684
Actually converting timer Time output into keyframes that will match the timer is easier then it looks. The Time output (not the frame output) of timer is always in seconds and the period (which are in milliseconds) only changes how often the Time output is updated.


To get the same effect or rate of animation which you see with Timer Time output you can do this:


Disconnect timer from your object input

Go to frame 0 in animation editor

Input value of 0 into the input for your object and keyframe it. You may have to edit the panel so you have an input box where you can enter this

Go to your last frame of your animation sequence

Take the number of frames from your start to final animation using your water animation and then divide by your final frames per second

For example: if you have 300 frames of water animation and your frames per second is 30, 300/30 which then you would enter 10 and keyframe it

For 24FPS you would take 300/24 for your final frame

This will give you the save animation rate as want you saw in real time



Hope this helps, just remember you will need to set your input parameter for your water animation to be able to be keyframed, do this by rightclicking on the record button in animation editor while that object is selected and then selecting the input parameter to be keyframed. I can do video of this which may make it clearer for you and help others out as well.


I have to go to work so if you need me to make video let me know here and I can do one tonight.

Post by watupbrudda // May 11, 2009, 11:32am

watupbrudda
Total Posts: 25
Hey - thanks for this Noko. A video would be very helpful if you have the time :)


Thanks


Watup

Post by noko // May 11, 2009, 2:39pm

noko
Total Posts: 684
Should be able to do when I get home tonight, I'll make it short and sweet.

Post by noko // May 11, 2009, 9:40pm

noko
Total Posts: 684
Here is video, hehe no rehersals and off the cuff so to speak ;). So kinda rough but hopefully helpful. Anyways it shows a precedural animation being runned by a Timer which then is keyframed with same results as the timer. Now this technique shown is not limited to just the DX shader used (tSpecial-E) but any procedural animation that uses a timer can be keyframed, even scripted ones.


So please ask any questions that you need answered, anyone.

Post by Wigand // May 12, 2009, 6:50am

Wigand
Total Posts: 462
pic
Your video is really helpful:banana:

please let it move to the tutorial section. :)

Post by watupbrudda // May 12, 2009, 7:21am

watupbrudda
Total Posts: 25
Thanks very much for this video. Only just got round to watching it and have sorted out my animation now. Was very helpful! :) Only thing is I don't know how to use the render to file thing to export an animation. The only options i get are to export it as images (jpeg/bitmap/etc.) How do I export as a movie?


Cheers


Watup

Post by noko // May 12, 2009, 7:37am

noko
Total Posts: 684
Glad video was useful and thanks. If you are using the Real Time or DX renderer then rendering to frames is the only option. After frames are rendered then you can compile animation in outside program which I use Movie Edit Pro.


Now if you are using lightworks on the model side to render then you can render to an animation format.


With scene open in Workspace, go to modeler

In modeler select Render to file, normally top right toolbar, first icon stack on the left

Under Animation section there is a drop down menu, select Workspace

Saved your animation to what format your want



Now you have to have your materials setup for lightworks in this case, if you have VRay then that will work also. Hope this helps.

Post by watupbrudda // May 12, 2009, 9:18am

watupbrudda
Total Posts: 25
Hi thanks for that noko.


Being a complete newbie, I'm not really sure on how animation works at all really. I'm planning on using the render to file option, but don't know how to tell it where I want the camera to be etc.


If someone could give me a basic tutorial on how to do a quick render to file animation, that would be great!


Thanks


Watup

Post by TomG // May 12, 2009, 9:40am

TomG
Total Posts: 3397
http://forums1.caligari.com/truespace/showthread.php?t=6193


Bitesize videos covers how I did a fly through of the Retail Experience Center.


HTH!

Tom

Post by watupbrudda // May 12, 2009, 9:53am

watupbrudda
Total Posts: 25
Hey thanks for that TomG. And thanks to everyone who has helped me with this, you've all put in time to help me learn, and i really appreciate it. I have a lot to learn, but I hope one day that I'll be able give something back to this forum, and pass on what I've learned to others.


Cheers


Watup

Post by marcel // May 12, 2009, 1:12pm

marcel
Total Posts: 569
pic
On the model size i use sometime an old plugin wich can do animated water. It is possible to simulate collision beetwen water and solid objets. I use it with keyframe animation. I don't know more easy.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn