Instances/Render Instances material export

Announcements, requests and support regarding the Cinema 4D exporter
Post Reply
8 posts • Page 1 of 1
User avatar
thesquirell
Posts: 428
Joined: Fri Aug 29, 2014 3:49 am
Location: Novi Sad, Serbia

Instances/Render Instances material export

Post by thesquirell » Sun Jul 19, 2015 2:59 am

Hi everybody! :D

Today, I want to talk with you all about instances, and the way they are exported from C4D.

I am curious to know the difference between exporting an instance and an instance with "render instance" option from C4D.
The difference inside C4D is obvious if we consult the project size, but what about the Indigo itself? Upon exporting the same scene to Indigo, once with "render instance" option enabled, and once without, and upon checking the console I see the difference in the number of instances exported. When disabled, the console displays the correct number, but when "render instance" is used, the number of instances exported in the console is always 0. As for the Indigo itself, the instances are exported correctly in both of the cases, meaning that there is always a single mesh used, to which the objects in the scene are referring to ( when "render instance" option is disabled there is one additional mesh for the orignial, but all of the instances are using the same, different mesh, which is a correct thing to do).
But, there is a small difference, which is crucial for me: the materials exported are different. When using "render instance" all of the objects have the same material, but when I switch the option off, the materials are exported correctly.
Now, what I want to do is to export instances from C4D with their different materials applied, BUT with "render instace" option on, because of my wish to save RAM memory from the C4D itself. Anyone got an idea how?

Add: an idea just came to my mind. It is obvious that there are two ways of exporting our instances. What if we had an option something like an instance tag which would control the way we export that instance object.This way our C4D project will use less RAM since we wouod have "render instace" checked, but with the tag telling the exporter to export this instance as if it was switched off, we would have the needed materials exported correctly. Since we alreday have two ways of exporting our instances, this tag would just mark the object and say: this object>this code for export. Is it doable? Fused?
Attachments
Render instance off.jpg
Render instance on.jpg

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Instances/Render Instances material export

Post by Zom-B » Mon Jul 20, 2015 2:59 am

thesquirell wrote: The difference inside C4D is obvious if we consult the project size, but what about the
Nope, Filesize is the same if render instance is checked or not :)
thesquirell wrote:This way our C4D project will use less RAM since we would have "render instance" checked
This is only for rendering in C4D internally.
While exporting to Indigo doesn't matter ich checkbox is checked or not (RAM usage is the same),
internal Indigo rendering inside C4D does use more RAM if unchecked!!
(Simple to check my instancing some bigger meshes)
polygonmanufaktur.de

User avatar
thesquirell
Posts: 428
Joined: Fri Aug 29, 2014 3:49 am
Location: Novi Sad, Serbia

Re: Instances/Render Instances material export

Post by thesquirell » Mon Jul 20, 2015 5:03 am

Hey Zom-B! Thanks for the reply!

I surely wrote something wrong, because I am not sure what are you trying to say. Look at these screenshots:
RAM usage.jpg
When I wrote project size, that is exactly what I meant, project size, not the file size of the project on our hard drives. It's RAM usage obviously increases when we switch off our "render instances" option, and if I try to export to Indigo a forest scene, or a lawn, with huge number of instances the usage of RAM from the C4D hinders that.
Now, please correct me if I am wrong, but could it be that you are trying to say that no matter what the choice is, using or not using the "render instance" option, the total usage of our RAM memory remains the same if we choose to render our scene "externally", from the Indigo itself? For example: We are using "render instances" option, we have less usage of our RAM memory from the C4D itself, but when exported, the usage of our RAM memory increases to value A. But, if we choose not to use "render instances" option, our RAM memory from the C4D itself is greater, but when exported it doesn't increase, and is the same as the value A, or similar? I don't think that you wanted to say that, tbh, but I have to check it, just to be sure.
Or is it possible that you wanted to say that the RAM usage from the Indigo itself is the same, no matter the option we select ("render instances"off/on)? Because, I think that is true. But, I still want C4D to use as little as possible RAM memory, and with suggested solution, I think we can pull that trick out. :D
Because, you see, this is not about a problem of RAM usage from the Indigo, but from the C4D. And if we say to our exporter, with our instance tag: this object, export it using this algorithm, then it could be possible for C4D to use much less RAM memory (because of the "render instances" option on), and for us to utilize all kinds of different possibilities (for example, different types/textures/bumps/materials on our instances) without using complex ISL codes. Indigo RAM usage will remain the same in both of the cases, but C4D will use far less RAM with "render intaces" on, so in the overall, we would use less of our RAM resources.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Instances/Render Instances material export

Post by Zom-B » Tue Jul 21, 2015 8:36 am

Exporting from C4D and do a external render Instances are always... instances, you pay once the RAM cost for one mesh. Doesn't matter if checkbox for render instances is checked or not :)

for internal rendering Instances are only real instances if that checkbox is checked, if you don't do so, you'll pay RAM for every copy!

This behavior is rather a bug, or maybe "missing feature" I suggest!

Being able to have different textures on instances is crucial and should be supported, the whole checkbox situation atm only complicates things...

I suggest as a development target for easy usage:
Instances are always instances and can have different materials applied, and this checkbox gets ignored :)
polygonmanufaktur.de

User avatar
thesquirell
Posts: 428
Joined: Fri Aug 29, 2014 3:49 am
Location: Novi Sad, Serbia

Re: Instances/Render Instances material export

Post by thesquirell » Tue Jul 21, 2015 10:06 am

Ockham's razor - I love it!

Since Indigo treats instances the same (RAM-wise), minus the texturing option, they should always get exported like they are getting exported now, when the "render instance" option is off/disabled. And this is not just a simple texturing option, this way we can assign completely different types of material, randomly to our clone instances, straight from the C4D nad Xpresso. It would be amazing, and I don't think that it represents a lot of work, the code is already there, right?

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: Instances/Render Instances material export

Post by fused » Tue Jul 21, 2015 11:30 pm

Yep that's a bug (and a silly one, too). Render instances should be able to have varying materials.

User avatar
thesquirell
Posts: 428
Joined: Fri Aug 29, 2014 3:49 am
Location: Novi Sad, Serbia

Re: Instances/Render Instances material export

Post by thesquirell » Tue Jul 21, 2015 11:38 pm

When you say "silly one", I kinda get this feeling that you know how to fix it, and will fix it? :D
Because if you do, I am going to personally send a Bierkasten to your address! xD

User avatar
thesquirell
Posts: 428
Joined: Fri Aug 29, 2014 3:49 am
Location: Novi Sad, Serbia

Re: Instances/Render Instances material export

Post by thesquirell » Mon Aug 03, 2015 12:52 am

After some time fiddling with this, I found out that it is actually possible to map certain polygonal selection to use different materials through selection tag in instances, but it doens't render it correctly when "Render Instances" option is on. When switching it off, it works just fine. Even Maxwell has the same problem with this, and C4D itself, actually, even though they work just fine without the selection tags approach. Maxwell already did the multi material-render instances thing, so I am sure you guys can do it too, hell, your engine is better! :D

Post Reply
8 posts • Page 1 of 1

Who is online

Users browsing this forum: No registered users and 14 guests