POV-Ray : Newsgroups : povray.general : At-render texture blending : Re: At-render texture blending Server Time
30 Jul 2024 02:14:12 EDT (-0400)
  Re: At-render texture blending  
From: Alain
Date: 28 Nov 2009 22:00:06
Message: <4b11e3b6$1@news.povray.org>

> The ships are UV mapped mesh2s exported from Wings3d.
> http://dl.dropbox.com/u/896078/UNH_FII.rar contains one such object and the
> textures that would go on it. http://dl.dropbox.com/u/896078/LoneInty.png is an
> example of the output, though in that the texture had been edited to include one
> of the player colors, while in the rar I have the layers separated
> 
> I believe there is some misunderstanding. I don't have a set of pre-colored
> textures I wish to switch between, that is in actuality just what I'm trying to
> avoid. What I would like to do is tell POV-ray to do something along the lines
> of the following:
> 
> Take texture1, and for the pixels that correspond with white pixels in texture2,
> blend with colorA. Take the resulting image, and for the pixels that correspond
> with white pixels in texture3, blend with colorB. Take the result and use it as
> a texture on an object.
> 
> In this way I could recreate any color choice a player might make for their
> fleet, of which there are 65 thousand options, by only changing some values in
> POV-ray rather than by going into an image editor and doing it by hand for each
> of the several ships I might want to include in the scene.
> 
> 

It's possible to set many variable from the command line options.
You can have a section at the top of the source POV file where you have 
a bunch of #declare where you can set your parameters.
You can have an INI file that sets/choose the desired 
colours/textures/images.
You can use a random stream to chose those same parameters. Great if you 
want a scene with 100 personalised ships. Just use a loop that randomly 
change the colours options for each ship.

You can have a collection of badges and insignas images that can be 
passed that way. A command line set variable, or ini file set variable, 
can then be used to chose a given image to be applied as an image_map.

You can use palleted image format (16 or 256 colours BMP, gif, PNG,...) 
and use a color_map to give any index any new value of your choosing, 
you can even use texture_map and replace specific colour with any 
pattern. Again, you can pass those via the command line.

You can use a few arrays of colours, or textures, and use some variable 
to chose some specific sets.

Toggether, those can enable you to create billions of different 
coulour/texture shemes. How about a differently decorated ship for each 
resident of the planet...?



Alain


Post a reply to this message

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