Render Iter not working in gpu mode

Hi chaos people,

it seams that render iter. is not working when im doing ipr in gpu mode. It does work in cpu.
also turn off in viewport does not seam to be working when rendering.

One last point, in my opinion, when starting ipr or production rendering, the mesh in the viewport should stay at its lowest polycount and not be switching to a higher polycount. I never understood this way of working in vray.

GPU IPR renders what is seen in the viewport, that’s why.

EDIT: Turns out there’s an option for this called “Use render state in IPR”. It’s located here: (Render Setup > V-Ray > IPR Settings). It will do exactly what you’d like.

What do you mean here?

This is also expected, and it is how CPU IPR works. I guess something similar could happen on the GPU, too. You can log it in the ideas portal.

EDIT: Yavor will comment soon with more in-depth info about the matter.

Hello,

That would be a bit long but.. :slight_smile:

This is all related to a general 3ds Max issue - 3ds Max more or less assumes that you are either rendering or in the viewport.
When someone needs geometry from some object it can ask - give me your current geometry and there is no way to specify what do you need it for. The object itself decides if it should return the viewport or render geometry.

The renderer has ways to notify all objects in the scene that rendering begins and when it ends. The renderer sends that notification, goes trough all objects and gets their geometry. The scene is rendered and then the renderer sends render end notification. While rendering production - the viewport is not regenerated so no issues.

When viewport regenerates - it uses the same way to get geometry from objects. Since that happens outside of the render begin/render end notifications objects know to return the viewport representation.

To conserve memory most objects do not store both states in memory. When the scene is opened objects build their viewport representation. When rendering begins they build the heavier render meshes and then when rendering ends they free those meshes and go back to the viewport ones. V-Ray CPU renderer also tries to be conservative and tries to directly use the meshes we get from Max where suitable..This means that switching between the two is not quick and easy..

Interactive rendering makes everything more complicated - you are both rendering and using the viewport.

We first had the GPU interactive rendering (ActiveShade ages ago:)) - we decided to only use the viewport representation as it is faster and more interactive. GPU interactive rendering does not send the render begin/end notifications so geometry stays in low polycount..

Then we made the CPU interactive rendering. For it we wanted to keep everything as similar to production rendering as possible. So CPU interactive notifies object about render begin when you start interactive and when you stop it - it notifies about render end. One consequence of that is that if viewport is regenerated while IPR is running - you see high polycount meshes.

One final fairly recent change for GPU - “Use render state in IPR”.
To get meshes to the GPU we need to get them from Max, convert them to something suitable for GPU and upload them there - we are not so tied to the Max meshes as in CPU. So we made sort of a workaround - the “Use render state in IPR” option. When it is On we send render begin notification, get the meshes and upload them to GPU and then send the render end notification. If the geometry is not too complex that happens very quick and the viewport does not update to show high poly count objects..

Best regards,
Yavor

Thank you Hermit, and thank you Yavor! That is some in depth knowledge right there. I Appreciate your valuable time.
Hermit, turn off in viewport, you can right click a modifier, you can say turn off in viewport, it will only be used while rendering.

If I may add, I am having some real issues with uvw randomizer and triplanar maps in gpu. It works for diffuse, roughness etc but it will not work when using vray displacement modifier. Is this a known issue?

No issues on a simple scene with that setup. Mind if you attach (or send) the scene?

Dear Hermit, I apologize for this late reply.

https://youtu.be/ZKlJPOvkmZc the issue.

the file

Okay, I managed to reproduce it, and it turns out we already have it logged (originally reported for V-Ray for Maya: VMAYA-11675: Wrong Normals when object has Triplanar mapped displacement in GPU). Will add a bump on your behalf.

Appreciated!