Author Topic: Performance impact of complex multi/subobject-materials vs direct assignment?  (Read 2192 times)

2018-05-19, 07:02:38

OccultMonk

  • Active Users
  • **
  • Posts: 94
    • View Profile
I want to have many variations of the same complex model consisting of many objects. These variations can have different colors/paints/metals in different places of the model. I wanted to create a multi-subobject for each material variation. So a multi/subobject for a green car with white plastic and one for a red car with metal and dark plastic (consisting of 30-50 slots).

Is there a performance hit using a multi/subobject material with 50 slots on all objects at once instead of assigning the materials to each object sepertately?
Unfortunately, I do not have time to test this out myself at the moment.

Also, is there maybe a better solution for having many different material combinations/versions? of a vehicle within the same scene. I want to have preset 'versions' that I can easily swap: Green car with plastic, red car with paint... (only far more complex).

2018-05-19, 19:33:01
Reply #1

OccultMonk

  • Active Users
  • **
  • Posts: 94
    • View Profile
I also posted a more detailed question about complex material assignment here, but it's not really Corona related. More 3dsmax specific:

http://polycount.com/discussion/201255/3dsmax-many-material-variations-on-the-same-complex-model-in-one-scene/p1?new=1

2018-05-23, 08:52:05
Reply #2

OccultMonk

  • Active Users
  • **
  • Posts: 94
    • View Profile
Is there no performance impact when using Muli-subobjects materials vs individual material assignment?

2018-05-23, 11:27:33
Reply #3

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi OccultMonk. I'm using multi-subobject material extensively in most of my work, and from my experience (haven't done accurate testing) there's no performance penalty when it comes to rendering.

There is however one thing that produces some extra lag and freezing when using multi-mats: the material editor. The time to load large multimaterials can be quite long, and it seems to be even longer if you're using a dual Xeon setup.

2018-05-23, 11:27:36
Reply #4

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8833
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Never tested, but i doubt that there should be any measurable difference. Multi sub object is only container material, it doesn't mix or blend materials in any way. Personally i'm not a fan of extensive use of multi sub object, as i find that it makes managing materials more confusing.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-05-24, 05:54:29
Reply #5

OccultMonk

  • Active Users
  • **
  • Posts: 94
    • View Profile
Never tested, but i doubt that there should be any measurable difference. Multi sub object is only container material, it doesn't mix or blend materials in any way. Personally i'm not a fan of extensive use of multi sub object, as i find that it makes managing materials more confusing.

Then how would you manage a scene where you want many versions of the same very complex model consisting of 10.000+objects? I want a vehicle to sometimes have plastic parts and sometimes metal parts, different colors... Using different scenes is not a solution because of the filesize... I posted the question here:

http://polycount.com/discussion/comment/2633095#Comment_2633095


What would be the best, most durable way to have many versions of assigned materials in one scene, so that I can easily switch between a version of the vehicle with green paint with white plastic and the same model with metal and dark plastic. Making it extra complex is the fact that not all materials will be assigned precisely at the same location/subobjects.

Example: A vehicle (same model) with many colors/material variations, where for example in one version some parts are of a painted material and in another version some parts are plastic or metal. (And then with about 50 materials on thousands of objects) How would you manage that on complex scenes? None of the solutions I found is flexible enough:

    • Splitting the scene in multiple 3dsmax scenes (The Problem with this is that if the model changes you have to import it in all scenes).
      Using multiple 'containing' scenes with the material variations and only import objects as XREF objects and re-auto assign the materials from that scene to the XREF objects. So the material variations/assignments exist in the 'containing scene' but the models in the xref file. (I have not gotten this to work properly because when I (re)import the Xref objects materials are not automatically assigned.
    • Only importing materials from an external file or material library and merging that file with the scene each time I want to change the materials, overwriting the existing materials. In that case, I would have multiple scenes containing only the assigned materials that I can use to overwrite the materials. But the slate material editor with all my tabs and material node trees assignments will not stay ordered.
    • Using multi/subobject ID materials and creating one (or more) for each material combination. Then assigning that to the objects all at once for each color/material variation of the objects. the disadvantage is that when I assign a new material to certain (sub)objects I have to update all those subobject materials.
    • Using State Sets: This records material assignment (but I do not want to reassign each material like that). That would take too long. Also, state sets is not always that stable in my experience and hard to use with a recording states / making scene wide changes. Therefore state sets are better suited for batch rendering in my opinion.
    • Using Scene states: Not good to use for assigning materials. Because of recording states interferes with modeling.
    [/color]


    2018-06-12, 17:15:21
    Reply #6

    Ondra

    • Administrator
    • Active Users
    • *****
    • Posts: 9048
    • Turning coffee to features since 2009
      • View Profile
    Hi,
    multi/suboject and individual material assignents are likely translated to the same thing (I am not sure what you mean by the second one, but it might be the case that it even creates multi/subobj material automatically in 3dsmax). There should be absolutely zero performance difference in corona
    Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)