Archive 17/01/2023.

Custom but advanced render passes

Dave82

Hi ! I have added extra commands to the default renderpath like this :

<renderpath>
    <command type="renderui"/>
    <command type="clear" depth="1.0" />
    <command type="scenepass" pass="ontop"/>
</renderpath>

This way i can render certain models on top of UI elements (showing 3d models inside inventory) So every model which technique has a “ontop” pass defined will be rendere after the ui. The only problem with this is only renders the models bland , (diffuse only ,since it is a scenepass). How could i expand to have specular , normal and light pass after “renderui” ? I could just copy the whole Forward renderpath after this command but that would render again everything twice.

Is there a way to have a post UI render path but to filter which models to render ?

SirNate0

I don’t have a solution to your problem, that will have to come from others, as I have very little experience with the render path. I can suggest an alternate way to accomplish (likely) what you are trying to do, though: render the models to a texture and then display those images in the UI.

dev4fun

Why not Render to Texture?

Dave82

In case theres no other solution i will use rtt. Thinking about this problem and reading the documentation i had an idea : Maybe i could do the opposite ? Render the ui on top as usual and when i show the inventory just render the UI before the 3d models. So let me rephrase the question :
Is there a way to turn on and off various commands in the renderpath ?

EDIT :
OK i have some progress : tagging “rederui” commands in the renderpath as “postUI” and “preUI” and then enable/disable them to achive the desired effect solves the problem. I wonder are there any drawbacks or price to pay for this extremely easy and trivial solution…

tarzeron

Not sure, but maybe you can try rendering scene to View3D and adjust the transparent background.

In RenderPath ToggleEnabled for enabled state of commands and rendertargets by tag.

And check this demo

Dave82

Wow. i wasn’t aware of the 3d UI component. I didn’t tried the latest master in a long long time (i was happy with the 1.7)
Definitely trying this out.