TheDunadan Posted May 25, 2004 Share Posted May 25, 2004 I want to create an easy to use shader that can be used to do the following: I have created i3d-texture that can either hold float (e.g. density, particleAge..) or vector (e.g velocity...) informations. For rendering output I need a modified version of the VEX 3D TextureFog to allow me not to only affect density but as well, color and possibly alpha of the Shader using the i3d.files. This doesn't seem too difficult really, but I would like to be able to remap things. For instance I want the color to change with it's age and it's stored in a "normalized" form (range 0 to 1). Now I simply want to have a ramp interface to set the colors. The easiest way would be to simply create an image of the ramp and use this in the shader for the remapping part. But I'd very much prefer a more interactive solution. Ideally I could edit the i3d.files with COP's and take advantage of all the nice possibilities that arise from such solution. Does any know if this might be possible to do without the HDK simply using VEX !? Even if this isn't possible: can I access in a VEX shader the output of COPs ? (mainly to use the COP ramp but would be nice to have a more general solution). Any ideas welcome Jens Quote Link to comment Share on other sites More sharing options...
AndrewVK Posted May 25, 2004 Share Posted May 25, 2004 Try something like this: NewCol = ckspline(age, {0,0,0}, 0.0, // First key {.1,.1,.5}, 0.2, // Second key {.5, 5,.8}, 0.5, // Third key {1, 0.8,1}, 0.7, // Fourth key {1, 1, 0}, 1.0); // Fifth key Quote Link to comment Share on other sites More sharing options...
TheDunadan Posted May 25, 2004 Author Share Posted May 25, 2004 Thanks for the idea. Not quite what i had in mind, but I guess this will work well enough. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.