Author Topic: transparent plastic bottle material  (Read 23170 times)

2016-07-07, 02:15:21
Reply #15

alexgabriel

  • Active Users
  • **
  • Posts: 11
    • View Profile
Hello!

Ah, here we go, there was indeed something wrong with the material I selected in the max environment. I removed it and placed the hdr in a CoronaBitmap again and now it's working the way it should. I can confirm that "Spherical" was the option selected, however, I think you're right concerning the material/environment bit, there was something weird about that.

You've asked about thickness, the "thin" option is indeed checked. I unchecked it, and now it produces a new problem I will describe below:
- now the bottle looks like there's a smoothing group or normals issue. The actual bottle mesh is from an .STL file, taken directly from autocad from what I know. I had a lot of trouble with it, mainly the fact that when I add modifiers that change the mesh structure, like Push or Shell, it loses its' smoothing and becomes jagged. I tried smoothing it, I tried checking the normals, resetting them, resetting the xform, STL checks, nothing worked. Every time I add a shell modifier it messes up the mesh. You can see it in my upload if you look closely. Interesting though that the effect cannot be perceived if "Thin" is checked.

Regarding the instancing bit, I'm not sure, to be honest, it just seemed to work this way, but I don't think I actually get what you're asking me, without an example.

I'll upload the scene here, if you'd care to play around with it, I'm fine and there is no hurry, I just want to learn something solid out of this.
The scene itself is really simple, just two lights, the bottle elements and the hdr map. I will add the hdr map too, so it can look the same, but I have no problem in anyone changing it.

Here is the scene in a wetrasnfer link ( I'm not sure I'm allowed to add links here actually, haha ). I saved it for max 2014, I use 2016 right now, and Corona 1.4:

https://www.wetransfer.com/downloads/35f7f649ac2b519302294a5a21af9d7420160707001103/4ce049b2de0fd3af2e7271d4d1b1c71420160707001103/a612d1

Thank you!

2016-07-07, 13:56:08
Reply #16

PROH

  • Active Users
  • **
  • Posts: 1189
    • View Profile
Hi. From what you describe, it could very well be geometry problems that are causing some of your problems. Unfortunately I won't be near Max the next few day, but maybe somebody else can take a look at your model.

Working with imported geometry may some times cause problems, depending on what software it derives from and how it was exported. There are a few things you could try/check out (make a back up copy - just in case):

1) Are the physical size correct? If not then scale it on sub-object level. Do NOT scale it on object level, since this will cause problems (somewhat similar to those you describe).
2) Try using the "Reset X-form" utility (found under Utilities).
3) Check that all vertices are welded.
4) If all the above mentioned are OK, but the mesh still acts weird, then try putting an "Editable Mesh" modifier on the top of the stack, and collapse all, and/or try converting it to an editable mesh by right clicking > convert to editable mesh. Sometimes this is needed to make an imported mesh behave like it should - nothing logical, but proved by experience....

Hope it helps

2016-07-07, 15:20:08
Reply #17

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 7684
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I took a look at this model and indeed there's big problems with geometry. Model is imported from CAD and as soon as one tries to edit mesh (add shell or edit poly modifiers), normals goes bonkers. I don't know if that could be easily solved in max. Best thing would be to add thickness in software where this model were made originaly and reimport to max.

Anyway, i tried to do quick retopo in Zbrush and then bake normals from orginal bottle - i get pretty decent results with clean mesh. Didn't try to setup materials though. Can share cleaned model if OP wants.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2016-07-07, 15:22:27
Reply #18

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
I did this -

- Underneath the Shell and Edit Poly I added a ProOptimizer with Weld Vertices on, set to 100% so it didn't actually simplify the mesh any other than welding vertices - often useful on imported meshes from STL and similar.
- I added Quadrify Mesh set to 100% above that, just removes triangulation where it can
- I then removed the topmost Edit Poly, collapsed everything, and converting the Editable Mesh into an Editable Poly
- Then I went to Modeling, Properties, and set Smooth 30

The last step is likely the key, setting the smoothing groups, the first few steps just cleaned things up from the import.

