Hi,
while testing with objects I came across what follows.
I have a 6 sided object with only one side uv-mapped.
[attachimg=1]
Then i put a Power Fractal between the Parts shader and the Surface shader input
of the object and got this result.
[attachimg=2]
I'm kind of able to explain to myself what happened here and think it's somehow
logical and to be expected.
So I put a Transform shader (tried with both variants) after the PF to make it World
space and got this.
[attachimg=3]
It quadruples the texture image.Why is that?
I have no idea at all.
I think the latter is really world space, and the one before takes the UV mapping as reference for the size of the added PF. If unmapped you see it's cut in a lot more chunks (left pane, top image), wouldn't know why that is, though (nr. of vertices?).
I agree that the PF is world space probably in the last one.
In the second image the PF is applied on a per polygon basis
elsewhere referred to as uv-tiles btw.
But the question is why does the texture image gets quadrupled
by setting the Transform shader to Use world space?
I would think the object is 4x as big as the PF worldscale is...??? Otherwise I don't know. What if you resize it to 1/4?
Haven't thought of that,but will give it a try for curiosity's sake.
In the meantime I've tested Ulcos suggestion,but that didn't work either.
It would have been real odd anyway,from my point of view at least.
The only working solution within TG I've found so far is using an image
map shader as input for the colour function of the default shader instead
of the colour image in the default shader.For the settings see image,please.
[attachimg=1]
There are other ways to solve that problem in the modeler beforehand.
I would consider this effect a bug or at least a glitch or so and that's why
I opened this thread btw.
Is there a NDA for the cube and texture ? :)
Ha ha ha ,of course not!
Do you want it?
Why not. Others could test it too :)
Here you go.
You'll have to assign the image manually in TG.
With image size at 1 the transform shader makes the image like 1 unit (1 meter i think)
and it stays still where it is by default (not sure how to say that better) in the world space of TG3.
So it shrinks to half because your object is 2 meter wide.
If you move the object you will see it better as in the images.
The two ones in the middle are with the same image and transform shader still at world space but this time the image size is at 2 as you tried it yourself.
With UV settings the image size at 1 means that the image should cover the objects UV space 1 time independent of the object size.
You can make the object big as you want but the image will cover the same polygons 1 time.
But when you choose world space it changes of course.
The object is 2x bigger then 1 unit-meter
The last image is with the same object but scaled to half (1x1 meter) and still world scale transform selected with 1 image size .
I think it works as it should so far i see .
[attachimg=1]
In TG3 there are two versions of the Transform Shader. Transform Input Shader and Transform Merge Shader.
In both shaders, enabling "use world space" overrides the supplied UVs and changes the texture coordinates to world space.
When you use the Transform Input Shader you transform the texture space of all shaders that are input via the main input ("input node" input). The new texture space is used by the Power Fractal and the Parts Shader(s) because they are all above the Transform Input Shader. As Kadri explained, the texture map has quadrupled up because the cube is 2 metres wide and two metres tall.
If you want to put the Power Fractal into world space but leave the Parts Shaders to use the original UVs, you can use the Transform Merge Shader. This is equivalent to the old Transform Shader in TG2. This only transforms the texture space for the shaders attached to the "shader" input and merges them with the shaders attached to the main input.
Matt
So I understand I was right after all?
QuoteI would think the object is 4x as big as the PF worldscale is
Well I think it was 2x as big, not 4 (that is, 2x as big as a metre).
But I felt like there was more that needed explaining, particularly why both the fractal and the texture map were affected by the transform, unless I missed the point entirely :-\
Matt
Thanks for your explanation Matt.
As I said before I've tried both variants of the Transform shader.
And the first time I've used the default shader to apply the image
as usual with objects and to my knowledge there is no scaling for
the colour image.
Furthermore I don't think the parts shader is splitable,so I'd have to
run the internal (inside the parts shader) shaders through several
transform merge shaders,which would be pretty cumbersome for an
object with let's say 30-100 different shaders.Especially when you
want to cover the whole object with some procedural texture,which
was my goal here.
Thank you,too,Kadri,I've done your experiments also,the day before
I posted image no.4.But originally it was about the default shader,
mind you.
Thanks again to all of you helping me to understand this better.
Quote from: j meyer on January 28, 2014, 10:14:52 AM
Furthermore I don't think the parts shader is splitable,so I'd have to
run the internal (inside the parts shader) shaders through several
transform merge shaders,which would be pretty cumbersome for an
object with let's say 30-100 different shaders.Especially when you
want to cover the whole object with some procedural texture,which
was my goal here.
Do you want different procedurals on different parts? If you don't, it's simple. You only need to use one Transform Merge Shader to merge the Parts Shader with the procedurals.
If you do want different procedurals on different parts, you can still do this with only one Transform Merge Shader. Duplicate the Parts Shader so that you have one Parts Shader for all of your UV textures and another Parts Shader for your procedurals. Then you merge these two Parts Shaders together with a single Transform Merge Shader.
Matt
The original idea was to cover a model that has a few parts uv mapped
with a dirt layer,but now that you said I could copy the parts shader I
hope to be able to add more than one layer.
Definitely something I will try as soon as possible.
Great,thank you very much!
Quote from: Matt on January 28, 2014, 08:48:53 PM
Quote from: j meyer on January 28, 2014, 10:14:52 AM
Furthermore I don't think the parts shader is splitable,so I'd have to
run the internal (inside the parts shader) shaders through several
transform merge shaders,which would be pretty cumbersome for an
object with let's say 30-100 different shaders.Especially when you
want to cover the whole object with some procedural texture,which
was my goal here.
Do you want different procedurals on different parts? If you don't, it's simple. You only need to use one Transform Merge Shader to merge the Parts Shader with the procedurals.
If you do want different procedurals on different parts, you can still do this with only one Transform Merge Shader. Duplicate the Parts Shader so that you have one Parts Shader for all of your UV textures and another Parts Shader for your procedurals. Then you merge these two Parts Shaders together with a single Transform Merge Shader.
Matt
D'oh...what a simple solution...where is my brain lately.....thanks Matt....
Quote from: j meyer on January 28, 2014, 10:14:52 AM
Thanks for your explanation Matt.
As I said before I've tried both variants of the Transform shader.
And t......................................
mind you.
Thanks again to all of you helping me to understand this better.
I've had some luck scaling textures by inserting a Transform shader between the 2 parts of the Part shader...