POV-Ray : Newsgroups : povray.general : INQUIRY: Wooden Planks Texture Server Time
31 Oct 2024 18:47:28 EDT (-0400)
  INQUIRY: Wooden Planks Texture (Message 9 to 18 of 28)  
<<< Previous 8 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thomas de Groot
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 1 Apr 2018 02:53:32
Message: <5ac081ec$1@news.povray.org>
You may want to look at this too, by Dan Hentschel.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'dh_woodfloor_2.mcr.txt' (11 KB)

From: Bald Eagle
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 1 Apr 2018 11:15:00
Message: <web.5ac0f75b3059e6915cafe28e0@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> You may want to look at this too, by Dan Hentschel.
>
> --
> Thomas

Yes, the whole wood floor thing is just a variation of code from Warp, Hentschel
and deGroot - a respectable POV-Ray law firm.
Plus there was a lot of guidance from a host of people following the WIPs.
Which I suppose ought to be WsIP....
I added a dark sheet to give some definition to the cracks between the boards,
but that was probably the only major attribute that I may have added.

And Sven - I've looked it over, and the actual wood-floor building part isn't
that long at all.   Most of that code is just wood textures.

I'll chisel away at it to see how much I can simplify it, but the actual code is
pretty simple.   It's just a matter of rewriting it so that external textures
can be plugged in.

But thanks for the positive response   :)


Post a reply to this message

From: Bald Eagle
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 2 Apr 2018 18:30:00
Message: <web.5ac2aec83059e6915cafe28e0@news.povray.org>
Probably halfway through it.

One thing I did notice was that using optional in the macro definition allows
you to pass undefined variables to the macro, and there is no error or warning
message of any kind.
Kinda pulled out some hair debugging that.

Not sure how much farther RL will let me get with it today...


Post a reply to this message

From: Thomas de Groot
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 3 Apr 2018 02:43:46
Message: <5ac322a2$1@news.povray.org>
On 1-4-2018 17:14, Bald Eagle wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> You may want to look at this too, by Dan Hentschel.
>>
>> --
>> Thomas
> 
> Yes, the whole wood floor thing is just a variation of code from Warp, Hentschel
> and deGroot - a respectable POV-Ray law firm.

Well, we might consider you as a junior associate, hmm?

> Plus there was a lot of guidance from a host of people following the WIPs.
> Which I suppose ought to be WsIP....

That is the nice thing about POV-Ray.

-- 
Thomas


Post a reply to this message

From: Sven Littkowski
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 3 Apr 2018 05:44:07
Message: <5ac34ce7$1@news.povray.org>
Thanks. Will try to adapt both given examples to what I need. But i
recognize, both versions are solid bodies and not just plain textures.
Will check further...




