Global 3d shader in bump channel
Philemo_Carrara
Posts: 1,175
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
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…
Hi Dudu,
*
Which pack ? The ones with the caustics or the one with coral, rocks and plants ?
It's the one with coral, rocks and plants.
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 ?
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...)
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 ?
I mean the local/global switch on the noise shaders (surrounded in red)
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.
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.
Could you explain the difference between Global and Local space, I don't understand ?
Thank you !
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,
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.
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.
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.
Done : #192653 Global space noise function in bump channel
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 ?).