« Return to Thread: Shader Preview Panel Dev Question

Re: Shader Preview Panel Dev Question

by hoako :: Rate this Message:

Reply to Author | View in Thread

Hi Alex!

>
> After some valuable feedback, I have decided to make a start on the
> shader preview panel first.
:-) Thanks a lot!
> At this moment in time all the gui and storage / organisation ground
> work is pretty much there. I am now focusing on the actual process of
> rendering the shader previews and displaying the result.
>
> The only way I can think of doing this is to simply call the renderer.
> store the resulting image in a (possibly hidden) temporary file in the
> k3d working directory. Then source the preview display image from this
> file. Repeating this process every time a shader or shader selection
> changes.
Tim should give you the final word, but I believe this is the way to go.
My best tips:
- Add a material property to the panel so that the user choose manually the
material. Later you may resolve choosing it automatically.
- Add an update button, latter it'll change on properties signals.
- You only need the sphere primitive (Create->Quadrics->Sphere) by now, is the
one that has UV mapping.

Also an interesting challenge is canceling the render when the user change any
material (or press update), but that's not necessary right now. (but you can
start a new render anyway and use the new image)

> What do you guys think? If this way is best, does k3d already have a
> temp directory where I can read and write these renders from?
AFIAK there is an API for calling the temp directory.
../k3dsdk/system.cpp:const filesystem::path get_temp_directory()
In fact, renders go there. On linux
/tmp/k3d-renderman-preview

Cheers!
JoaquĆ­n


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

 « Return to Thread: Shader Preview Panel Dev Question