POV-Ray : Newsgroups : moray.win : Material space (local, parent, world) Server Time
29 Jul 2024 06:15:28 EDT (-0400)
  Material space (local, parent, world) (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: Tony Vigil
Subject: Re: Material space (local, parent, world)
Date: 26 Jul 1999 02:05:55
Message: <379BFCE3.335D4C2B@gte.net>
Create a union CSG object adding only the cube.
Then add the texture to the CSG object.  The CSG object is scaled at
<1,1,1>

Paul Johnsson wrote:

> Hello.
>
> I have some troubles when applying a "wood" texture to a object in
> Moray. The object is a simple cube, that is scaled with <10,5,1>.
>
> I have created a very simple wood-texture, and would like to apply this
> texture to the cube, to get a piece of nice wood. This works fine but
> the material is scaled in the same way as the cube <10,5,1> which makes
> it distorted.
>
> I have tried to use the "Space Parent" and this solves the problem with
> the distorted material. But when I translate the cube the material is
> NOT translated if the space is "parent".
>
> Is it possible to "lock" a material posistion to a object, so that the
> material gets translated but NOT scaled...?
>
> I would aprechiate any help on this subject.


Post a reply to this message

From: Tony Vigil
Subject: Re: Material space (local, parent, world)
Date: 26 Jul 1999 02:16:33
Message: <379BFF62.CA7CC048@gte.net>
I forgot to add... Set the CSG's texture coordinates to local.

Tony Vigil wrote:

> Create a union CSG object adding only the cube.
> Then add the texture to the CSG object.  The CSG object is scaled at
> <1,1,1>
>
> Paul Johnsson wrote:
>
> > Hello.
> >
> > I have some troubles when applying a "wood" texture to a object in
> > Moray. The object is a simple cube, that is scaled with <10,5,1>.
> >
> > I have created a very simple wood-texture, and would like to apply this
> > texture to the cube, to get a piece of nice wood. This works fine but
> > the material is scaled in the same way as the cube <10,5,1> which makes
> > it distorted.
> >
> > I have tried to use the "Space Parent" and this solves the problem with
> > the distorted material. But when I translate the cube the material is
> > NOT translated if the space is "parent".
> >
> > Is it possible to "lock" a material posistion to a object, so that the
> > material gets translated but NOT scaled...?
> >
> > I would aprechiate any help on this subject.


Post a reply to this message

From: Bernd M  Jordan
Subject: Re: Material space (local, parent, world)
Date: 26 Jul 1999 19:47:29
Message: <379cf391@news.povray.org>
Another approach would be to scale the texture in the texture editor
appropriately. In your example it would be <.1, .2, 1>. When the object is
scaled <10, 5, 1> the texture ends up with <1,1,1>.
I had trouble with this concept in Moray too but there are ways around it.
Tony's approach definitely works but PoV-Ray needs to create another object
and goes through some initial CSG operations/checks. I guess.

Bernd

Tony Vigil wrote in message <379BFCE3.335D4C2B@gte.net>...
>Create a union CSG object adding only the cube.
>Then add the texture to the CSG object.  The CSG object is scaled at
><1,1,1>
>
>Paul Johnsson wrote:
>
>> Hello.
>>
>> I have some troubles when applying a "wood" texture to a object in
>> Moray. The object is a simple cube, that is scaled with <10,5,1>.
>>
>> I have created a very simple wood-texture, and would like to apply this
>> texture to the cube, to get a piece of nice wood. This works fine but
>> the material is scaled in the same way as the cube <10,5,1> which makes
>> it distorted.
>>
>> I have tried to use the "Space Parent" and this solves the problem with
>> the distorted material. But when I translate the cube the material is
>> NOT translated if the space is "parent".
>>
>> Is it possible to "lock" a material posistion to a object, so that the
>> material gets translated but NOT scaled...?
>>
>> I would aprechiate any help on this subject.
>


Post a reply to this message

From: Tony Vigil
Subject: Re: Material space (local, parent, world)
Date: 26 Jul 1999 19:59:59
Message: <379CF675.15C7F757@emc-inc.com>
This does certainly work.  The only problem is if you have several objects of
different size, all using the same texture.  If you scale the texture to fit
the object that is scaled <10,5,1>, then the other objects will have the same
problem.

Damned if you do, damned if you don't.

"Bernd M. Jordan" wrote:

> Another approach would be to scale the texture in the texture editor
> appropriately. In your example it would be <.1, .2, 1>. When the object is
> scaled <10, 5, 1> the texture ends up with <1,1,1>.
> I had trouble with this concept in Moray too but there are ways around it.
> Tony's approach definitely works but PoV-Ray needs to create another object
> and goes through some initial CSG operations/checks. I guess.
>
> Bernd
>
> Tony Vigil wrote in message <379BFCE3.335D4C2B@gte.net>...
> >Create a union CSG object adding only the cube.
> >Then add the texture to the CSG object.  The CSG object is scaled at
> ><1,1,1>
> >
> >Paul Johnsson wrote:
> >
> >> Hello.
> >>
> >> I have some troubles when applying a "wood" texture to a object in
> >> Moray. The object is a simple cube, that is scaled with <10,5,1>.
> >>
> >> I have created a very simple wood-texture, and would like to apply this
> >> texture to the cube, to get a piece of nice wood. This works fine but
> >> the material is scaled in the same way as the cube <10,5,1> which makes
> >> it distorted.
> >>
> >> I have tried to use the "Space Parent" and this solves the problem with
> >> the distorted material. But when I translate the cube the material is
> >> NOT translated if the space is "parent".
> >>
> >> Is it possible to "lock" a material posistion to a object, so that the
> >> material gets translated but NOT scaled...?
> >>
> >> I would aprechiate any help on this subject.
> >


Post a reply to this message

From: Bernd M  Jordan
Subject: Re: Material space (local, parent, world)
Date: 27 Jul 1999 08:55:31
Message: <379dac43@news.povray.org>
You probably know that you can select the texture in Moray and then scale,
translate, and rotate it without affecting other objects that use the same
texture. It is a little tricky but you have to 'select' the green
representation of the texture in any one of the views. Moray will then show
the Modify tab with the texture name and transformation data. You can now
modify the texture like any other object. The transformation will be local
to that occurance of the texture.

Hope it helps.

Bernd

Tony Vigil wrote in message <379CF675.15C7F757@emc-inc.com>...
>This does certainly work.  The only problem is if you have several objects
of
>different size, all using the same texture.  If you scale the texture to
fit
>the object that is scaled <10,5,1>, then the other objects will have the
same
>problem.
>
>Damned if you do, damned if you don't.
>
--- snip ---


Post a reply to this message

From: Lutz Kretzschmar
Subject: Re: Material space (local, parent, world)
Date: 27 Jul 1999 13:03:26
Message: <379de674.3199390@194.174.214.110>
Hi Bernd M. Jordan, you recently wrote in moray.win:

> It is a little tricky but you have to 'select' the green
> representation of the texture in any one of the views. 
Or you can press Alt-T, which selects the texture of the currently
selected object.

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Tony Vigil
Subject: Re: Material space (local, parent, world)
Date: 27 Jul 1999 17:38:24
Message: <379E26C7.78F6FC07@emc-inc.com>
Lutz,

When you select the texture for the first time, it's scale is set as <1
, 1 , 1> even if your object's scale is set to <10 , 9.5 , 3>.  But that
scale, <1 , 1 , 1>, is set prior to the object being scaled.  So the
actual scale of the texture is in effect <10 , 9.5 , 3>.  It is somewhat
tedious to do the math necessary to reset the texture's scale to a true
<1 , 1 , 1>.

By placing the pre-scaled object without a texture inside a CSG with a
scale set at <1 , 1 , 1> & applying your texture to the CSG, your
original object now has a texture with a true scale of <1 , 1 , 1>.


Lutz Kretzschmar wrote:

> Or you can press Alt-T, which selects the texture of the currently
> selected object.
>
> - Lutz
>   email : lut### [at] stmuccom
>   Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Lutz Kretzschmar
Subject: Re: Material space (local, parent, world)
Date: 28 Jul 1999 07:49:32
Message: <379ebaa9.973069@194.174.214.110>
Hi Tony Vigil, you recently wrote in moray.win:

> When you select the texture for the first time, it's scale is set as <1
> , 1 , 1> even if your object's scale is set to <10 , 9.5 , 3>.  
That is correct and is by design. The default coordinate system of
Local means that when you apply a texture to the object, the texture
must scale, rotate and move with the object (which is mostly what you
want). If you choose 'Global' the texture will be defined in world
coordinates and will not scale, rotate and move with the object. If
you choose 'Parent' the texture will scale, rotate and move with the
parent.

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Tony Vigil
Subject: Re: Material space (local, parent, world)
Date: 28 Jul 1999 13:10:08
Message: <379F3964.74311B49@emc-inc.com>
I'm not sure I understand the difference between 'Global' & 'Parent'.  If I
add a texture to a cube, the wireframe behaves the same way when I set the
texture to 'Global' or 'Parent'.

What is the 'Parent' of the cube in this example?



Lutz Kretzschmar wrote:

> That is correct and is by design. The default coordinate system of
> Local means that when you apply a texture to the object, the texture
> must scale, rotate and move with the object (which is mostly what you
> want). If you choose 'Global' the texture will be defined in world
> coordinates and will not scale, rotate and move with the object. If
> you choose 'Parent' the texture will scale, rotate and move with the
> parent.
>
> - Lutz
>   email : lut### [at] stmuccom
>   Web   : http://www.stmuc.com/moray


Post a reply to this message

From: Lutz Kretzschmar
Subject: Re: Material space (local, parent, world)
Date: 29 Jul 1999 03:02:32
Message: <37a0fc6f.2490220@194.174.214.110>
Hi Tony Vigil, you recently wrote in moray.win:

> I'm not sure I understand the difference between 'Global' & 'Parent'.  If I
> add a texture to a cube, the wireframe behaves the same way when I set the
> texture to 'Global' or 'Parent'.
That is correct. Since the Cube has no parent, the Parent system is
the same as the global system. If you have a nested CSG object and say
on a cube at the 5th level you set Parent, then the cube will use the
coordinate system of the CSG at the 4th level.

- Lutz
  email : lut### [at] stmuccom
  Web   : http://www.stmuc.com/moray


Post a reply to this message

<<< Previous 1 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.