Jump to content

Creating Rust And Controlling The Distribution On A Surface.


Recommended Posts

Hi,

I am trying to create a dusty, rusty surface of a container. It is easy to create one map for one single container. I have lots of reference images and I can paint the rust on a UV map.

But the issue is that I will have lots of containers. So I have to find a way of creating the rust procedurally... or at least create a procedural black and white map to control the distribution (visibility) of a bitmap rust texture on the surface. I also have to find a way to control the amount of rust. Some of the containers will be quite new. they will not have rust on them.

Here is an example of a initial dust on the surface. This is just an underlying base dust/rust. I have 4 different maps (painted in Photoshop) and I can control the opacity and I can also cycle through those 4 maps.

light_rust_test.jpg

Now I need to add the main rust. It is usually located on the corners.

ref1.jpg

ref2.jpg

ref3.jpg

This is how my UV map looks:

uv_map.jpg

What should I do? How should I approach this problem.

I think I have two options.

1) Have one big 2048x2048 rust map (bitmap). Use a procedural black & white image to control the visibility and the distribution of the rust

2) Create a procedural rust and control the distribution.

I am trying to find my way through VOPs. I am familiar with most of the basic things. But the procedural components are still to be explored.

Could you please help.

Thanks.

Edited by Symbolic
Link to comment
Share on other sites

You could paint over the surface (using the paint SOP) the areas where you want to have dust. Then in VOPs create a shader using the painted attribute to control the thresold of the rust noise (don't multiply it by the attribute). You can do it using the Maximum VOP.

Link to comment
Share on other sites

Hi MIguel,

Thanks for the reply.

If I paint and use that to distribute the rust... then it will appear at the same position every time. I think...

I just want to have some key areas that should have the rust on... but then I need to be able to control the scale of the rusted area... My key areas are the corners, the front and back ends of the sides... and mainly the lower parts of the sides... But than I need to control the amount...

I mean... make the rust map grow to the inner parts of the surfaces starting at the key areas... or keep it very small on these same key areas...

Thanks.

//

And I am really not that familiar... with feeding attributes into VOP networks... It is too advanced for me :(

Link to comment
Share on other sites

wait! wait!... I have managed to paint on the Geometry with the paint sop... and than call the "Cd" attribute to VOPs... and use that as a bias.

paint_sop.jpg

vex_network.jpg

control_area.jpg

So now I need to be able to grow this area to the inner parts of the container... or shrink it...

and give it a noisy / vain look...

Like that (sorry very bad drawing)

noisy_control_area.jpg

So maybe I should bake the output of the Paint SOP as a texture map... and feed this into the VOPs as a BIAS controller and combine it there with some kind of tirbulent noise?

thanks!

Edited by Symbolic
Link to comment
Share on other sites

You're well on your way already Symbolic. :)

Few tips: Instead of painting the basic rust distribution as a color attribute, create a custom attribute and overwrite Cd in the Paint SOP. Color is a vector attribute, and you don't need 3 components for a mask. Instead use AttributeCreate and create a Float attribute and call it rust or something, then in the Paint SOP check Overwrite Color and enter the attribute name.

From what I gather, the two constants are that the edge beams and the bottom of the sides have more rust than the other areas. So maybe paint the geometry in such a manner, and then leave the rest of the variaton up to the shader.

In VOPs you can multiply your imported rust mask with a procedural noise pattern like TurbulentNoise. You can control the density/intensity of the noise fairly easily by appending a ShiftRange VOP and playing with destination min/max (and maybe append a Clamp VOP afterwards so your mask values are within the 0-1 range). Then I would use a larger noise pattern to break up the look/create randomness, by multiplying again or using the larger noise to drive the density of the previous pattern (try pluggin it into the min/max inputs of the ShiftRange). Additionally you could paint more masks on the geometry to help as "filters" in VOPs. For example, if you find after a lot of tweaking in the shader that the sides of the container still have too much rust, it would be handy to have a mask attribute that seperates the container sides/edge beams. Hope that helps a bit.

Link to comment
Share on other sites

You're well on your way already Symbolic. :)

Few tips: Instead of painting the basic rust distribution as a color attribute, create a custom attribute and overwrite Cd in the Paint SOP. Color is a vector attribute, and you don't need 3 components for a mask. Instead use AttributeCreate and create a Float attribute and call it rust or something, then in the Paint SOP check Overwrite Color and enter the attribute name.

From what I gather, the two constants are that the edge beams and the bottom of the sides have more rust than the other areas. So maybe paint the geometry in such a manner, and then leave the rest of the variaton up to the shader.

In VOPs you can multiply your imported rust mask with a procedural noise pattern like TurbulentNoise. You can control the density/intensity of the noise fairly easily by appending a ShiftRange VOP and playing with destination min/max (and maybe append a Clamp VOP afterwards so your mask values are within the 0-1 range). Then I would use a larger noise pattern to break up the look/create randomness, by multiplying again or using the larger noise to drive the density of the previous pattern (try pluggin it into the min/max inputs of the ShiftRange). Additionally you could paint more masks on the geometry to help as "filters" in VOPs. For example, if you find after a lot of tweaking in the shader that the sides of the container still have too much rust, it would be handy to have a mask attribute that seperates the container sides/edge beams. Hope that helps a bit.

Thanks!

This sounds great... but I am a real newbie... I did not understand the thing that I have to do with the Paint SOP about the custom attribute...

??

How will I paint additional masks?

:(

"it would be handy to have a mask attribute that seperates the container sides/edge beams. Hope that helps a bit."

How to that?!

:(

Oh my god!

:o

Link to comment
Share on other sites

Ok...

After watching some VEX tutorials... I started to put together my custom VEX Rust Shader.

This is the first test.

rust_test_1.jpg

I got totally lost after some point. The problem is I need to have those elements as sparate layers:

1) The base color and lighting model. This is the surface of the container

2) A texture map, this is some dust and some scratches

(just like the image that I have posted before)

3) Main rust area.

4) Some Internal darker rus on top of the main rust.

