Another peculiar object related thing

Started by j meyer, January 24, 2014, 11:36:01 AM

Previous topic - Next topic

j meyer

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.


Dune

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?).

j meyer

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?

Dune

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?

j meyer

Haven't thought of that,but will give it a try for curiosity's sake.

j meyer

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.


j meyer



j meyer

Here you go.
You'll have to assign the image manually in TG.

Kadri

#10

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]

Matt

#11
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
Just because milk is white doesn't mean that clouds are made of milk.

Dune

So I understand I was right after all?
QuoteI would think the object is 4x as big as the PF worldscale is

Matt

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
Just because milk is white doesn't mean that clouds are made of milk.

j meyer

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.