Author Topic: Help on Seeing the Interior of a Tube  (Read 1824 times)

2019-11-12, 16:15:59

Byteman3D

  • Active Users
  • **
  • Posts: 91
    • View Profile
I'm working on a medical animation. My particles are supposed to be moving through the small intestine (sort of a tube) and I need to see them from outside. A fully transparent material is not so appealing.

I need a material and/or map type, to keep the concave interior a solid material, but the sides looking at the camera transparent, just like the tube is sliced to half with the slice modifier in 3dsmax. Or some sort of top/bottom material would do the trick but I might be looking for something literally impossible since the tube is not uniform but moves in several direction.

The hemisphere (or hemi-cylinder:)  looking at the camera should be transparent. The other opaque. And the model has thickness.

2019-11-12, 16:33:33
Reply #1

lupaz

  • Active Users
  • **
  • Posts: 954
    • View Profile
A falloff in opacity with away/towards?

2019-11-12, 17:19:57
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12758
  • Marcin
    • View Profile
You could use the Corona Front Back map for this. Just place it in the opacity slot, and if the object has no thickness, it will make one side transparent and the other one solid. It's like the "backface culling" option basically.
Another solution (but slightly more complex) is using the Corona Distance map to drive opacity. You can set it to be black when inside some sort of box object, and then use this box object to cut out some areas of the tube.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2019-11-12, 19:48:40
Reply #3

Byteman3D

  • Active Users
  • **
  • Posts: 91
    • View Profile
You could use the Corona Front Back map for this. Just place it in the opacity slot, and if the object has no thickness, it will make one side transparent and the other one solid.

I actually tried this but my intestine was just black. After your answer, tried once again, this time using a checker map for the front map. I then realized that it actually works but the interior is not illuminated. I think transparent faces cast opaque shadows on the interior faces. Disabled shadow casting of the object and it is no longer black, but I need shadows for an appealing image. Still trying to solve this.

edit: I currently have an hdr map in Corona Environment Slot in Render Settings Window , Scene tab. I've added a sun just incase hdr's might not be casting shadows. It is the same with corona sun.
« Last Edit: 2019-11-12, 19:53:54 by Byteman3D »

2019-11-12, 20:49:08
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8843
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It's possible to do that with front back map, but the lighting is weird, because one side of the surface is invisible to camera and other side is letting light trough, therefore you always get backlighting and that doesn't look good (see attachments). I think it's better to go with fallof in distance blend mode, or even more better with Corona distance map, as it is camera independent.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-11-12, 23:24:30
Reply #5

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 838
  • George
    • View Profile
Don't know if this helps but since it's an animation my first try would be with CoronaCamera Clipping on near, I've put a fast SSS Jam shader from Coronamatlib just added some random displacement for volume to it. Would definitely do better with front/back material as others suggested.

Depending on the background you'll use some SSS could help cheat through the issue
George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2019-11-13, 09:25:23
Reply #6

Byteman3D

  • Active Users
  • **
  • Posts: 91
    • View Profile
Thank you very much indeed for the valuable input. I still couldn't achieve an acceptable result with the Front/Back Map. I've tried it as a mask for Blend Material, too. It seems to work but outer face is black and doesn't let the light through. Disabling shadow casting of object proves that the blackness is the transparent face's shadow. May be it is the interior face that casts shadows.

Eventually I turned to achieve the effect by modelling. Created a loft object with an arc as shape as in the image, turned off banking and this is the result.