|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
The density tag can be used with the colormap to render each voxel with
a differenct color depending on the density. I want to add another
parameter like temperature to each voxel in deciding its color.
Can somebody give me some initial guidelines as to how to proceed with this
idea. I am a new developer on povray, hence I dont have much idea of the
structure of the code..
Thanks a lot,
Regards,
Maurya
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hello Maurya,
Maurya wrote:
> The density tag can be used with the colormap to render each voxel with
> a differenct color depending on the density. I want to add another
> parameter like temperature to each voxel in deciding its color.
>
> Can somebody give me some initial guidelines as to how to proceed with
> this idea. I am a new developer on povray, hence I dont have much idea of
> the structure of the code..
I'm by far not an expert in POV-Ray code, so others should correct me if I'm
wrong. To the best of my knowledge, you should change the following:
- Add the necessary data types to the Media_Struct in frame.h
(e.g. a pointer to a pigment)
- Initialize your additional data fields in Create_Media in media.cpp
- Make sure memory is freed in Destroy_Media in media.cpp (if necessary)
- Copy your data in Copy_Media in media.cpp
- Add code to parse your extension in Parse_Media in parstxtr.cpp
- If you add new tokens, declare them in parse.h and define them in
tokenize.cpp
- In sample_media in media.cpp the color is computed according to
extinction, scattering, and emission. Make the changes you have in mind
here.
Best regards
Thomas
--
aaa := ira
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
in news:web.3f3ab9a392153c77b248b4cf0@news.povray.org Maurya wrote:
> Hi,
> The density tag can be used with the colormap to render each voxel
> with a differenct color depending on the density. I want to add
> another parameter like temperature to each voxel in deciding its
> color.
Maurya
Could you tell a bit more of what your exact goal is, as I have the
feeling that it may not be needed to patch POV-Ray but that it can be done
in SDL directly. Read for example the help file section "6.8.3.4 Multiple
Density vs. Multiple Media". This can give you the possibility to use one
'density' to control the density and an other, representing a temperature
distribution, to control the color.
Ingo
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <web.3f3ab9a392153c77b248b4cf0@news.povray.org>,
"Maurya" <mau### [at] hotmailcom> wrote:
> The density tag can be used with the colormap to render each voxel with
> a differenct color depending on the density. I want to add another
> parameter like temperature to each voxel in deciding its color.
As described, you don't need to modify POV. Just preprocess your density
files to include the temperature as part of the color. The render will
be faster, and you won't have to mess around with adding code to an
already large and complex system.
--
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christopher James Huff wrote:
>In article <web.3f3ab9a392153c77b248b4cf0[at]news.povray.org>,
> "Maurya" <mau### [at] hotmailcom> wrote:
>
>> The density tag can be used with the colormap to render each voxel with
>> a differenct color depending on the density. I want to add another
>> parameter like temperature to each voxel in deciding its color.
>
>As described, you don't need to modify POV. Just preprocess your density
>files to include the temperature as part of the color. The render will
>be faster, and you won't have to mess around with adding code to an
>already large and complex system.
>
>Christopher James Huff <cja### [at] earthlinknet>
>http://home.earthlink.net/~cjameshuff/
>POV-Ray TAG: chr### [at] tagpovrayorg
>http://tag.povray.org/
>
Actually I need to add the temperature tag because I dont want to
use the linear interpolation in the color map. However I have changed the
code and added my temperature tag to it that uses the temperature_file tag
to read data and uses the blackbody radiation to compute the color!
Thanks,
Maurya
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Maurya" <mau### [at] hotmailcom> wrote in message
news:web.3f46c6586888b68bc22240400@news.povray.org...
> Actually I need to add the temperature tag because I dont want to
> use the linear interpolation in the color map. However I have changed the
> code and added my temperature tag to it that uses the temperature_file tag
> to read data and uses the blackbody radiation to compute the color!
> Thanks,
> Maurya
You could still do it by generating a color map of 256 entries, spaced as
you desire (and the linear interpolation would only be used between them,
making it much more accurate). Something like lookup tables for sin, cos,
sqrt, etc. Populate it with accurate values, and interpolate between them.
...Chambers
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |