POV-Ray : Newsgroups : povray.binaries.images : Rust : Re: Rust Server Time
23 Feb 2024 22:17:07 EST (-0500)
  Re: Rust  
From: Chris R
Date: 2 Nov 2023 08:55:00
Message: <web.65439b04afcbb1dda2e6a155cc1b6e@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
> Hi Chris,
> It's great that you're pursuing changes based on observations and suggestions.
> I will also acknowledge upfront that it's going to be a challenging task, since
> I myself have found creating a realistic, or even satisfying rust texture to be
> a very challenging task.
> Trying not to be too negative / overly critical (it's not my render) but:
> Whatever you have right now --- just isn't doing it for me.  It may be the
> lighting, it may be the textures, or the normals, or the geometry, ...   it's
> always very hard to tell.   But it all seems very --- flat, or washed out, or
> muddied together.
> Maybe experiment with a more grazing lighting angle - perhaps from a fill light
> (which could plausibly be a hallway light) or an HDR light source.
> I have always found that creating textures from photographs to be incredibly
> difficult, not just from the perspective of creating a suitable pattern, but
> also simply getting the basic pigment colors right.

This was just a test render; the full scene definitely needs more attention to
other light sources.  Having the light bulb inside the cell (and the moon
outside) means all of the front bars are back-lit, so that flattens them out.
I'm doing another render where I added another copy of the light bulb behind the
camera, which should help give a better view.

Also, one thing I've noticed is that the gamma of my monitor makes a tremendous
difference in how flat/washed out a render looks.  I have a large monitor
attached to my laptop that has been gamma-tuned for looking at documents, so
it's pretty bright and contrasty.  My renders always look much flatter and
washed out than they do on the laptop screen.  The whole gamma system in POV is
a bit of a mystery to me, and I usually just leave it at 1.0 for all of my

To be clear, I chose one photo of rust that I liked, and it was on a flat sheet
of iron.  I could do some more exploration that matches cylindrical bars better.
 However, I am not using them as image maps.  I edited the image in GIMP and
used  the feature for creating a smooth color palette from the image.  In
POV-Ray I sample that color palette to create a color map for the pigment.  I
used this technique on a bunch of wood samples earlier.

> Having said all that, I'm in the middle of daisy-chaining together a completely
> ridiculous number of algorithms to make some decent wood textures, and it's like
> doing a mini-PhD in computer graphics.  (Huge shout-out to jr who's been working
> behind-the-scenes for nearly/over a month to get even a small part of the
> procedural workflow implemented!)
> I've done some searching for an extant procedural rust texture, to see if any
> analogous work has been done, and most of what I've found is (to my
> eye/taste/expectation) crap.

I, too, did some searching for scientific papers on rust formation patterns and
didn't find much.  For other projects, icicles hanging from a roof, for example,
I found a bunch of papers with formulas for computing how they form in different

> My suggestions at this stage would be to simply try and find examples of things
> that _look good_.   They might be photos, they might be restoration videos from
> youtube, or they might be CG textures that are in movies or software packages.
> https://www.texturecan.com/details/73/

I will look for more examples of vertical, cylindrical rusty bars and see if I
can discern better rust formation patterns.  This wasn't a real rabbit-hole
search, as I spent less than a day on it...

> I have hundreds of pounds of antique/vintage tools that I've de-rusted and
> restored to working order - so much, that my kitchen had a layer of reddish dust
> that I had to wipe down.
> "Realistic" rust is likely going to be a huge challenge to pull off, simply
> because that sort of organic, developmental change exhibits such a wide degree
> of variation - due to age, base allow, wet-dry cycles, whether static or in-use,
> etc.
> For your scene(s), I'd focus on something practical, but still aesthetically
> acceptable.  To achieve that, I think you're looking at meshes or isosurfaces to
> get the required surface displacement that I'd don't think a simple normal can
> provide, and probably a layered texture at a minimum.

Virtually everything in this scene, (and most of my scenes) are isosurfaces,
precisely so I can add the texture to the surface with more control and depth
than with a normal.  I don't think most of the textures in the scene even have
normals at this point, as I haven't played around with the interaction between
very bumpy surfaces and texture normals.  I have shifted more towards patterned
textures, (which may contain some layered textures), so that I can have
different finishes, (e.g. the unrusted part of the metal has a different finish
than the rusty parts do).  The grime gets added to each component of the
patterned texture in a consistent way.

> Rust is fundamentally an electrochemical phenomemon, expanding outward from
> defects in the crystal structure that channel the oxidation process.  It
> therefore tends to be very patchy, expanding from localized defect centers.
> There are two main forms of iron oxides - magnetite (Fe3O4) which is black, and
> hematite (Fe2O3) which is reddish brown. (you also have the hydroxides and
> oxyhydroxides mixed in there....)
> Aside from that, it's important to realize that when iron rusts, it becomes a
> new chemical compound, which has a different density, and so it expands.  That
> gives you powdery "blooms", cracking, flaking, and when material is lost, deep
> pitting.
> https://en.wikipedia.org/wiki/Rust
> Which is why at the moment, I'm thinking that most of what you're doing will
> benefit the most from geometry, normals, and lighting (which accentuates the
> first two).
> Also, there's the issue of particle size, which amazingly, gives you different
> colors for what are chemically the same oxide.
> https://www.911metallurgist.com/iron-oxide-pigments/
> So you can have an interesting gradient of colors going from black through red,
> orange, and up to yellow, sometimes with some purple mixed in.
> Lots to think about, research, and learn, but better that you're also making
> progress and not doing _too_ much analysis, which leads to paralysis.
> Hope that "helps".  ;)
> - BW
> (also attached, find a procedural rust that I found on Wayback - the rightmost
> is something like what I think you're generally shooting for)

As always, inciteful comments!  I'll post updates as I go along.  I just
recently added some specs of rust into the wall beneath the window that water
dripping from the rusty bars would have picked up and transported there.

-- Chris R.

Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.