Dirk Reiners wrote:
        Hi Allan,

On Fri, 2005-10-28 at 12:44 +0200, Allan Rasmusson wrote:

Hi.
I've produced some volume renderings which needs to be printed on paper. For this I needed to invert the greyscale of the volume rendering. See http:www.daimi.au.dk/~alras/ArtTest4.png for clarification. I haven't found any way to change the blendfunc in the VolRen library besides hardcoding it in OSGBrick.cpp. Is there another way to do this?


That link didn't seem to work,

The url is correct besides the two slashes I forgot:

http://www.daimi.au.dk/~alras/ArtTest4.png

There's been some server upgrades so your timing may have been off. Please try again.

but in general there is no way to change
the blendfunc, as it is necessary for the blending math. What would you
want to change it to? Subtractive Blending?

I'm using glBlendFunc(GL_ZERO, GL_ONE_MINUS_SRC_ALPHA); (at line 1578 in OSGBrick.cpp)

One idea would be to create a normal image, copy it into a texture and
use a little shader to invert the resulting image.

I've been thinking about this solution as well. It just seemed at bit overkill, but I think I will try it.

Or if it's just a
single image for a publication, you could just invert the image file.

This was the first solution, but it's just way to cumbersome. It is very difficult to have an idea of the final image when changing the LookupTable just a bit. A real-time solution is definitely needed.

or
you could just change it in OSGBrick.cpp and make it dependent on an
environment variable.

I find this a bit of a clumsy hack. I don't like a solution where one needs to edit the source of a newly download OpenSG version. (I'm sure you are NOT going to put hacks like this in the cvs :-)

Anyway, thanks for clarifying.

/Allan
-------------------------------------------------------------
From the Meaning of Liff by Douglas Adams:

        Corriemuchloch (n.)
        Word describing the kind of person who can make a complete mess
        of a simple job like walking down a corridor.



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to