Sculpting ripples in water

Started by David, December 04, 2019, 06:19:03 PM

Previous topic - Next topic

David

Does anyone know if it's possible to sculpt ripples and wakes from say, a boat, onto the Lake surface in Terragen? My first thought was to sculpt this in ZBrush and then insert a water-shaded OBJ into the Lake but tests showed that this won't render correctly. So is there a way to use the painting facility in Terragen to 'paint the lake' to enable local displacement and even foam? And if so, firstly, how do I paint the lake, and then what might the node structure look like for such a shader? I'm still pretty new to Terragen and am definitely trying to run before I can walk here, but I'm sure you all know how this goes in terms of planning the future steps involved in doing something 'new'! Thanks.

sboerner

Your best bet would be to use a displacement map. There's some discussion of boat wakes (and the Kelvin wake pattern created by moving boats) here with a link to a displacement map.

Load the image into an image map shader then pipe it into the displacement slot of a surface layer. Keep in mind that the surface layer reads color data as displacement, so Apply Colour must be ticked in the image map shader. Adjust the displacement in the Displacement tab of the surface layer.

If you search for "foam" in the forum you'll find several threads devoted to that topic.

Dune

I sometimes make a topdown or ortho render of a boat on the water (or even a topdown screendump from Lightwave), then paint an extra layer in Photoshop for wake/bow displacement and foam (either use them together or make two masks), save as greyscale, and import those as image map to fit over the boat (Y projection, best use a transform shader to rotate and locate/shift in its exact place), with displacement by surface shader or displacement shader, or vector displacement shader (Y) and some fractal to break up the foam a bit more if needed (depends on the accuracy of the painted map). With a greyscale map, you'd only get positive displacement though, you actually need a 32-bit vector displacement map, but that needs another approach (Mudbox or so).

David

Thanks guys for taking the time to help me, the links are really helpful too.
I think I'm halfway there. The 2 images show the use of screengrabs from the web, one b/w 8-bit, the other a normal map. Both result in what look like structures below the water surface - there doesn't appear to be any displacement above the surface, certainly nothing that catches the light. Please excuse me if I haven't interpreted your instructions correctly.
Dune, your suggestion that I need a 32-bit vector map for grey scale images - could I generate this in ZBrush from a sculpted mesh? Files attached if you have the time and inclination to expose my bloops! Thanks again. David

Bow wave 2.jpg

WAS

#4
It looks to me that you are applying your displacement to the ground, under the water, and not to the water surface. Try adding a surface layer after your Water Shader 01 and add the displacement there (remember to uncheck Colour).

I can't open your TGD, the XML reader says it's broken, and TG forums are saving it as a .txt file and not a .tgd.

David

Wow, Thank you WAS! It did occur to me that the image map was perhaps attached to the ground plane but I guess I wasn't reading the node layout correctly. Anyway, I'm very grateful for your help. Now to study FOAM!

sboerner

Looks like progress! Here's a 32-bit displacement map if you want to give it a try.

Dune

You should be able to use ZBrush, but I don't know how to extract a vdisp map out of a sculpt there. I do know how to in Mudbox; sculpt on a hires plane, add another low-res plane and extract vector displacement map through one of the tabs, and instructions. Apply that in TG through a vector displacement shader.

David

Thanks Guys, you're heroes! You've given me plenty to get on with. Yes ZBrush can export VDM's, now for some tests.

Dune

Quote from: David on December 06, 2019, 01:41:48 PMYes ZBrush can export VDM's
If you know how that works, could you explain? ZBrush has much better tools to sculpt a nice wake than Mudbox.

j meyer

@ Ulco - What's wrong with the explanation from back then?
https://planetside.co.uk/forums/index.php/topic,16110.msg157376.html#msg157376
Only the value of 3 has to be changed to 43 instead, but that's mentioned at the end
of the thread, too. ZB 2020 might use another value haven't checked yet.

Dune

