Mass amount of polygons

Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

User avatar
cyrillweiss
Licensed Customer
Posts: 91
Joined: Wed Jun 02, 2010 2:52 pm

Hi

I've got some meshes (gras, flowers) and need to scatter it across a surface. I'm using Ninja Dojo for Scattering, my surface needs a lot of CVs, as the instance of gras/flowers gets placed on them. After scattering I would get more than 100'000'000 polys which doesn't allow an efficient workflow in the viewport and Octane needs a lot of time for preparing (voxelizing).
Is there a better way to do this?
btw. using Maya 2013

Best
Cyrill
HW01:WIN10x64/X79/i7-3930K/64gb/GPU:1xTitan X, GTX 1080ti, SW:Maya2018/2019, Cinema 4D R20

HW02:WIN10x64/Z370/i7-8700K/64gb/GPU:1xTitan X, GTX 1080ti SW:Maya2018/2019, Cinema 4D R20

etc. ...
User avatar
steveps3
Licensed Customer
Posts: 1118
Joined: Sat Aug 21, 2010 4:07 pm
Location: England

100,000,000! That is a lot of scatter.

Sorry, nothing constructive to add except try to lower the amount.
(HW) Intel i7 2600k, 16GB DDR3, MSI 560GTX ti (2GB) x 3
(SW) Octane (1.50) Blender (2.70) (exporter 2.02)
(OS) Windows 7(64)
User avatar
TBFX
Licensed Customer
Posts: 501
Joined: Sun Dec 11, 2011 9:43 pm
Location: Wellington, New Zealand

Hi,

Unfortunately I believe that so far only the loading of particle instances has been optimized and not regular instances. So if you scatter your instances with either particles or nParticles they will load much much faster. If you have many and a high poly count it can still take a few minutes but if the instances don't have animation you can set their geo type to scatter and then they will only be loaded on the first frame of an animation. I did mention to JimStar a month or so back that he had said optimization for other instances would be coming at some stage but so far this hasn't happened. Unfortunately if geo is simply copied as an instance you only need a few to really slow down the scene load to a virtual standstill.

As an example of what can be done I've attached a still from a shot I did using particle instancing. There are over 31000 trees in the scene and the grassy field is individual blades of grass using instanced patches of grass for a grand total of more than 52,000,000,000 rendered polygons. The scene takes around 5 mins to load on my system (check my signature for specs) and the frame render times ranged from 15 - 30 mins.
sh001_new_v001_FINAL.00253.jpg
Win10 x64|i7-9750H 2.6 GHz|32 GB RAM | RTX2080 max Q 8GB
User avatar
cyrillweiss
Licensed Customer
Posts: 91
Joined: Wed Jun 02, 2010 2:52 pm

Hi TBFX

Thank you very much for your good explanation!

I just made another Topic about the particles for scattering, as I'm not sure how to get that right:
http://render.otoy.com/forum/viewtopic.php?f=28&t=37990

I would be very interested in how you spreaded the particles in your scene. What is your magic trick? ;)

Best regards
Cyrill
HW01:WIN10x64/X79/i7-3930K/64gb/GPU:1xTitan X, GTX 1080ti, SW:Maya2018/2019, Cinema 4D R20

HW02:WIN10x64/Z370/i7-8700K/64gb/GPU:1xTitan X, GTX 1080ti SW:Maya2018/2019, Cinema 4D R20

etc. ...
User avatar
JimStar
OctaneRender Team
Posts: 3812
Joined: Thu Jul 28, 2011 8:19 pm
Location: Auckland, New Zealand

TBFX wrote:Unfortunately I believe that so far only the loading of particle instances has been optimized and not regular instances. So if you scatter your instances with either particles or nParticles they will load much much faster.
Just to be clear, will try to describe the exact reason of it.;)

It's not optimization issue...
When you use particles - the plugin assumes that each particle geometry can have only one (or just few if different materials are used for different poligons) associated Octane material node (which can be "virtual" of course). So, the particles code can be highly optimized due to this reason: as the plugin checks "what material this object has" only once for each particle geometry, assuming that all other 1'000'000'000 particles have the same (perhaps virtual) material node.