On 01.04.2018 01:53, Thomas de Groot wrote:
> /************************************************************************
**********
>  Persistence of Vision Ray Tracer Scene Description File
>  File name   : DH_WoodFloor_2.pov
>  Version     : 3.6
>  Description : Macro for making a wooden board floor
>                in version 2 the texture has been changed to a patterned o
ne
>                
>  Date        : October 2004; version 2: 31 March 2008
>  Author      : Dan B. Hentschel
>  Adapted		 : Thomas de Groot (03-2008 & 11-2017)
>  E-mail      : Povray newsgroup
>  
>  Copyright (C) 2004. All rights reserved.
> *************************************************************************
*********/
> 
> // for use with v.3.7:
> // +w640 +h640 +a0.3 +am2 +bm2 +wt6
> // +w800 +h800 +a0.3 +am2 +bm2 +wt6
> //Using UberPOV no_cache; stochastic antialiasing; roughness
> //+w800 +h800 +am3 +a0.01 +ac0.9 +r4 +bm2 +wt6
> 
> //#version 3.7;
> #version unofficial patch 3.71; //UberPOV
> #patch "upov-radiosity-no_cache" 0.1;
> #patch "upov-reflection-roughness" 0.9;
> 
> #ifndef (Standalone)	#declare Standalone = true;	#end
> #include "rand.inc"
> 
> 
> #macro Woodmap1(r,g,b)
>     [0.0, 0.1 color srgb <0.88*r, 0.60*g, 0.40*b>
>               color srgb <0.88*r, 0.60*g, 0.40*b>]
>     [0.1, 0.9 color srgb <0.88*r, 0.60*g, 0.40*b>
>               color srgb <0.60*r, 0.30*g, 0.20*b>]
>     [0.9, 1.0 color srgb <0.60*r, 0.30*g, 0.20*b>
>               color srgb <0.60*r, 0.30*g, 0.20*b>]
> #end
> 
> #macro Woodmap2(r,g,b)
>     [0.0, 0.1 color srgbt <0.55*r, 0.32*g, 0.20*b, 0.100>
>               color srgbt <0.55*r, 0.32*g, 0.20*b, 0.500>]
>     [0.1, 0.2 color srgbt <0.55*r, 0.35*g, 0.20*b, 0.650>
>               color srgbt <0.88*r, 0.60*g, 0.40*b, 0.975>]
>     [0.2, 0.3 color srgbt <0.88*r, 0.60*g, 0.40*b, 0.975>
>               color srgbt <0.60*r, 0.30*g, 0.20*b, 1.000>]
>     [0.3, 0.4 color srgbt <0.60*r, 0.30*g, 0.20*b, 0.100>
>               color srgbt <0.60*r, 0.30*g, 0.20*b, 0.500>]
>     [0.4, 0.9 color srgbt <0.60*r, 0.30*g, 0.20*b, 0.650>
>               color srgbt <0.88*r, 0.60*g, 0.40*b, 0.975>]
>     [0.9, 1.0 color srgbt <0.88*r, 0.60*g, 0.40*b, 0.975>
>               color srgbt <0.55*r, 0.32*g, 0.20*b, 1.000>]
> #end
> 
> #declare Woodpig1 =
> pigment {
>   wood
>   turbulence 0.04
>   octaves 3
>   scale <0.05, .05, 1>*0.2
> }
> 
> #declare Woodnor1 =
> normal {
>   wood
>   turbulence 0.04
>   octaves 3
>   scale <0.05, .05, 1>*0.2
> }
> 
> #declare Woodpig2 =
> pigment {
>   wood
>   turbulence <0.1, 0.5, 1>
>   octaves 5
>   lambda 3.25
>   scale <0.15, .5, 1>*0.2
>   rotate <5, 10, 5>*0.05
>   translate -x*2
> }
> 
> #declare Woodnor2 =
> normal {
>   wood
>   turbulence <0.1, 0.5, 1>
>   octaves 5
>   lambda 3.25
>   scale <0.15, .5, 1>*0.2
>   rotate <5, 10, 5>*0.05
>   translate -x*2
> }
> 
> #declare floor_sd=seed(12);
> 
> //=======================
=========================
========================cha
nged by TdG
> #macro wood_floor_texture(r,g,b,Tscale)
> #if (simple_blocks)
>   pigment { color srgb <0.88*r, 0.60*g, 0.40*b> }
> #else
>   #local tex_scale = (0.8 + rand(floor_sd));
>   #local tex_rotate = RRand(-0.5, 0.5, floor_sd);
>   #local tex_translate = rand(floor_sd)*5;
>   #local WM1 = color_map {Woodmap1(r,g,b)};
>   #local WM2 = color_map {Woodmap2(r,g,b)};
>   
>   #local WoodLayer_dull =
>   texture {
>     pigment { Woodpig1  color_map { WM1 } }
>     normal {Woodnor1}
>     finish {
>       specular 0.05
>       roughness 0.003
>       ambient 0
>       diffuse 0.4
>     }
>     scale tex_scale
>     rotate tex_rotate
>     translate tex_translate
>   }
>   texture {
>     pigment { Woodpig2  color_map { WM2 } }
>     normal {Woodnor1}
>     finish {
>       specular 0.05
>       roughness 0.003
>       ambient 0
>       diffuse 0.4
>     }
>     scale tex_scale
>     rotate tex_rotate
>     translate tex_translate
>   }
>           
>   #local WoodLayer_shiny =
>   texture {
>     pigment { Woodpig1  color_map { WM1 } }
>     normal {Woodnor2}
>     finish {
>       specular 0.9
>       roughness 0.005
>       ambient 0
>       diffuse 0.6
>     }
>     scale tex_scale
>     rotate tex_rotate
>     translate tex_translate
>   }
>   texture {
>     pigment { Woodpig2  color_map { WM2 } }
>     normal {Woodnor2}
>     finish {
>       specular 0.9
>       roughness 0.005
>       ambient 0
>       diffuse 0.6
>     }
>     scale tex_scale
>     rotate tex_rotate
>     translate tex_translate
>   }
>           
>   #local Patterned_wood =
>   material {
>     texture {
>       pigment_pattern {
>         wood
>         turbulence 0.04
>         octaves 3
>         scale <0.05, .05, 1>*0.1
>         pigment_map {
>           [0.0   color rgb <0.0, 0.0, 0.0>]
>           [1.0   color rgb <1.0, 1.0, 1.0>]
>         }
>         scale  <0.2, 2.5, 0.2>*0.2
>       }
>       texture_map {
>         [0.0   WoodLayer_dull]
>         [1.0   WoodLayer_shiny]
>       }
>     }
>   }
> 
>   material {Patterned_wood scale Tscale}
> #end	//of if
> #end	//of macro
> 
> #macro wood_floor(board_spacing, board_width, board_length, nails, floor_
left, floor_right, floor_start, floor_end, Tscale)
>     union {
>         #local x_pos = floor_left;
>         #while (x_pos < floor_right)
>             #local rd = RRand(0, 99, floor_sd);
>             #local rd2 = 0;
>             
>             #while (rd2 <= rd)
>               #local rd = RRand(0, 99, floor_sd);
>               #local floor_rd = seed(rd);
>               #local rd2=rd2+1;
>             #end
>             
>             #local first_board = RRand(board_length*0.1, board_length*1
,floor_rd);
>             
>             #local z_pos = floor_start;
>             
>             #while (z_pos <= floor_end)
>                 #local board_lighten = rand(floor_sd)*0.3+0.85;
>                 
>                 #if (first_board | 0)
>                     box {
>                         <x_pos, -1, z_pos>
>                         <x_pos+board_width, 0, z_pos+first_board>
>                         wood_floor_texture(
>                             (rand(floor_sd)*0.1+0.95)*board_lighten,
>                             (rand(floor_sd)*0.1+0.95)*board_lighten,
>                             (rand(floor_sd)*0.1+0.95)*board_lighten,
>                             Tscale
>                         )
>                     }
>                     #local z_pos = z_pos + first_board + board_spacing;

