PDA

View Full Version : beta test free plugin: renderProxy!


stuh505
09-05-2005, 06:18 AM
Hello,

Please help me test this plugin out by playing around with it.

The purpose of this plugin is to make managing large scenes that have complex geometry much easier. It should not only make this easier, but allow you to actually make scenes that are much larger than your previous scenes -- much the same was as displacements allow you to handle much larger poly counts than you would normally be able to.

renderProxy is a simple tool that will allow you to cache scene objects to disk, removing them from your scene and replacing them with dummy objects that retain the material, transformations, modifiers, etc. When you render, the cached objects are automatically loaded into memory and then unloaded when you return to the scene.

You can duplicate, change the material, or move the proxies around. For instance, if you wanted to have a high poly object repeated many times in the scene, you could proxy the object and then duplicate the proxy...so that your scene is still very light.

Download (v0.4):

http://www.cems.uvm.edu/~sheinric/renderProxies.ms

To install, simply evaulate the script and access it from the custom MAXSCript tools. Also create a folder called "rendercache" in your max root directory.

stuh505
09-05-2005, 04:29 PM
Ok, here are some examples. Try it!!!

1) Start off with an object

http://img338.imageshack.us/img338/637/baseobject17ug.jpg

2) Proxy it. Note that the material is maintained (and could be changed)

http://img338.imageshack.us/img338/393/proxiedbase28qb.jpg

3) Render it!
http://img338.imageshack.us/img338/7577/renderbaseprox155mt.jpg

4) Duplicate it, move them around...and render again
http://img338.imageshack.us/img338/6577/renderdupprox40lc.jpg

5) What about something more difficult, like an object that has stack-dependent modifiers? Here we have a cylinder with mesh select of one face, and face extrude modifier on top...

http://img338.imageshack.us/img338/7933/compbase55hu.jpg

6) It works too

http://img338.imageshack.us/img338/4674/rendercompbase68pu.jpg
'
However, in this case, the object had no material applied so they render as random colors. Therefore you should apply at least a basic colored material.

At any time, you can always bring back the real object(s) to your scene by clicking restore selected.

stuh505
09-05-2005, 06:06 PM
update:

You can now select the format to use for caching, so you can use 3ds if you need to maintain material id's or don't have obj importer/exporter. also made objects renderable by default.

Let me know if you find bugs or have suggestions

charleyc
09-05-2005, 06:56 PM
I am curious what differences this has over the Substitue Modifier? Does it save RAM in the actual render?

stuh505
09-05-2005, 07:41 PM
Basically the only difference is that the substitute modifier stores the cached objects into memory, whereas mine caches them to disk. This means that if you have a lot of different cached objects, using the substitute modifier will eat up memory when youre playing around in the viewports even if you only have it set to display during render. However, the advantage to caching into memory is that there is less time spent preparing geometry in the pre-render, so you get your render result faster. Also, there is less chance of changes between the objects. Basically, the Substitute modifier is better. Too bad I didn't realize the existence of it. Well I tuess it was a good exercise...but so much for the last 12 hours of my life!!!

charleyc
09-05-2005, 07:48 PM
Sorry man, I didn't mean to shoot down your idea. I have used the Substitute modifer quite a bit, and it isn't perfect. One of the issues I have with it is that is seems to unecissarily bloat the scene file size after you render once. This can get out of hand if you are using it for A LOT of high poly objects.

stuh505
09-05-2005, 08:53 PM
Heh, it's ok. I put the download link back up in case you want to try it. The scene size will not change no matter how many objects you want to use, so that's a benefit. When you render, it will take a few seconds to load in the geometry -- with substitute the geom is already loaded so it's a little faster. If you do try it out, let me know if you see the geometry flash in the viewports when you render. It's not supposed to, but it does for me...Im wondering if its just because of my graphics card.

There are a couple limitations.

1) Any object you want to proxy will be stored as a mesh. This means that if it is a special object like Foliage or something, it's going to get converted.

2) The 3ds objects seem to cache a bit faster, and they store material ID's. However, can't cache to 3ds if it has more than 64K vertices, you'll have to use obj format for that.

