Home Technical Talk

Baking Everything Behind Transparent Materilal into Diffuse?

polycounter lvl 6
Offline / Send Message
Geosmith polycounter lvl 6
Hello.

I've recently come across a scenario where I need to create a game asset with a semi-transparent material with visible wiring underneath.

This wiring isn't deep enough down for very noticeable parallax so I could save on performance by not putting any geometry below the transparent material and instead of having it transparent I could just bake the light from the wires that shines through it into a diffuse map. 

The problem is I'm not sure what application can achieve this. There is the simple way of creating the texture of the wires then slap it onto the transparent material and apply blur and such (which I was planning on doing), but I can only fake so much this way. I can't create refraction or bounced lighting or whatever when all I have is the image. 

I believe my best bet would be with Unreal Engine, making use of some transparent materials and rendering a camera's view to texture. But this would be pretty tedious to set up. I'm wondering if anyone has any ideas on how this could be achieved a little more easily, with something like 3ds max as I can't find a way of doing it.  

Ideally I'd want good control over the transparent material e.g. how much it blurs stuff behind it, how much it refracts and so on. I can't see any options for that kind of stuff in a standard max material, or even how to bake the background onto the plane in the first place. 

Thanks for any help.


Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    I would suggest doing this all withing one shader. Usually cheaper and better quality than alpha blending.

    https://www.google.com/search?q=parallax+cubemap+interior+unreal

  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    That's not my goal. I'm aware of these kind of materials but what I want is just a diffuse map that looks like there was once something behind it. No parallax, no transparency, no fancy materials, no two sets of planes. Just a diffuse. 
  • Eric Chadwick
    Options
    Offline / Send Message
    Ok. Then I would advise showing your current attempt, as well as the reference you are aiming towards. 
  • Eric Chadwick
    Options
    Offline / Send Message
    Also, Bercon Maps has a distortion map that might help you, based on your image above. 
  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    My current attempt is nothing. My goal is to bake the lighting that passes through a transparent material down but I don't know how to achieve this. 

    I can't show my ref, but the image I made describes fully what I'm aiming for. I have a transparent material (in this case window), behind it some details (in this case a landscape) and I want what appears through the window to be baked down into a texture, so there's no transparency required for the landscape to appear on the window. 

    I'm interested in achieving this through some kind of rendering/baking, not texture manipulation and filters. 
  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    Here's another scenario that I've thought of, it's unrelated to what I want but requires something similar to be achieved.
    Something like rubber or thin plastic that can let some light through and have similar effects to subsurface scattering. How could I bake the lighting created by these objects into a diffuse?

    I have a feeling UE could do most of this.
  • Eric Chadwick
    Options
    Offline / Send Message
    Ok then I would recommend using Bercon Distort map on your wires texture, and maybe a Composite to layer on glassy like details. You can right-click any map's preview in Slate or Compact to render it out.
  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    That sounds closer to something I could achieve from texture manipulation with distortion/warping and blurring in Painter or Photoshop. I'm trying to get real refraction and properties of glass or a transparent/semi-transparent material rather than messing around with the base texture. 
  • Eric Chadwick
    Options
    Offline / Send Message
    Then simply set up a camera and realistic materials, and render it out. I'd use V-Ray, but the renderer is up to you.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    @poopipe
    I'm pretty sure again, that's unrelated to what I want.

    @Eric Chadwick
    That just might be the simple solution I need. Though these textures need to be made for complex unwrapped assets, meaning I need the camera to be orthographic and positioned to capture the entire plane and no more or less. That would be really tricky to just eyeball it and get it perfect, not sure if you know of any way to set this up automatically? 
  • Eric Chadwick
    Options
    Offline / Send Message
    Poo had it right. That thread was trying to tackle a similar issue... how do you bake with transparency, given a non-flat topology.
  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    Even if it is the solutions were for Blender, and request was for Maya. I don't know either. 
    I could definitely set up a camera to render this for me like you mentioned. I just need the right camera settings to capture the full plane. 
  • Eric Chadwick
    Options
    Offline / Send Message
    It's not difficult. I've done it many times. Put some info here:
    http://wiki.polycount.com/wiki/Texture_Baking#Transparency
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Theres a maya and arnold solution at the bottom of the thread and references to mental ray solutions as it went on. 

    No offence, but did you actually read it ? 
  • RN
    Options
    Offline / Send Message
    RN sublime tool
    I think refraction and translucency change depending on the position of the eye ("view dependent"). So if you somehow baked them, they would only look their best when seen from the original camera position used when baking them.

    I know you said you don't want realtime effects, but maybe the examples in here can give you some ideas anyway: https://simonschreibt.de/gat/windows-ac-row-ininite/

    One thing i think would help sell the effect is using a simple shader for some fresnel effect: the more you look at the glass from the front, the more you should see the cables. The more you look at it from a grazing angle, the more it should look like a blurry reflection of the environment (from a cubemap or spheremap etc.).
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    To make it look pretty you just need a simple parallax Shader that offsets the uvs of the cable textures based on camera direction and then composites the glass over the top.

    It's not an expensive effect as long as you keep it as simple as described. 

  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    Again I'm not after effects. Think of it as if it were for a mobile game, or for a game from 2004. No transparency, no shader effects, no parallax. Just a diffuse. 

    @poopipe
    Not the first time people come with solutions without reading a post, I read your query and it wasn't related. I want lighting, refraction and properties of glass baked into a diffuse as if I were to look through it and capture what I see, I don't want the actual alpha maps. Even there is some kind of info on this topic there, it's not related to my software. No offence. 

    Anyway this has already been solved with a top-down camera setup, I can customise the transparent material to my liking to get desired effects. At this current stage it looks more like a warped texture but it's just a quick test. 



  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    I know you want a baked solution, which this is not, but visually speaking you want to produce an effect  like this right?

    https://www.dropbox.com/s/7etik2vx4hnr045/windowTest.mp4?dl=0

    I just mocked up that shader in Unity, it's CG, so with a few tweaks it should migrate into Maya's CGFX fairly easily. It's not an ideal solution for an offline renderer though, would that be it's use case? Also like I said, it's not a baking solution, it requires both a foreground image for the window frame and a background image for the information behind it. I could get it to work in Unity with render textures quite easily though, not sure about doing that kind of stuff in Maya...

    Edit:
    Full disclosure I only read the first few posts ;)
  • Geosmith
    Options
    Offline / Send Message
    Geosmith polycounter lvl 6
    Yes it's kind of along the lines of what I'm after. I guess there's a very fine line between what can be rendered through real transparent geometry and what can be made with texture manipulation, even as I come closer to exactly what I was after it looks a lot like something that could easily be mocked up in substance painter.

    I guess the method I'm more after would better be applied to something that isn't flat. Here's a good example I found. The black on the far left can be seen through semi-transparent rubber. This is more along the lines where baking lighting of transparent objects would better used than in my current case. But even this could be fairly easy replicated with texturing with a simple gradient. 


  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    Depends how many edge cases you want to come up with really since there's no one answer to anything.

    You could probably bake the SSS to a diffuse through Arnold or something but I don't trust their baking tools, it's something you may have to custom write. Such unique tools probably don't exist because it's they're for very small cases and don't really come up a lot, and are easy to fake with a little manual work.

    The way your first example gets rendered is completely different to this new one with sub-surface scattering. Light transmittance doesn't physically colour the material it is transmitting through, it just distorts the light from source. Most renderers render physically so it's not like they're mapping lighting to surfaces and rendering that, they're literally firing photons through the scene.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter


    that's a no then.. 

    I'm out. 

Sign In or Register to comment.