Attaching a close up from the Interactive Renderer just to show it is smoothed :) And a grab of the stack I set up (the last Edit Poly is turned off since I was going to collapse and turn into an editable poly anyway).



Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-07, 15:31:29
Reply #19

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
A quick note on Quadrify Mesh - it comes in with a default of 4%, which can result in a HUGE number of polys if the model it is being applied to has lots of polys to begin with (as imported CAD may have), which can mean Max takes an age to calculate it. For using it to remove triangulation only, often it's better to apply it to a cube, set it to 100%, then copy and paste the modifier onto the desired object, saving Max ever trying to add more polys :)
Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-07, 17:54:50
Reply #20

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
- Did the conversion steps on bottle and water
- Tweaked the water and bottle materials some (eg added a Fall Off using Fresnel to affect the Refraction colour in the plastic to try to draw out the geometry change some more, changed some of the reflectance IOR just for visual looks rather than physical accuracy, adjusted diffuse amounts some, reduced glossiness on the plastic reflection) - all of these can be tweaked some more as it ain't perfect!
- Didn't have the map for the cap, did play with the materials some there but you may want to keep your original
- Cut the water off a little bit lower in the bottle, so there is more of a gap with "just plastic" up top
- Rotated the bottle a little, as that helped bring out the features some more
- Removed the overrides as they are not needed - the same thing is now being seen as the background, reflected, and refracted, so is fine just to use the one bitmap in the Max environment