Otherwise when you use instances. For some scenes you may want to explicitly associate different material for some of the same geometry's instances. The corner case, that theoretically you can have all 1'000'000'000 instances having own material each (being set e.g. by some crazy script :)).
So, taking into account this case, the plugin must query the associated material node for each instance during scene compilation. And here we get the most interesting thing. No matter how highly optimized I can make this chunk of code (in fact I've done it long time ago and it is optimized the same good as particles translation code) - as all this optimization will be eaten by Maya's slowpoke getConnectedShaders() API function which must be called for each instance and which kills all the optimizations as most of the time instances translation process "sits" inside this function...

So, if we for example will decide that "all instances can have only one associated material node (the one connected to the geometry)" - then the instances translation speed may be faster. But as soon as some instances of the same geometry must be able to have different materials associated (not just random "virtual" material but true explicit different material nodes) - the instances translation will be slower than particles translation.
One more chance - if Maya developers will optimize the getConnectedShaders() API function, but IMHO it is utopia.:lol:

So, I think you intuitively have choosen the right way.)
If you need speed and don't need flexibility of setting different explicit material nodes for each instance - the particles are appropriate for this usecase.
But as soon as you need the flexibility in associating different material nodes with different instances of the same geometry - instances is your way...
User avatar
TBFX
Licensed Customer
Posts: 501
Joined: Sun Dec 11, 2011 9:43 pm
Location: Wellington, New Zealand

Thanks for the detailed explanation JimStar. All makes complete sense.
JimStar wrote:So, if we for example will decide that "all instances can have only one associated material node (the one connected to the geometry)" - then the instances translation speed may be faster.
I think it would be good to have an option to do this as there are many ways to distribute or scatter instances that are more intuitive than particles but would be used in the same way. ie. for many instances of an object using only virtual materials to add variety. This would open the door for script based and third party scattering solutions to be used.
JimStar wrote:One more chance - if Maya developers will optimize the getConnectedShaders() API function, but IMHO it is utopia.
Agreed. ;)

T.
Win10 x64|i7-9750H 2.6 GHz|32 GB RAM | RTX2080 max Q 8GB
User avatar
JimStar
OctaneRender Team
Posts: 3812
Joined: Thu Jul 28, 2011 8:19 pm
Location: Auckland, New Zealand

TBFX wrote:I think it would be good to have an option to do this as there are many ways to distribute or scatter instances that are more intuitive than particles but would be used in the same way. ie. for many instances of an object using only virtual materials to add variety. This would open the door for script based and third party scattering solutions to be used.
OK, I will think about it. In this case each shape object will be forced to have additional special Octane attribute, which will switch between these two different translation processes... Something like "Optimization: Use shape's material for all instances"...
User avatar
TBFX
Licensed Customer
Posts: 501
Joined: Sun Dec 11, 2011 9:43 pm
Location: Wellington, New Zealand

JimStar wrote:OK, I will think about it. In this case each shape object will be forced to have additional special Octane attribute, which will switch between these two different translation processes... Something like "Optimization: Use shape's material for all instances"...
That would be great JimStar. As an example I did a shot where I only needed 8 trees and wanted to art direct their placement so I manually duplicated them as instances but the scene took twice as long to transfer to the GPU as my huge scene with 31000 trees and all that grass!

T.
Win10 x64|i7-9750H 2.6 GHz|32 GB RAM | RTX2080 max Q 8GB
prodviz
Licensed Customer
Posts: 543
Joined: Sun Jul 14, 2013 6:00 pm

Hi TBFX,

I have a couple of hundred instanced nparticles with trees assigned.
Each tree has a few hundred thousand poly's.

I'm not having any luck rendering these at the mo. Maya hangs when I set the render going with no update in the render view.

Do you have any more tips on your workflow?

cheers,

Steve
p.s. I'm rendering on Titan Black's.
User avatar
TBFX
Licensed Customer
Posts: 501
Joined: Sun Dec 11, 2011 9:43 pm
Location: Wellington, New Zealand

prodviz wrote:I'm not having any luck rendering these at the mo. Maya hangs when I set the render going with no update in the render view.
How much system ram do you have? Although the instances will take up very little more Vram than the initial tree the voxelization and transfer process can take a lot of system ram.

The scene above took around 12 GB of system ram to transfer onto my cards and start rendering and as I said in the earlier post took around 5 mins to start rendering.

T.
Win10 x64|i7-9750H 2.6 GHz|32 GB RAM | RTX2080 max Q 8GB
Post Reply

Return to “Autodesk Maya”