Author Topic: instances, instancing and proxy  (Read 3263 times)

2020-01-14, 16:48:37

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
Hello!

I did some searching of course, but just got more confused about memory management with proxies.

So I'm going to ask some very simple and stupid questions here to clear this out for myself once and for all.


In Corona on 3dsMax I have a thousand identical teapots, do I save any memory what so ever at render time if:

A. all teapots are regular max instances? (as opposed to copies)

B. all teapots are proxy? (all as instances, linking the same .cgeo-file)

C. all teapots generated with forest pack?


2020-01-14, 19:07:54
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
YES, YES and YES. Instancing always saves the memory.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-01-14, 19:23:57
Reply #2

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
Thank you romullus! And no method is better or worse from a memory savings perspective?

And now my trickiest question. Does it make a difference if my cgeo-file is the same, but the objects themselves are not instances in Max? And say I have the same teapot-proxy in a bunch of xrefs, will that increase the memory usage? Because as far as Max knows, they are not instances, but maybe Corona knows it's the same geometry from the same file?

I'm suspecting that a lot of what we do to manage collaboration on huge projects, and also to manage viewport performance, is impacting performance and memory usage at render time in a bad way.


2020-01-14, 19:42:32
Reply #3

mferster

  • Active Users
  • **
  • Posts: 523
    • View Profile
I wouldn't put proxies in xrefs personally, It just adds another layer of complexity that isn't necessary.

Also... as far as I am aware you aren't saving any more memory by having proxies versus regular instances; proxies are just helpful for managing viewport performance.

2020-01-14, 19:49:18
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
And no method is better or worse from a memory savings perspective?

Correct, they should be pretty much the same.

Quote
Does it make a difference if my cgeo-file is the same, but the objects themselves are not instances in Max?

Memory will be taken by each copy. If it's possible, always use instancing. When you use instancing, memory is taken by single entity, plus transformation data for each instance. In this regard, it doesn't matter if it's regular geometry or proxy

Quote
And say I have the same teapot-proxy in a bunch of xrefs, will that increase the memory usage? Because as far as Max knows, they are not instances, but maybe Corona knows it's the same geometry from the same file?

Not sure about xrefs, i almost never use them.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-01-14, 21:19:12
Reply #5

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
I wouldn't put proxies in xrefs personally, It just adds another layer of complexity that isn't necessary.

Oh, we're not doing it for fun :) Working with xrefs is the only way we know to make our work manageable. Both from a collaborate point of view. And for viewport performance. We break things as much as we can. Not all projects are like this. But currently I'm working on a big campus. It's maybe 500x500 m. With parks and a bunch of complex buildings. All being built by different people in different files. And then you xref in what every you need for your current rendering. Or all of it for your aerial shot...

It really makes me wish there was a more game engine like LOD built in to Max at a very fundamental level. So one could have that in mind with the creation of every asset. So Spline steps, number of segments on modifers like extrude, lathe, sweep, chamfer etc and turbosmooth would automatically. Not to mention all these damn trees and plants :( I have tiny flowers that are sometimes in just two meters from the camera, and sometimes 800m. Some sort of LOD on those would be great. For me to manually make LODs and switch them out is impossible right now.

Another thing is managing textures. Someone might create a texture for something they are very near by. And I might render it from a distance where it's all just one flat color. It's hard to manage this, and it get out of hand because of human factors.
Getting an overview of the entire file, with xrefs, where I can see what resolution textures are, would be nice. There are ways in max. But Corona Bitmap doesn't report back texture size to Material Explorer (that I didn't know about until last year). I got that logged as "the most boring feature request ever" ;)

I realise I'm just ventilating now, while my huge files are loading...

Thanks for you replies!

2020-01-14, 22:36:39
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I remember there were talks about plans to make Corona bitmap intelligently manage texture resolution, so maybe one day...
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-01-15, 11:10:22
Reply #7

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 838
  • George
    • View Profile
Hello!

I did some searching of course, but just got more confused about memory management with proxies.

So I'm going to ask some very simple and stupid questions here to clear this out for myself once and for all.


In Corona on 3dsMax I have a thousand identical teapots, do I save any memory what so ever at render time if:

A. all teapots are regular max instances? (as opposed to copies)

B. all teapots are proxy? (all as instances, linking the same .cgeo-file)

C. all teapots generated with forest pack?

I will give my insight on this too. I would say it's highly dependable on what you are trying to achieve, and what's your scene setup.

As previously mentioned proxies will save your 3ds max view-port performance, and keep RAM levels the same as if instances were used.

While X-ref will help the same way it's bothersome that you have no direct control over them in the master scene (as it should be).
George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2020-01-15, 11:45:07
Reply #8

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
While X-ref will help the same way it's bothersome that you have no direct control over them in the master scene (as it should be).

Exactly! And I'm thinking that one way to optimize would be when submitting a scene to a renderfarm (our own or external) that via scripts or manually, merge all xrefs and instanciate all proxies (and other objects) that are the exact same. Which would save some ram at render time. And this is only a problem if you are hitting your ram limit of course! Because human labour is of course the most expensive part.

I wonder if it would be possible for Corona as a render engine to know that proxies that are in different xrefs are in fact the same? Or is this impossible because of the nature of how it works in 3dsMax?


2022-11-07, 21:56:12
Reply #9

ihabkal

  • Active Users
  • **
  • Posts: 253
    • View Profile
Guys I started working at a company where they have like 10 XREF scenes and in each scene they have the same proxy trees. opening the files take 40 minutes. aren't they doing something wrong? from what I understood above even if they are using the same tree it is as if the memory and load as big as 10 trees as it loads 10 times?

2022-11-07, 22:09:17
Reply #10

zaar

  • Active Users
  • **
  • Posts: 66
    • View Profile
Doing something wrong... Well from a user and workflow perspective I think it's correct to work that way. But since it seems the proxies get load independently of each other, there is no memory saved, and if you run out of memory, it is unfortunately the wrong way.

Doesn't seem like it would be impossible to solve this though. But the tast probably falls somewhere between autodesk and the corona dev team.