You could also try a background that is neutral but less blurred, a cloudy sky could work for instance (I used a freebie from HDRI Skies http://hdri-skies.com/) - though I'd likely play with the positioning some, I think the current positioning of the ground in the refractions makes it look a bit like an angry Joey :)
Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-07, 23:21:20
Reply #21

alexgabriel

  • Active Users
  • **
  • Posts: 11
    • View Profile
Looks nothing less than awesome now!
I'd really like to check the scene out, however, I can't seemingly open it with max 2016, it says it needs an actually newer version ( 2017 I guess ?)

As for the earlier comments:
- I also firstly tried to take the bottle to Zbrush and use the tools there to get some better geometry. I tried with Zremesher, it didn't really give me an adequate result, however, I didn't insist too much.
- afterwards I tried the method with the various modifiers in Max ( ProOptimizer, Quadrify Mesh, etc), and, althought it looked somewhat better, the smoothing groups were still rather off in some places
- finally, I went for a more simple approach. I removed all modifiers and made a copy of the bottle. Then I used the Push modifier on the bottle and the copy, to practically create the exterior and interior of the bottle. In the end I collapsed everything, I flipped the faces of the interior bottle so they were actually facing the interior, towards the water, and I attached the two pieces together.

Now, looking at the bottle, I'm pretty satisfied with it but there are the following things I still want to work on:
- it is true that I need to play more with the hdr images, the cloudy one is an excellent idea
- I might try to move the lights around to push the highlights to the sides a little
- I sent this result to my client and he mentioned that, although the bottle seemed to work, the contents of the bottle didn't really look like water. The shot with the bottle in the cloudy environment above comes a lot closer to a water look.
- I also changed the water material with one that is a little darker and has some sort of noise ( I can't seem to detect it anywhere though )

Uploading the scene again with the new adjustments would be awesome as I'd like to try and play around with it.
You can see how the bottle looks right now in my scene.

So, the question right now would be: is it possible to improve on the look of the water? ( although the version that I can see with the cloudy hdr looks really nice )

Thank you!

2016-07-08, 02:08:02
Reply #22

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
From experimenting earlier, my feeling was that the HDRI background is what makes the difference to the water - with a very blurred background, the water becomes "blurry" too, there's no detail for it to refract in a sharp and clear way. Part of the reasoning I tried out the clouds, and it did seem to help - those can be left unblurred as they are neutral enough as a background that they don't need to be hidden, and then you have some nice crisp detail there for the water to refract. That may be all it takes for your scene now.

Moving the lighting to catch the edges is a good idea, I did that in the sky version, made the big light vertical (tall and narrow) and moved it to the other side. I'll see about saving the file out with 2016 compatibility, though you'll need to grab the HDRI for yourself, although free I am not sure on their rules for redistributing - and you may prefer another HDRI from their site or elsewhere, lots of good ones around with some nice skies and clouds!
Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-08, 20:47:12
Reply #23

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
Here's the scene in 2016 format - I replaced the third party HDRI with a simple one of my own rendered out from Terragen, replace as needed! With that, use the U and V offsets in the bitmap to rotate the image to get lighting in a good place, and some nice clouds to refract. Also, replace the bottle object with your remodified version too. Did tweak the water some just to go with this background, added in Fresnel falloff with an output curve to tweak emphasis of edges, but again that can all be done different for the artistic results you are looking for in combination with whatever background you go with etc.

Hope this helps!
Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-10, 14:22:13
Reply #24

alexgabriel

  • Active Users
  • **
  • Posts: 11
    • View Profile
Hello,

Thank you for the scene, I'm going to play around a little more with the hdr map offsetting, and I'll send the result to the client, I'm really curios what he's going to think about it.

One more thing though, I was thinking of adding a very faint ao pass over the shot. Is there any way to produce a more explicit ao pass, meaning without the actual shading that gets involved ( like under the kangaroo's chin and arm )

Thanks!

2016-07-12, 14:41:20
Reply #25

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
Not sure how you have the AO set up there - in a separate AO pass (create a CTex render element, and drop the Corona AO into the map for that) there should be no background for one thing, as well as no shadows. This image looks more like a regular beauty pass using AO in the diffuse component? If so, that  will definitely still show shadows unless you turn off shadows from the lighting, but still not a good way to render AO for later compositing as a separate layer.

Done in a CTexmap, with settings adjusted to give a very sharp definition to the AO should come out looking something like the attached. It will render at the same time as your beauty pass too.

If you are after some other effect, you could use the AO fed into some blending to, say, darken the refraction colour in those places etc. Depends what effect you are looking for from it.

Hope this helps!

Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-12, 15:34:22
Reply #26

alexgabriel

  • Active Users
  • **
  • Posts: 11
    • View Profile
Worked like a charm, thank you!
I was aware, of the method of adding the AO map into a CTex element, I watched it in a very short Corona tutorial on YouTube, however, it's only now after you've explained it better that it crossed my mind there might be settings to adjust and make it better.

I don't really intend to add an AO pass over the final result of the bottle, I was only asking for my future endeavors.

I'm very grateful for all the help I got on this forum, I will upload the final results that I sent to the client here, so you can see how the shots look after all.

One more final question though. Since I'm a complete beginner to Corona, I would like to ask where I could find some comprehensive video tutorials, preferably ones that work on example scenes, like interior/exterior lighting, still lives, our something automotive. I checked YouTube for once, however, there aren't that many and I could see that a large portion of them where in Russian, if I'm not mistaken.

Thanks a bunch!

2016-07-12, 16:48:58
Reply #27

TomG

  • Corona Team
  • Active Users
  • ****
  • Posts: 4499
    • View Profile
Glad to have helped in any way! I think the final bottles have come out rather nice there, and I hope your client agrees!

Ok on the AO :) It can be quite a flexible tool so it is good to keep it and the various ways it can be used in mind for future projects!

For videos, all the official ones are at
https://www.youtube.com/user/CoronaRenderer

That section will keep growing over time :)

Another recent series that was very interesting was the "Making of Cake Please" series which has four parts:

Tom Grimes | chaos-corona.com
Product Marketing Manager | contact us

2016-07-14, 15:00:27
Reply #28

alexgabriel

  • Active Users
  • **
  • Posts: 11
    • View Profile
Hello again,

Yes, I couldn't have done it without your help here, that's for sure.

Now I'm waiting for the guy to write back to me, but I can see he's taking his time for some reason.

Also,  thanks a lot for the tutorial, it looks amazing and quite ambitious, although I might start with some basic scenes of interiors or exteriors until I get the hang of everything.

I'll definitely return to the forum if I have anything to clarify.