Matt-Clark
09-05-2005, 10:43 PM
Its an interesting idea, I think the power of this sort of thing comes when intergrated into the rederer itself like Vrays Proxy objects:

"VRayProxy allows you to import geometry from an external mesh at render time only. The geometry is not present in the 3dsmax scene and does not take any resources. This allows the rendering of scenes with many millions of triangles - more than 3dsmax itself can handle"

Here it is rendering 1.9 billion polys: http://www.dtoxx.com/cpnichols_lg.jpg

stuh505
09-06-2005, 01:01 AM
Yup, that's pretty cool...I wonder who's renderfarm produced that in an hour!

charleyc
09-06-2005, 06:08 AM
Actually it renders very quickly as it doesn't take up much RAM at all, which frees it up to render faster. Basically all the geometry is pre calced for the renderer. I have rendered over 80 million fully textured polys with full GI in around 10 min at 1024x768 with VRayProxies. The problem with creating a 3rd party plug for doing this is that each renderer will have its own unique language if you will. I do not think that one conversion method will work for all.

robinb
09-06-2005, 12:02 PM
Nice idea, but it doesn't seem to work too well for me. Firstly, the docs fail to mention you need a folder called 'rendercache' in the root of your max folder. Simple fix. Secondly, when using 3ds format the restored object seemed to come in at a larger size than it was when exported. I guess this is because it's using the preferences last set when something was exported or imported. It seems that 'convert units' was set on the importer. This can be a bit of a problem with either format as the obj exporter might have 'rotate model' unselected or any of dozens of other options that can ruin the scene on import. I don't know how you'd get around this.

Also, neither obj nor 3ds are particularly good formats. 3ds breaks all the verts where there are multiple texture verts on the model and obj doesn't store mat ids. So neither format will actually restore the object to its original appearance which is a fairly serious problem. Looks like you might have to write your own format that stores all the data required. Maybe look at Bobo's BFF format, that should store pretty much anything you'd want. An ascii format like that can be slow to export and import though, which might be a problem.

It would also be more useful if the proxy could be set by the user, so a low res version of the object could be substituted. I see you're planning to make the proxies the same size as the bounding box of the object, that would definitely be better.

Of course ideally it'd only load in the original objects when needed in the render so it'd only load them in when the renderer got to a bucket they are in, or if a shadow from one of the objects would cross the bucket or something. But I guess that has to be be pretty tightly integrated in the renderer and program.

It definitely shows promise, keep up the good work.

stuh505
09-07-2005, 05:00 AM
Ok, I've put up a link to a new version (0.4). This one has a newly designed UI, and several new features. The two biggest new features are that proxies are made in the shape of the bounding box and they can be resized. Second, is that it should be more memory efficient by utilizing reference objects wherever possible, so that it doesn't try to re-load an object that was stored to cache multiple times.

Actually it renders very quickly as it doesn't take up much RAM at all, which frees it up to render faster. Basically all the geometry is pre calced for the renderer. I have rendered over 80 million fully textured polys with full GI in around 10 min at 1024x768 with VRayProxies. The problem with creating a 3rd party plug for doing this is that each renderer will have its own unique language if you will. I do not think that one conversion method will work for all.

Charley, I realize that it may not take up much RAM...but if you have referenced a bunch of high poly objects, they will still be stored in RAM. With my method, it takes up zero ram until you render. I'm not saying mine is better, I'm just saying this is how it is. This plugin that I have made is also completely independent of the renderer, so it doesn't matter what you render with.

Nice idea, but it doesn't seem to work too well for me. Firstly, the docs fail to mention you need a folder called 'rendercache' in the root of your max folder. Simple fix.

Heh, thanks. It's bugs like this that I don't notice since I always had the folder!

Secondly, when using 3ds format the restored object seemed to come in at a larger size than it was when exported. I guess this is because it's using the preferences last set when something was exported or imported. It seems that 'convert units' was set on the importer. This can be a bit of a problem with either format as the obj exporter might have 'rotate model' unselected or any of dozens of other options that can ruin the scene on import. I don't know how you'd get around this.