To be honest, I forgot about your explanation back then. Sorry! Copied it again and saved, gonna try soon. Thanks, Jochen!

David

Jochen, your link is excellent, thank you. I was just about to share the following link with Ulco but spotted yours first. Anyway, Joseph Drust is always worth watching/listening to. https://www.youtube.com/watch?v=FB07uGbFje8
My project is a Greek Trireme moving forward in fairly calm water. Straightforward enough until one considers the oarsmen, 80 per side, each oar creating its own local furrowed wake, with splashing! VDM creation for such complexity might force me to simplify things with a bump map plus splashes made as separate water objects using the ZBrush 'splash brushes' from BadKing. I hope to post progress in due course.

Please can someone help me with a basic procedure for updating an OBJ that I've been surfacing in Terragen? If I need to make alterations to a model in Lightwave and then save it under a new file number I loose all the Terragen texturing when I re-importing it. Or, if I remove an item from the model and re-export it back to Terragen using the original file number, I get error messages for the missing parts. What is the best modus operandi for make small changes to an already Terragen-surfaced OBJ? Thanks.

sboerner

If you don't change any of the shading groups (or their names) you should be able to update or replace the mesh through the obj reader. If the filename doesn't change, just reopening the scene should update it.

If you make any changes to the shading groups (using Maya terminology here, they may be called something else in Lightwave), then you will run into issues. TG stores all the shading info in the tgd file and won't update it when you replace the mesh. So you can get mismatches and errors.

I've learned through experience to work defensively when it comes to imported objects.

First, I always check the mtl file exported by Maya and prune any unused shading groups. (Maya exports every shader in the scene, whether its used in the mesh selected for export or not.) This avoids having your object's internal network cluttered up with unused object part shaders.

Then, as I'm building the object's shading network I try to arrange the nodes so they can be easily selected *without* selecting the object part shaders. When the network is finished I then select all the nodes (minus the part shaders) and export them as a clip. This way, if I ever have to rebuild the network for a new version of the mesh, I can insert the clip in the internal network and just reconnect the object part shaders.

Sometimes you just have to rebuild the network, and this really speeds things up. Plus the clip file is a nice way to back up those networks. (As you probably know, they can represent hours of work.)

Finally, if you don't already do this, you might want to consider using tgo files instead of obj files in your final scene. tgo files include the shading networks and don't use mtl files.

So my workflow goes like this: Every new mesh is imported into an empty Terragen scene, then shaded. When the network is done the scene is saved in the same folder with the mesh, and the object is then saved out as a tgo file. The tgo is then placed in the final scene. 

It may seem like I'm adding an extra step (and I guess I am), but shading the mesh in an otherwise empty scene is much faster then working in the final scene (which just keeps growing in size). It makes it easy to try different lighting angles, etc. And tgo files are pretty bulletproof. The downside, of course, is that if you do make changes to the mesh you have to make a new obj *and* tgo file. (Which is why using shortcuts like clip files can really help.)

I'm curious to hear how other (more experienced) hands deal with imported objects.

Dune

Interesting project you're working on, David. 160 oars and a trireme moving the water is indeed quite a task. Hope to see some of it here. My Roman warship scene was a bit easier than that, with just 20 oarsmen or so, but I just used a displacement map for a little water movement and foam. It depends on resolution what's the best workflow, I guess. The link you shared is interesting, one of his tutorials I didn't see yet. Thanks.

Regarding obj's: I always store them in an appropriate folder somewhere, take them through Poseray and group parts that have similar textures applied, then translate those groups to textures. You have to relink your textures, but that can also be done in TG. Save under the same name if the original is no use to keep. When working with say DAZ figures, I always make clipfiles out of completed sets in TG, and can import that to a new figure as a base and relink appropriate nodes to the parts. Grouping comes in handy then; you don't have to link one shader to 10 parts.
Or I relink every texture from within the default shaders, and add whatever is needed if I want to make a new set. Then save as tgo in a specialized (tgo) folder, ready for import in any new project.