>                     #local first_board = 0;
>                 #else
>                     #if (z_pos+board_length>floor_end)
>                         box {
>                             <x_pos, -1, z_pos>
>                             <x_pos+board_width, 0, floor_end>
>                             wood_floor_texture(
>                                  (rand(floor_sd)*0.1+0.95)*board_lighten,

>                                  (rand(floor_sd)*0.1+0.95)*board_lighten,

>                                  (rand(floor_sd)*0.1+0.95)*board_lighten,

>                                  Tscale
>                             )
>                         }
>                     #else
>                         box {
>                             <x_pos, -1, z_pos>
>                             <x_pos+board_width, 0, z_pos+board_length>
>                             wood_floor_texture(
>                                  (rand(floor_sd)*0.1+0.95)*board_lighten,

>                                  (rand(floor_sd)*0.1+0.95)*board_lighten,

>                                  (rand(floor_sd)*0.1+0.95)*board_lighten,

>                                  Tscale
>                             )
>                         }
>                     #end //end of if z_pos+board_length
>                     
>                     #local z_pos = z_pos + board_length + board_spacing
;
>                     
>                 #end //end of if first_board
>                 
>            #end //end of while z_pos
>             
>              #local x_pos = x_pos + board_width + board_spacing;
>             
>         #end //end of while x_pos
>     }
> #end //end of macro
> 
> //=======================
=========================
=========================
================
> #if (Standalone)
> #include "rad_def.inc"
> 
> global_settings {
>   assumed_gamma 1.0
>   radiosity {
>     pretrace_start 0.08           // start pretrace at this size
>     pretrace_end   0.004           // end pretrace at this size
>     count 10, 1000                      // higher -> higher quality (1..1
600) [35] note: set to 10 with stochastic antialiasing
>     nearest_count 10, 5               // higher -> higher quality (1..10)
 [5]
>     error_bound 1               // higher -> smoother, less accurate [1.8
]
>     recursion_limit 3             // how much interreflections are calcul
ated (1..5+) [3]
>     low_error_factor .3           // reduce error_bound during last pretr
ace step
>     gray_threshold 0.0            // increase for weakening colors (0..1)
 [0]
