POV-Ray : Newsgroups : povray.newusers : How to keeping texture after CSG? Server Time
13 Nov 2024 17:48:31 EST (-0500)
  How to keeping texture after CSG? (Message 1 to 5 of 5)  
From: Marc-Hendrik Bremer
Subject: How to keeping texture after CSG?
Date: 24 Jun 2000 15:55:55
Message: <3955124b$1@news.povray.org>
Hi,

I want to model a shield for my guard. I want to make it out of wood-planks
and intersect it in shape. There is the union of the wood-planks (with
individually translated textures) which looses its texture while differenced
or intersected with a sphere. As I read, this is totally normal - but
annoying.
I can't apply the texture after the csg-operation, because it then seems to
be made out of one piece of wood.
Can I keep the "planked" wood-texture in my csg or do I have to mimmic this
with a texture_map (or something like this)?

Thanks,

Marc-Hendrik


Post a reply to this message

From: Chris Huff
Subject: Re: How to keeping texture after CSG?
Date: 24 Jun 2000 16:14:26
Message: <chrishuff-C13BCA.15185324062000@news.povray.org>
In article <3955124b$1@news.povray.org>, "Marc-Hendrik Bremer" 
<Mar### [at] t-onlinede> wrote:

> I want to model a shield for my guard. I want to make it out of 
> wood-planks and intersect it in shape. There is the union of the 
> wood-planks (with individually translated textures) which looses its 
> texture while differenced or intersected with a sphere. As I read, 
> this is totally normal - but annoying.

Just change the order of things a bit...intersect each plank 
individually, texture the resulting intersection objects, and place the 
intersections in the union. In other words, use a union of intersections 
instead of an intersection of a union.
To make things easier, #declare the sphere and use object {sphereName}. 
That way, you don't have to redo every copy of the sphere to make a 
small adjustment. This is also more efficient in some cases, since you 
can choose to only do an intersection/difference on the planks which 
will be affected by it.

Instead of:
intersection {
    union {
        object {Plank texture {...} translate...}
        object {Plank texture {...} translate...}
        object {Plank texture {...} translate...}
        ...
    }
    sphere {...}
}

Do it like this:
#declare MySphere =
sphere {...}

union {
    intersection {
        object {Plank}
        object {MySphere}
        texture {...}
        translate ...
    }
    intersection {
        object {Plank}
        object {MySphere}
        texture {...}
        translate ...
    }
    intersection {
        object {Plank}
        object {MySphere}
        texture {...}
        translate ...
    }
    ...
}

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: How to keeping texture after CSG?
Date: 24 Jun 2000 16:14:33
Message: <395516a9$1@news.povray.org>
In article <3955124b$1@news.povray.org> , "Marc-Hendrik Bremer" 
<Mar### [at] t-onlinede> wrote:

> There is the union of the wood-planks (with
> individually translated textures) which looses its texture while differenced
> or intersected with a sphere. As I read, this is totally normal - but
> annoying.
> I can't apply the texture after the csg-operation, because it then seems to
> be made out of one piece of wood.
> Can I keep the "planked" wood-texture in my csg

Don't use a union, just intersect each part with a sphere.


     Thorsten


Post a reply to this message

From: Marc-Hendrik Bremer
Subject: Re: How to keeping texture after CSG?
Date: 24 Jun 2000 16:56:24
Message: <39552078@news.povray.org>
Hi,

thank you all!

Of course you are both absolute right! That's what you get, when you reuse
code from another scene - you can't see the obvious solution!

Marc-Hendrik


Post a reply to this message

From: Warp
Subject: Re: How to keeping texture after CSG?
Date: 27 Jun 2000 04:25:53
Message: <39586510@news.povray.org>
The easiest solution is to use the cutaway texturing feature of megapov.
I think it does exactly what you want.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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