(I have this in the second image)

5) Finally I need to use the Cd coming from the Paint Sop as a mask for the rust...

I could not get the rust and basic surface separated... I do not know how to create alpha for only the rust...

Anyway... here is the file... it is very messy... sorry

:(

rust_test.hip

Link to comment
Share on other sites

Hi

try this link

http://graphics.stanford.edu/courses/cs348...ring/index.html

I was thinking about this a lot since it was connected with my work in last 6 months

I would certainly go for a combined aproach between painted maps and procedural to gain more control for artist of rust distribution

there are two main directions I was thinking about

-using occlusion +noise to detectct indented areas of object

-using curvature shader to detect changes in geometry

I will see if I get some time to do something on this theme

I can say for sure that using occlusion passas a guide/mask for dirt and rust, dents and nicks on objects helped me a lot!

z

Link to comment
Share on other sites

5) Finally I need to use the Cd coming from the Paint Sop as a mask for the rust...

Your container looks really good!

I didn't get arctors tipp to paint into another attribute to work.

So I just renamed the paint Cd to myRust and imported this into the shader.

Georg

rdg_rust_2.hipnc

Link to comment
Share on other sites

Hi,

Thanks everybody... I will have a look at the files... from the first glance they look quite helpful...

The thing that I could not do is... I really needed to have the rust separated from the normal surface...

I use color mixes and the BIAS to bring different networks together... But this requires lots of complicated multiplication processes...

Is there a way of creating an alpha for the rust... and then bring the rust and the normal surface in a more like a Photoshop way...

Link to comment
Share on other sites

Wow! This really looks great... Thanks DaJuice!

I will be looking at the issue of controling the distribution of the rust in a very short time.

For now I am dealing with the VOP network...

I have noticed that I have been building the logic in a wrong way... Instead of creating the whole rusty surfaces I have focused on masking the rusty areas... so at some point I was dealing with networks in networks... which makes manipulating each different element impossible...

Right now I am trying to clean the networks and unnecessery operations that make the process complicated.

I have a small result:

rusty_teapot.jpg

Thanks to everybody helping me here on this topic.

I am working on this right now 7/24 :)

...another test with bump mapping added.

The colors and the light is bad.

rusty_teapot2.jpg

Link to comment
Share on other sites

Hey... you know what I have been playing with your file... DaJuice

It is an amazing solution... very clever... you actually opened the gates of time-laps procedural rust...

:)

Thank you very much... I am working on your file right now...

It is very exciting!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...