>     minimum_reuse 0.015           // reuse of old radiosity samples [0.01
5]
>     maximum_reuse 0.1							// new parameter 3.7 [0.2]
>     brightness 1                  // brightness of radiosity effects (0..
1) [1]
> 
>     adc_bailout 0.01/2
>     normal on                   // take surface normals into account [off
]
>     media off                    // take media into account [off]
>     always_sample off           // turn sampling in final trace off [on]
>     //max_sample 1.0              // maximum brightness of samples
>   }
> }
> 
> plane { y, -0.5 
>   pigment {srgb 0.2}
> }
> 
> sphere {0, 1
>   pigment {srgb <0.733333, 0.733333, 1.00000>}
>   scale 1000
>   hollow
> }
> 
> light_source{<0,100,-100> color srgb 1}
> 
> camera{
>   location<0, 15, -30> 
>   look_at<0, 0, 0>
>   up y
>   right x*image_width/image_height
> }
> 
> #declare do_board_floor = true;
> #declare simple_blocks = false;
> #declare left_wall = -25;
> #declare right_wall = 25;
> #declare back_wall = -25;
> #declare front_wall = 25;
> #declare Tscale = 0.9;
> 
> #if (do_board_floor)
>   object {
>     wood_floor(
>               0.005, 			// board_spacing [0.005]
>               1.5, 				// board_width
>               8, 				// board_length
>               0, 					// nails (not implemented)
>               left_wall,  // floor_left
>               right_wall,	// floor_right
>               back_wall,	// floor_start
>               front_wall,	// floor_end
>               Tscale			// general scaling of final texture
>               )
>     rotate 30*y
>   }
> #else
>   box {
>     <left_wall, -1, back_wall>
>     <right_wall, 0, front_wall>
>     wood_floor_texture(1,1,1)
>   }
> #end
>  
> #end // end of Standalone
> //=======================
=========================
=========================
================

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Sven Littkowski
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 3 Apr 2018 05:49:06
Message: <5ac34e12$1@news.povray.org>
It is actually very easy to give a positive response about that code -
because it really produces as good result.

I will have to look deeper into it. Is it true that it is not just a
texture but solid shape(s)? That would make it harder to apply it to
round or elliptical surfaces. I would have to write extra code for
DIFFERENCES.

I wonder, if the BRICK texture can't be used. Making the white lines
much thinner, black, and very long but reduced width (like planks).
Instead of a red filling comes in a wood texture randomly translated at
width and length to prevent cross-over matching wood grain.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Sven Littkowski
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 3 Apr 2018 05:50:00
Message: <5ac34e48$1@news.povray.org>
I always think, how amazing and sophisticated the POV-Ray scene language is
.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Alain
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 3 Apr 2018 19:37:58
Message: <5ac41056@news.povray.org>
Le 18-04-03 à 05:48, Sven Littkowski a écrit :
> It is actually very easy to give a positive response about that code -
> because it really produces as good result.
> 
> I will have to look deeper into it. Is it true that it is not just a
> texture but solid shape(s)? That would make it harder to apply it to
> round or elliptical surfaces. I would have to write extra code for
> DIFFERENCES.
> 
> I wonder, if the BRICK texture can't be used. Making the white lines
> much thinner, black, and very long but reduced width (like planks).
> Instead of a red filling comes in a wood texture randomly translated at
> width and length to prevent cross-over matching wood grain.
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 

In POV-Ray, it often help to think of textures as big blocks out of 
witch your objects are carved.

All wood textures are immense wooden blocks, and your objects are 
sculpted from that block.


Post a reply to this message

From: Sven Littkowski
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 4 Apr 2018 08:04:58
Message: <5ac4bf6a$1@news.povray.org>
I wonder, if the BRICKS pattern can't be used for this, but instead
specifying pigments (colors), now specifying textures instead.

This would be worth a suggestion to Clipka, as that feature would make
it easy to finally have easily creatable planks in the scenes.

Doing some experimenting on my own, I am wondering if there is a way to
"remote-control" textures in a similar way as MACRO does with objects.
If there is a way to change parameters of a texture, it could allow to
change the lumber-type of an upcoming planks texture without having to
re-declare all the entire thing again as a new texture.

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Bald Eagle
Subject: Re: INQUIRY: Wooden Planks Texture
Date: 4 Apr 2018 13:05:00
Message: <web.5ac505433059e691c437ac910@news.povray.org>
I don't have time to explore any of this right now, but I had my own struggle
with brick at one time.

http://news.povray.org/povray.binaries.images/thread/%3Cweb.53ff722e848b38545e7df57c0%40news.povray.org%3E/?mtop=395272
&moff=10

Maybe playing with of the code there might help you find something that works.


Post a reply to this message

<<< Previous 8 Messages Goto Latest 10 Messages Next 10 Messages >>>

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