News:

Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Gradient fill for water Tank

Started by pfisher, April 16, 2012, 01:13:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pfisher

Hi

I am trying to make a tank of water look as though its cold at the bottom and hot at the top by doing some kind of 3D gradient fill (if that's what it's called). I have attached a PDF document of the overall set up so you can understand what i am talking about. At the moment the tank water is rendered with a box materials set at miscellaneous / water coloured blue.

My question is, is it posible to simulate this look and if so how. The tank itself is made from polypropylene so you cannot see through the sides.

Regards Paul
Paul

TC19.2 Pro
Windows 7
8Gb
Fujitsu celsius i7-2600@3.4GHz
Firepro V3800

Henry Hubich

One way: Create a gradient image in your favorite photo editor (or use the one attached herewith) and use it as the "Wrapped image" Pattern in a new material. In that material, specify "Matte" Reflectance, "None" Transparency and Texture, and "Cylindrical" Wrapping. Make the Axis Direction coincide with the vertical axis of the tank contents. Create a different, completely transparent, new material and use the Facet Editor to apply it to the top surface of the contents (so you can see through it and thus look at the sides).

Henry H

pfisher

Thank you for your reply Henry however i'm confused about your settings you mention. I have created a new material called water as shown in the screen dumps attached but after that i'm at a loss. Can you give me a few more pointers or screen dumps to help me along.

Paul
Paul

TC19.2 Pro
Windows 7
8Gb
Fujitsu celsius i7-2600@3.4GHz
Firepro V3800

Henry Hubich

Quote from: pfisher on April 17, 2012, 11:28:01 AM
Thank you for your reply Henry however i'm confused about your settings you mention. I have created a new material called water as shown in the screen dumps attached but after that i'm at a loss. Can you give me a few more pointers or screen dumps to help me along.

Paul

Here are my material settings, Paul. They are based upon my having created the object that constitutes the "water" with its vertical axis parallel to the World Z axis. If you're not sure that your own "water" object is similarly aligned, then do the following before you apply any material to it:

(1) Switch to the World Workplane by pressing Ctrl+Alt+W (no harm done if you're already in that Workplane).

(2) Create a Sphere considerably smaller than your "water" object; move it to that object; press E on your keyboard when the cursor is on or near one of its boundaries. That deposits the sphere at the Center of Extents of the "water."

(3) Activate the 3D Add tool; click on the sphere; click on the "water." Be sure to click the sphere first.

The foregoing procedure assures that the vertical axis of the "water" object is parallel to the World Z axis.

Don't forget to apply a transparent material to the top of the "water."

Post again if you still have questions.

pfisher

Oh dear i'm not doing at all well on this task. What is the size of the sphere you have created in relation to the tank of water. Does the gradient fill jpg image size have to be the same size as the tank of water.

When i apply the material to the sphere and then add the sphere to the tank of water in the order you state and then render the scene the tank does not show as you see in the sphere.

Can you please add more detail to your instructions.

Regards Paul
Paul

TC19.2 Pro
Windows 7
8Gb
Fujitsu celsius i7-2600@3.4GHz
Firepro V3800

Henry Hubich

"What is the size of the sphere you have created in relation to the tank of water."

Make the sphere small enough to submerge completely in the water. Its sole purpose is to be 3D-Added to the water itself so as to assure that the water's own Workplane is the World Workplane -- and the reason that's necessary is to be sure the material will wrap correctly. The sphere should disappear after it's been added.

"Does the gradient fill jpg image size have to be the same size as the tank of water."

No. Perhaps surprisingly, neither the size nor the aspect ratio of the .jpg image matters. (Within reasonable limits, that is. Too small and the resulting material will look grainy; too large and TCad can't handle it. Somewhere around 800x800 pixels is OK.

"When i apply the material to the sphere and then add the sphere to the tank of water in the order you state and then render the scene the tank does not show as you see in the sphere."

The sequence in which you do these operations is important. Create the water, then press Ctrl+Alt+W, then create the sphere, then 3D-Add the sphere to the water (clicking the sphere first), then assign the "gradient fill" material, then use the Facet Editor to assign a transparent material only to the top surface of the water (or drag this material from the Material Palette onto the top surface of the water). BTW, do not rotate the "water" before you assign the material.

Chances are good that your "water" object is so thorougly mixed up by now that you're better off deleting it and creating another.

If you find yourself hopelessly lost, feel free to post your .tcw and I or someone faster will fix it for you. Or, if you'd rather not post the entire drawing, post one that contains only the tank.

Henry H

pfisher

Henry

I got near but not near enough. Please can you create the effect i wish using the attachment. Hopefully I will be able to learn from it. Can you suggest any reading material?

Regards Paul
Paul

TC19.2 Pro
Windows 7
8Gb
Fujitsu celsius i7-2600@3.4GHz
Firepro V3800

Henry Hubich

Quote from: pfisher on April 22, 2012, 01:20:06 PM
Henry

I got near but not near enough. Please can you create the effect i wish using the attachment. Hopefully I will be able to learn from it. Can you suggest any reading material?

Regards Paul

Here's your file back, Paul, modified and renamed. You'll have to modify the "Gradient Fill2" material by navigating to your own copy of the "Gradient_Wht to Blu.jpg" image I posted a while ago. Notice the following:

Click on the top face of the water with the Facet Edit tool; right click and choose "Properties"; click "Material"; and note that the material for this one facet is different from the bulk of the object.

I changed the material of the tank because "Mercury" is too highly reflective.

The length and width of the water are just a few millimeters smaller than the corresponding dimensions of the tank. Therefore there's a tiny gap between the water and the tank. This change was necessary to keep the tank material from interfering with the water material. (When two different materials occupy the same face, the rendered appearance is unpredictable and generally unsatisfactory.)

If the bottom face of the water is visible when you render, it won't look right. Should this be a problem, you'll have to use the Facet Editor to apply still another material there. Use something with a "Plain" Pattern and a solid blue color -- and "None" Transparency.

Henry H