POV-Ray : Newsgroups : povray.binaries.images : Applying textures to a spherical heightfield section afterwards? : Re: Applying textures to a spherical heightfield section afterwards? Server Time
20 Apr 2024 09:28:29 EDT (-0400)
  Re: Applying textures to a spherical heightfield section afterwards?  
From: Jörg "Yadgar" Bleimann
Date: 13 Sep 2020 22:36:55
Message: <5f5ed747$1@news.povray.org>
Hi(gh)!

On 12.09.20 15:05, Bald Eagle wrote:
> =?UTF-8?Q?J=c3=b6rg_=22Yadgar=22_Bleimann?= <yaz### [at] gmxde> wrote:
> 
>> According to the official 3.7 tutorial, the texture/pigment statement
>> still has to be part of the original mesh2 definition -
> 
> The _NAME_ of the texture does - which can be defined in the pov file that then
> includes your mesh2.

O.k., I tried this - with the following code in my mesh2 generator 
replacing the texture_list:

// begin code

   #write (ES, concat("  uv_vectors\n",
		     "  {\n",
		     "    ",str(NumUVVectors, 1, 0),"\n"))
   #for (a, 0, ydim-1)
     #for (b, 0, xdim-1)
       #write (ES, concat("<", str(b*(1/xdim), 1, 6), ",", 
str(a*(1/ydim), 1, 6), ">"))
       #if (a < ydim-1 & b < xdim-1)
	#write (ES, ",")
       #end
       #write (ES, "\n")
     #end
   #end
   #write (ES, "  }\n")

// end of code

But, depending on whether I set the #for loop limits and the #if 
condition for the last vector to ydim-1, xdim-1 or ydim-2, xdim-2, I 
either get "Texture index out of range" or "Expected 'numeric
  expression', } found instead". What goes wrong?

See you in Khyberspace!

Yadgar


Post a reply to this message

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