« Return to Thread: Shader Preview Panel Dev Question

Re: Shader Preview Panel Dev Question

by appleGuy :: Rate this Message:

Reply to Author | View in Thread

Hi Guys,

Right I have got the File IO part done (using k3d IO of course) -> Needs
to be a bit more robust but will do for now.

The next stage is getting a render (initializing an external render
engine) done using a geometry object.

Now I think the best way of doing this, is to create a new document (one
you wont be able to play with). this document will set up with the
geometry and camera specifics etc. Then k3d render facilities will be
called using the document and the chosen render engine (rEngine
selection bit done).

Put simply can I do this.. create a new document? ... Is this the best
way?.. I could go the root of creating render input files etc, but thats
a lot of work to cover all k3d supported render engines. I may as well
use stuff already provided.

Cheers
Alex

>
> 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

LightInTheBox - Buy quality products at wholesale price