Also, neither obj nor 3ds are particularly good formats. 3ds breaks all the verts where there are multiple texture verts on the model and obj doesn't store mat ids. So neither format will actually restore the object to its original appearance which is a fairly serious problem. Looks like you might have to write your own format that stores all the data required. Maybe look at Bobo's BFF format, that should store pretty much anything you'd want.

Yep, I'm aware of this. When I started writing this I knew it wouldn't be a PERFECT reference.

An ascii format like that can be slow to export and import though, which might be a problem.

Hmm, might be able to read binary through MAX SCript also...have to check on it...but I don't plan on writing a new format anyway. I will look into seeing if I can read/write max files though...


It would also be more useful if the proxy could be set by the user, so a low res version of the object could be substituted. I see you're planning to make the proxies the same size as the bounding box of the object, that would definitely be better.

The proxies are now set to be the size of the bounding box. In addition, you squash/strethc the boudning box and choose to have this affect the render or not.

Of course ideally it'd only load in the original objects when needed in the render so it'd only load them in when the renderer got to a bucket they are in, or if a shadow from one of the objects would cross the bucket or something. But I guess that has to be be pretty tightly integrated in the renderer and program.

It definitely shows promise, keep up the good work.

Well, it does only load them at render. But it's not integrated into the renderer, and never will be. Thanks for the feedback

charleyc
09-07-2005, 05:37 AM
...Charley, I realize that it may not take up much RAM...but if you have referenced a bunch of high poly objects, they will still be stored in RAM. With my method, it takes up zero ram until you render. I'm not saying mine is better, I'm just saying this is how it is. This plugin that I have made is also completely independent of the renderer, so it doesn't matter what you render with.
...

I mean that they take up almost no RAM while rendering. They don't really exist at all in the scene prior to rendering, only as a visual placeholder, similar to a Helper object. They are really amazing things. However, you do pay for the added render time in the way of necissary antialiasing, and GI calc time... It would almost seem as though there is an unimaginable limit as far as poly count goes as they no longer exist as geometry, but rather raw renderer data. But as of now, they do not support animated meshes, they ignore any additional modifiers, and they seem to have issues with any procedural texture that is dependant on geometry properties such as the fEdge plugin and certain Falloff modes. So these are not perfect by any means either.

stuh505
09-07-2005, 02:33 PM
I mean that they take up almost no RAM while rendering. They don't really exist at all in the scene prior to rendering, only as a visual placeholder, similar to a Helper object.

They are hidden objects, but they are still in your scene and they aren't free.

It would almost seem as though there is an unimaginable limit as far as poly count goes as they no longer exist as geometry, but rather raw renderer data.

There is a limit to the poly count you can have in substituted objects in your scene and render. The limit for rendering would be the same using RenderProxy, although with RenderPRoxy there is no limit to the amount you could actually have "in the scene" since they are not really in the scene until render.

But as of now, they do not support animated meshes, they ignore any additional modifiers, and they seem to have issues with any procedural texture that is dependant on geometry properties such as the fEdge plugin and certain Falloff modes. So these are not perfect by any means either.

I tried several tests and didn't run into any problems with geometry dependent materials using Falloff modes, and it was not ignoring additional modifiers. I don't know what the fEdge plugin is. Could you clarify what it doesn't do a little more?

It would also be more useful if the proxy could be set by the user, so a low res version of the object could be substituted.

I forgot to mention that you can, although it's not done through the pretty UI.

If you look on the user defined pane of any of my proxy objects, you'll see something like this:

type = renderProxy
source_path = $max/rendercache/Box01.obj
cached_format = .obj
source_name = objBox01

Anything that has type set to renderProxy is considered a proxy (and should have the other flags as well). So you could easily import a low-res object and then just edit the user defined properties to have to function as a prox. source_name is the name of the object inside the filename. you could also use this to load external obj/3ds files without importing them into your scene first, but you should only use obj/3ds files that contain a single object.

CGTalk Moderation
09-07-2005, 02:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.