Author Topic: plastic foam ?  (Read 8715 times)

2014-09-09, 00:42:22

arrival

  • Active Users
  • **
  • Posts: 90
    • View Profile
hi @all,
i have some problems to make a good looking material like the yellow "plastic foam"
any ideas to make this with corona ? :-)

2014-09-09, 10:28:30
Reply #1

CiroC

  • Active Users
  • **
  • Posts: 506
    • View Profile
    • Portfolio
There was another user trying to replicate something similar:

https://corona-renderer.com/forum/index.php/topic,4789.0.html

It was modeled.

2014-09-09, 14:21:14
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 8612
  • Marcin
    • View Profile
If you need a closeup shot, then I'm afraid this can't be achieved by just material. You will need a very complex mesh or at least some details scattered over a base mesh.

2014-09-09, 14:23:12
Reply #3

zzubnik

  • Active Users
  • **
  • Posts: 124
    • View Profile
You could make an approximation, then use Corona Scatter to add fibers to the mesh.
Unless it's a close-up, I wouldn't bother though.

2014-09-09, 16:50:17
Reply #4

Lucutus

  • Active Users
  • **
  • Posts: 103
    • View Profile
    • a+m
Hello,

im the one who already tried doing a foam material.

For me there was only one way to do it because i needed a close up. So my final foam was geometry.

If you are far enough away you could try da displacement map. A cellular or Noise/turbulance could work.

Greetz

Lucutus

2014-09-11, 08:21:17
Reply #5

rambambulli

  • Active Users
  • **
  • Posts: 160
    • View Profile
hi,

Interesting question. I made a test. I'm not really satisfied but with some tweaking and using SSS (used translucency and refraction because I haven't got the latest build with SSS yet) I think it could be better.

I have to look for a better noise map. This one is the 3ds max own cellular map. The best result was with chips but it needs bubbles instead of chips. i added a detail of  the "foam". I have little experience in noise maps so this could improve a lot.

the model uses an opacity map and I scaled 3 blocks bit smaller than the original one to give it depth. The different blocks have slightly altered noisemaps.


cheers.

2014-09-11, 16:46:25
Reply #6

arrival

  • Active Users
  • **
  • Posts: 90
    • View Profile
wow...looks very nice.
it is possible to have a look in your mat,or can u please upload it?

thanks :-)

2014-09-11, 22:24:36
Reply #7

arqrenderz

  • Active Users
  • **
  • Posts: 635
  • arqrenderz.blogspot.com
    • View Profile
    • arqrenderz

2014-09-11, 22:26:00
Reply #8

juang3d

  • Active Users
  • **
  • Posts: 636
    • View Profile
indeed, great work.

How do you do it exactly?

Can you try it with a torus form?

Cheers.

2014-09-13, 21:49:26
Reply #9

rambambulli

  • Active Users
  • **
  • Posts: 160
    • View Profile
Hi Guys,

Good to hear you liked it.

I added a wire frame image to explain how I did it.
I used 3 layers slightly differing in size.

The rest of the images are tests.
Some of them only rendered a few passes. Sorry I didn't have more time (and patience).

Quote
Can you try it with a torus form?

Yes I added a few. And some twisted ones.
Also testing different colors. Every color works differently I noticed. The contrast of the bubbles and the foam is very tricky. The image of the yellow headphones shows the same. In the center of the bright yellow foam you can't see the bubbles. On the edges you see it is foam.

That's why I also added a twisted torus. It look more plausible as the normal torus, even if the normal one has noise added to it.
Except from the strange white haze on the inside of the torus. Must be a wrong reflection/ior/glossiness thing.
The torus twisted with noise has nice edges but I added too little segments so you can see the polys.

I also tested with some noise modifier on the outer layer and with the scale and density of the noise maps.

Again I think this material could get better with SSS and with better a noise maps. (and a lot of tweaking :)).
I found this one. It is a variation on the Perlin Simplex Noise. I bet it will work great. The thing is, it will only work when I write my own noise map :(

http://briansharpe.files.wordpress.com/2012/01/simplexcellularsample.jpg

I'll post/share my max file. I warn you it is a big mess. It sufferd from the tests. Especially the materials.

https://onedrive.live.com/?cid=DA3C93B9FD55B4F0&id=DA3C93B9FD55B4F0%21107

Have fun with it!


« Last Edit: 2014-09-13, 22:08:21 by rambambulli »

2014-09-13, 22:25:35
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5452
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Looks really nice! As for noise, you can try Bercon noise map, i think it would fit there.
I'm not Corona Team member! Everything i say, is my personal opinion only. Render Legion does not endorse my words nor actions.

2014-09-13, 23:50:37
Reply #11

juang3d

  • Active Users
  • **
  • Posts: 636
    • View Profile
Looks awesome.

Tha bad part is that it seems that it's a game with transparency, and this makes teh render pretty slow I'm afraid, I'll try your max when I have som time, probably a great solution for static pictures, but probably a slow solution for animation, anyways I can't think in anything better than this apart from pure modelling.

Congrats on this and cheers!

2014-09-14, 08:35:13
Reply #12

rambambulli

  • Active Users
  • **
  • Posts: 160
    • View Profile
The material setup is result of a lot of trial&error. There are definitely some items in the setup that can be discarded.  I can try to build up the material from scratch. This setup is very slow. I don't know if SSS is faster.

btw if you model the object from very small bubble structures. you still need something like SSS or translucency. if doubt if this will be faster. the modeling won't, that is for sure :)

I tried berconmaps. but I can't find the right setup for a rounded, hexagon structure.

2014-09-15, 13:14:17
Reply #13

Lucutus

  • Active Users
  • **
  • Posts: 103
    • View Profile
    • a+m
here i copied rambambulli´s Setup and also used the bump and Displacement shader.

For cutout, bump and displacement i used a standart noise map with a edited output curve.


2014-09-15, 15:25:00
Reply #14

rambambulli

  • Active Users
  • **
  • Posts: 160
    • View Profile
Great!! This is a big improvement!