POV-Ray : Newsgroups : povray.programming : Primitive BOX, how to wrap a texture? Server Time
4 Oct 2024 13:25:45 EDT (-0400)
  Primitive BOX, how to wrap a texture? (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Mike Miller
Subject: Re: Primitive BOX, how to wrap a texture?
Date: 12 Nov 2023 14:25:00
Message: <web.6551257679784ca8f22cdb33dabc9342@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Mike Miller" <mil### [at] gmailcom> wrote:
>
> > What! ...cubic pattern.
> > Does it work with image maps? I'm guessing so, since it references textures.
> > Must try out. I have an architectural project that could benefit.
> > Thanks, Mike.
>
> :D
> I know, right?   POV-Ray has SO much stuff that it's difficult to even keep
> track of it all, let alone document it, or implement it.
>
> Maybe check out this thread for starters:
>
>
https://news.povray.org/povray.binaries.images/thread/%3C5a6748f8%241%40news.povray.org%3E/
>
> - Bill

Thanks so much, ...good stuff.
I will investigate further.
Mike


Post a reply to this message

From: GioSeregni
Subject: Re: Primitive BOX, how to wrap a texture?
Date: 12 Nov 2023 15:40:00
Message: <web.6551376d79784ca8d0d0a7c459126100@news.povray.org>
Well thanks to all!
Anyway here is how my parser works and writes on the parametric block that I
manage from AutoCAD in lisp.
Obviously the texture is unique, but as you can see it can also be easily edited
by hand.
I was hoping there was an automatic system, but this works anyway.
Just fix the proportions of the AutoCAD block as it is drawn...

global_settings {max_trace_level 3 assumed_gamma 1.5}
//#include "AI.inc"
camera {location<7.9629,2,0.7854>
//_________________________________________________
 right<1.3333,0,0>direction<0,0,1>look_at<7.1311,1.5000,4.7948>
}
union {
polygon{5,<-.5,0,-.5><-.5,0,.5><.5,0,.5><.5,0,-.5><-.5,0,-.5> scale<2,0,1>
 texture {pigment {image_map {png "120ROMANO"}  scale 1.20 rotate<90,0,0> }}}
polygon{5,<-.5,1,-.5><-.5,1,.5><.5,1,.5><.5,1,-.5><-.5,1,-.5> scale<2,0,1>
 texture {pigment {image_map {png "120ROMANO"}  scale 1.20 rotate<90,0,0> }}}
polygon{5,<-.5,0,.5><-.5,1,.5><.5,1,.5><.5,0,.5><-.5,0,.5> scale<2,0,1>
 texture {pigment {image_map {png "120ROMANO"}  scale 1.20 rotate<0,-0,0> }}}
polygon{5,<-.5,0,-.5><-.5,1,-.5><.5,1,-.5><.5,0,-.5><-.5,0,-.5> scale<2,0,1>
 texture {pigment {image_map {png "120porfido"}  scale 1.20 rotate<0,0,0> }}}
polygon{5,<-.5,0,-.5><-.5,1,-.5><-.5,1,.5><-.5,0,.5><-.5,0,-.5> scale<2,0,1>
 texture {pigment {image_map {png "120ROMANO"}  scale 1.20 rotate<0,-90,0> }}}
polygon{5,<.5,0,-.5><.5,1,-.5><.5,1,.5><.5,0,.5><.5,0,-.5> scale<2,0,1>
 texture {pigment {image_map {png "120ROMANO"}  scale 1.20 rotate<0,-90,0> }}}
finish {ambient(0.7*AmbientFact) diffuse .8 phong .8 phong_size 25}
rotate<0,320.0000,0> translate<7.0860,0.0000,4.7616>
}

light_source{<-10,10,-10> colour rgb 1
}
//sky_sphere {DAYSKY}


Post a reply to this message


Attachments:
Download 'drawing1.png' (185 KB)

Preview of image 'drawing1.png'
drawing1.png


 

From: GioSeregni
Subject: Re: Primitive BOX, how to wrap a texture?
Date: 12 Nov 2023 16:05:00
Message: <web.65513db479784ca8d0d0a7c459126100@news.povray.org>
NOTE
Everything works in the metric system. The block cube is m.1x1x1
In this way if I choose X=1.65 the block will be 1.65 meter wide
The origin MUST be at the center to aid transformations and translations.
Textures are calibrated with the file name. In this case the pictures are large
m.1.20x1.20. In this way the size is transcribed in the pov file, and, since the
file is not "once", the texture is repeated by PovRay as much as necessary.
BR
G.


Post a reply to this message

From: William F Pokorny
Subject: Re: Primitive BOX, how to wrap a texture?
Date: 12 Nov 2023 23:04:13
Message: <6551a03d@news.povray.org>
On 11/12/23 09:49, Mike Miller wrote:
> There is no 'box' mapping in POV.

Not to PILE ON :-)... There are at least five (six in yuqk) and probably 
more, but as Bill W. pointed out many require a special images for the 
inbuilt mapping.

Somewhere, I have a couple of user_defined cameras for creating the 
standard map forms for use with the inbuilt three box mapped methods. 
The second, more complicated camera tries to create images which should 
stand up better where users turn on interpolation.

Today, image interpolation at the edges of the standard box image 
folding cut out often introduces artifacts(a).

See:

https://wiki.povray.org/content/Reference:UV_Mapping

---
(a) You have used other render tooling, yes? If so, do you know how 
those tools handled interpolation of the images at the edges of the cut 
out regions for different parts of a uv mapped mesh?

Do they not use interpolation at all?

Are the images cut out regions created with extra buffer pixels to 
enable clean interpolation (smoothing) on the fly?

Or, do they just use really high resolution images for uv mapping so 
interpolation doesn't much matter and so they don't use it? If yes, I 
might guess by avoiding interpolation while rendering and on every 3D 
reach into the image map, they are gaining some performance this way?

This last I ask because I see POV-Ray folks often using interpolation 
with image maps used with uv mapping and I wonder if we should not be 
creating per-interpolated versions at higher resolutions for repeated 
rendering?

Bill P.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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