Global 3d shader in bump channel

Philemo_CarraraPhilemo_Carrara Posts: 1,175
edited December 1969 in Carrara Discussion

I don't know, if it's a bug, a feature or mere incompetence, but I not able to have a 3d shader in the bump channel that is set in global space. Doing it in colour or highlight channel works all right, but if I copy/paste it in the bump channel, then nothing, the shader is universally white...
Setting it in local space works all right (but it's not what I'm aiming at, unfortunately).

Does any of you have any clue about that ?

Comments

  • DUDUDUDU Posts: 1,945
    edited May 2015

    Hi Phil!
    Yesterday, I downloaded the pack “Ocean” of Kasjjik on ShareCG in .car format and the textures were in the shader but the objects were invisible.
    I exported one by one in .obj format, then imported and all is OK.
    Why? It's a mystery…

    Post edited by DUDU on
  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969

    Hi Dudu,
    *
    Which pack ? The ones with the caustics or the one with coral, rocks and plants ?

    Hi Phil!
    Yesterday, I downloaded the pack “Ocean” of Kasjjik on ShareCG in .car format and the textures were in the shader but the objects were invisible.
    I exported one by one in .obj format, then imported and all is OK.
    Why? It's a mystery…
  • DUDUDUDU Posts: 1,945
    edited December 1969

    It's the one with coral, rocks and plants.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Is your problem solved ?
    If not, I remember that sometimes it's necessary to select “Color only” instead of “Color + Alpha”.
    Otherwise, can you post the image of your bump Channel ?

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969

    Here are the settings, both in local and global space.
    The point is I want the shader consistant between several meshes, thus the point of using global space.

    The same setting is used in the highlight channel and works perfectly. It's just the bump channel that doesn't work in global space. It's true for all noise shaders (turbulence, noise factory...)

    globalBump.JPG
    1281 x 765 - 241K
    Local_bump.JPG
    1281 x 765 - 253K
  • DUDUDUDU Posts: 1,945
    edited December 1969

    Q: “Global space”, is this what one sees when one is on Top Shader?
    I never used this button…
    If you decrease contrast, what' happen ?

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969

    I mean the local/global switch on the noise shaders (surrounded in red)

    globalBump.JPG
    1281 x 765 - 245K
  • PhilWPhilW Posts: 5,144
    edited December 1969

    It may be that the scaling is very different between the local and global space. Try increasing/decreasing the scale by factors of 10, 100 or even more and see if that brings the bump texture back?

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969

    PhilW said:
    It may be that the scaling is very different between the local and global space. Try increasing/decreasing the scale by factors of 10, 100 or even more and see if that brings the bump texture back?

    Actually, I've got exactly the same setting in the highlight channel and it works. Just to be sure, I've copied and pasted in in the colour channel and it works too. The problem seems to be limited to the bump channel.

  • PhilWPhilW Posts: 5,144
    edited December 1969

    Philemo said:
    PhilW said:
    It may be that the scaling is very different between the local and global space. Try increasing/decreasing the scale by factors of 10, 100 or even more and see if that brings the bump texture back?

    Actually, I've got exactly the same setting in the highlight channel and it works. Just to be sure, I've copied and pasted in in the colour channel and it works too. The problem seems to be limited to the bump channel.

    I have had a chance to try it myself and you are right. I think it is a bug - you should report it.

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Could you explain the difference between Global and Local space, I don't understand ?
    Thank you !

  • Eric WinemillerEric Winemiller Posts: 84
    edited May 2015

    It's an ancient bug or maybe just never implemented feature. When you build a shader, bump just works for UV and local space without any extra work, but if your shader works in global space, no freebie. As a plug-in developer, you have to write your own bump code.

    Most DCG shaders should work in global space (anything written or revised since I started Enhance:C) and I believe Inagoni's Veloute also worked.

    There are some options for getting around it. I seem to remember that Inagoni's Veloute actually had an operator shader that would make global space bump work for shaders where it didn't, but it's been a while since I've used it so I'm not 100% sure. Some of the Shader Ops 2 operators (e.g. Blur, the Multi operators) will correct a global space child as it passes through. If you set the operator to 0 effect or only put one child in the Multi operators, you can get global space bump. For a well UV mapped object, you might be able to export to OBJ and have it generate the texture you built in global space in the color channel.

    Regards,

    Post edited by Eric Winemiller on
  • PhilWPhilW Posts: 5,144
    edited December 1969

    Could you explain the difference between Global and Local space, I don't understand ?
    Thank you !

    In essence, Local space is local to the object. Move the object and the textures move with it, as you would generally expect. In Global space, the texture is relative to the X, Y and Z position in global space and does not relate to the object at all. Therefore if you move the object, the texture will "flow" across its surface - the texture remains in the same place, and just becomes visible where it intersects the object. This is not generally what is needed but can be useful for certain effects.

    I hope that helps.

  • evilproducerevilproducer Posts: 9,050
    edited December 1969

    PhilW said:
    Could you explain the difference between Global and Local space, I don't understand ?
    Thank you !

    In essence, Local space is local to the object. Move the object and the textures move with it, as you would generally expect. In Global space, the texture is relative to the X, Y and Z position in global space and does not relate to the object at all. Therefore if you move the object, the texture will "flow" across its surface - the texture remains in the same place, and just becomes visible where it intersects the object. This is not generally what is needed but can be useful for certain effects.

    I hope that helps.
    I have just recently done some animations using Fractal Noise operators to drive a color gradient and found that even though they were set to Local, I still had texture creep when the figure moved. The only way around it was to set it to UV space.

    Now, I have also used other shader functions that have the Global, Local, UV options, and the Local option worked just as you have described.

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969

    PhilW said:
    Could you explain the difference between Global and Local space, I don't understand ?
    Thank you !

    In essence, Local space is local to the object. Move the object and the textures move with it, as you would generally expect. In Global space, the texture is relative to the X, Y and Z position in global space and does not relate to the object at all. Therefore if you move the object, the texture will "flow" across its surface - the texture remains in the same place, and just becomes visible where it intersects the object. This is not generally what is needed but can be useful for certain effects.

    I hope that helps.
    Hi Dudu,
    PhiW answered before me.
    Local coordinates are the one you can see, for instance, in the vertex editor.
    Global coordinates add translation and scaling.
    I'll just add the reason I need it.
    I've got an object composed of several meshes and I want the shader to be consistent across all objects as if it was one single object. If I shade in each mesh own local coordinates, I don't have continuity.
    The way to avoid that is to export the group as an obj and then re-import it. So, all the different meshes will share the same local coordinates.

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175
    edited December 1969

    PhilW said:

    Actually, I've got exactly the same setting in the highlight channel and it works. Just to be sure, I've copied and pasted in in the colour channel and it works too. The problem seems to be limited to the bump channel.

    I have had a chance to try it myself and you are right. I think it is a bug - you should report it.

    Done : #192653 Global space noise function in bump channel

  • DUDUDUDU Posts: 1,945
    edited December 1969

    Thanks for these explanations.
    Philemo, I have a problem with your last link, it show me a request page on my account (the bug on the forum is continued ?).

Sign In or Register to comment.