« Return to Thread: Shader Preview Panel Dev Question

Re: Shader Preview Panel Dev Question

by Timothy M. Shead :: Rate this Message:

Reply to Author | View in Thread

Alex Curtis wrote:

> I think the best way of doing this is to create nodes such as camera,
> geometry during the creation of the panel.. Then remove these nodes from
> the current document when the panel is closed. This way I can use the
> same document.
>
> Then the shader preview render can use this camera and geometry. I might
> even create a render engine node.. another question: where in the source
> is the renderman engine node. Not the actual render_engine (aqsis etc)
> but the node that holds a selected render engine, resolution etc
>
> If this is a good idea. How do i go about creating these nodes like a
> new camera and a new quadratic object.. Maybe im not thinking straight
> because it is late :(
>  
Yep, this is the right approach.  I'd make one refinement, which is that
you should only create the preview-related nodes when you need them, not
when the panel is created, and you don't need to delete them when the
panel is closed.  That way, users can make changes to them and have them
persist across sessions.

See modules/renderman/render_engine.cpp for the RenderManEngine node
that encapsulates parameters that are standard across different
implementations.

See modules/renderman_engines for the implementation-specific nodes that
handle shader-compilation and final rendering.

You can simply use the k3d::plugin::create() overloads to add nodes to a
document.

Cheers,
Tim


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