Author Topic: Image texture and UV map node?  (Read 14189 times)

2017-07-18, 01:34:08
Reply #15

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
You might need the color mapping node?

2017-07-18, 02:28:42
Reply #16

melviso

  • Active Users
  • **
  • Posts: 398
    • View Profile
    • Portfoilo
Color mapping node? Sorry, can't find it in the material editor.

The channel shader does separate the textures into greyscale and it works but the separate rgb node would be more convenient for this as it streamlines the process and cuts down on clutter in the material editor. This is how ue4 does its rgba separation for textures.
The image shows how I attached the nodes. Also wiring from any of the rgb to the amount slot of the mix/math shader doesn't yield the expected result when plugged into diffuse, reflect slots. In Blender cycles, the separate rgb node, works as grayscale when plugged.
In unreal engine, the image texture node has a normal, red, green, blue and alpha slots which can be used. Saves clutter and speeds things up. I am not sure if this can be implemented in Blender though. You also have to stipulate in the image settings in ue4 if the imported image is to be used as mask/grayscale textures. Maybe a tick use as grayscale box in the separate rgb node might do the trick?


2017-07-18, 02:32:29
Reply #17

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
yeah it is possible... it will take some time I am working on it though.

2017-07-18, 02:36:37
Reply #18

melviso

  • Active Users
  • **
  • Posts: 398
    • View Profile
    • Portfoilo

2017-07-18, 02:41:48
Reply #19

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
I meant the Channel shader before sorry.

2017-07-18, 05:00:53
Reply #20

melviso

  • Active Users
  • **
  • Posts: 398
    • View Profile
    • Portfoilo
No problem.

Also it seems the channel shader doesn't work with the bump slot too. It works fine with the diffuse, reflect, gloss slot, mix/math shader as well.

EDIT: The separate rgb node works with diffuse slot, reflect except bump. Using the curve node to crank up the strength of the channel before plugging to mixshader works. It just the bump slot doesn't work with separate rgb or channel shader.
EDIT2: Just an idea. Maybe a bump shader to connect the separate rgb node to with the bump shader node having bump strength parameter?

Appreciate everything you are doing. Thanks :-)
« Last Edit: 2017-07-19, 03:25:39 by melviso »

2017-07-19, 08:50:39
Reply #21

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
v7.4.4 adds in the alpha output on rgb separate.

I can't add it back in on RGB combine.  No can do.

Outputs of RGB separate are now greyscale+alpha+mono outputs.  They work with bump... sometimes need normal shader.

I can't put the bump strenth onto another node, it is part of corona.  You can use the "add" mix node to modify a bump map though.

2017-07-20, 05:13:03
Reply #22

melviso

  • Active Users
  • **
  • Posts: 398
    • View Profile
    • Portfoilo
Thanks a ton blanchg. No worries about the rgb combine.

The bump works now. This is what I am encountering with the normal shader plugged to the bump. It looks very flat. With the plugin direct from the any of the separate slots, all the rgba are displayed in the bump instead of one. I have attached a texture map with different textures packed into the different channels along with the screengrabs. Pls feel free to use it in your test.


Hope I am not bothering you. No worries about the bump shader. I kinda suspected that wasn't possible. Thanks again :-)

2017-07-20, 22:28:54
Reply #23

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
Thanks,

All this is speculation from observation :)

It appears the bump input is special and directly accesses the Image Texture node bypassing all other nodes except Normal node and Mix node using the "Add" function.

The normal node expects an actual normal map not a height map which is why it looks flat as the RGB indicates normal direction (this is also the reason why they look blue as most normals tend to be close to X,Y,Z = 0, 0, 1 = R, G, B).

So looks like you can't encode a heightmap into one of the image channels and use it.

When you made your image did you edit the channels directly or did you use different layers and flatten them.  If it was via layers ensure that the layer blend mode is set to "screen" or it will damage the color channels.

2017-07-21, 01:18:33
Reply #24

melviso

  • Active Users
  • **
  • Posts: 398
    • View Profile
    • Portfoilo
I edited the channels directly. using the separate rgb node works in the diffuse, reflect slot with the texture. I used the normal shader because you mentioned ''..sometimes need normal shader.'' So I was of the assumption that in order to use the separate rgb node with the bump sometimes it might require the normal shader if does not work kinda like a hack to get it working.

Yeah, appears bump map cannot work with separate rgb nodes in corona. I wonder why this works in Cycles though. Is this how Corona core was written?

Thanks for the nodes you added. Appreciate it :-)

2017-07-21, 01:23:13
Reply #25

blanchg

  • Moderator
  • Active Users
  • ***
  • Posts: 414
    • View Profile
    • Blender exporter for Corona
Yes all of the nodes available are from Corona core or a combination of the ones provided by Corona.


2017-07-21, 01:32:06
Reply #26

melviso

  • Active Users
  • **
  • Posts: 398
    • View Profile
    • Portfoilo
Ok. It would have been nice to pack into the channels and use in bump slot. Unfortunately that isn't possible.
No worries. Will have to paint each bump map and use as separate images.

Thanks.

« Last Edit: 2017-07-21, 07:01:43 by melviso »