Itoo Software Forum

Author Topic: How to use Material IDs already assigned for object?  (Read 3633 times)

MN4869

  • Jr. Member
  • **
  • Posts: 73
How to use Material IDs already assigned for object?
« on: July 25, 2013, 05:55:39 AM »
I have a GrowFX object that assigns random material Ids to my geometry. I am using a Vray multisubtex map with 5 different colour gradients plugged in. The growFX object renders fine. The editable poly version renders fine.

If I add this to FPP, I loose the colour variation - I think it just uses one material ID. Am I doing something wrong?

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: How to use Material IDs already assigned for object?
« Reply #1 on: July 25, 2013, 09:55:04 AM »
Forest modifies internally the geometry and IDs to use its own multi-sub, so these type of procedural maps may generate wrong results.

I suggest you use Forest Color to get the same functionality. It lets you to define random textures, tint (by object or element) and much more. Instead generating random material IDs in GrowFX, use a single ID and assign Forest Color to the texture slot.

You can find a detailed guide about Forest Color in the following tutorial.
Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #2 on: July 26, 2013, 01:29:05 AM »
The thing is, my maps are not random. I have different material ID and map depending on whether the grass is damaged or not.

Do you think this is something that could be added to a future release? Another option in the forest map for existing Material ID.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: How to use Material IDs already assigned for object?
« Reply #3 on: July 26, 2013, 09:57:17 AM »
I'm checking the source code to see if there is some way to implement it, but i'm afraid it's not possible. Forest uses its own multi-sub to collect all materials defined in the geometry list. But unfortunately VRayMultiSubMtl is not compatible with multi-subs. A feature as this would require a full rewrite of the Forest VRay shader.

The only workaround is to use a multi-sub material for your object, with one material for each texture.
Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #4 on: July 27, 2013, 12:59:58 AM »
But unfortunately VRayMultiSubMtl is not compatible with multi-subs. A feature as this would require a full rewrite of the Forest VRay shader.

Do you drink Stellar or Corona? :D

I see this as a pretty big limitation to be honest. Itoo FPP offers ome great features but my shader networks are already a headache and i dont really want to create four separate shaders for one grass object, nor separate shaders for objects distributed with/without FPP.

 It seems odd as this is working in Railclone.

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: How to use Material IDs already assigned for object?
« Reply #5 on: July 27, 2013, 09:31:02 AM »
But unfortunately VRayMultiSubMtl is not compatible with multi-subs. A feature as this would require a full rewrite of the Forest VRay shader.

Do you drink Stellar or Corona? :D

I mean VRayMultiSubTex, it was a simple text mistake. But the important issue here is that VRayMultiSubText doesn't work well from a multi-sub material, because both shaders share the same Material ID selector.

Quote
It seems odd as this is working in Railclone.

RailClone is completely different, because it uses an unique material (assigned to the object). Instead, Forest must handle multiple materials (one by plant), that is done through a multi-sub.

Just for info: what type of material are you using in RailClone ?
Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #6 on: July 28, 2013, 01:07:12 AM »
I understood you correctly, but I guess I should just modify my approach and reap the other benefits that itoo offers.

In rail clone Im using vray mtl and vray multisubtex for my retaining walls. And RC is randomizing my mat IDs. On others im using specific material IDs with vray multisubtex but only one material.

I agree that it can be a headache trying to use multisubobject materials and subtex maps together, but its doable. You just need to skip some of the subobject numbers. Or use object Ids if possible.

Thanks for taking a look.

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #7 on: July 28, 2013, 01:07:54 AM »
Here's an image.

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #8 on: July 28, 2013, 01:40:58 AM »
And a possible setup in RC

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: How to use Material IDs already assigned for object?
« Reply #9 on: July 29, 2013, 10:50:25 AM »
Ok, thanks for the info. I've done more tests: as far i see, VRayMultiSubTex can be used together multi-sub, always that the IDs used in multitex are also assigned in the multi-sub to the same material (instanced). But in this case, my test works fine even using Forest (I've attached a sample scene).

Please, post your Forest scene to see what is the difference.

Quote
And a possible setup in RC

Sorry, i don't understand well this sample. Checking your screenshot, it seems you use VRayMultiSubTex by Material ID (1 to 6). Where do you use Object ID exactly ?
Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #10 on: August 01, 2013, 07:00:40 AM »
Hi

thanks for the reply - interesting that it works -  I didn't try that. Regarding Ob IDs, I haven't used them for this - I was just suggesting that this would be a great feature. I guess we all just want as much flexibility as possible with regard to workflow.

***

I have another feature suggestion: Ability to use custom proxys. I am currently using FPP to distribute high poly objects across a plane to create displacement/normal maps from. It's way too dense for the viewport but I need this for the vertex shading. I'm currently switching the high poly for the low poly as I tweak. But it would be good to have a custom proxy object that uses the collision radius of the high poly.

I have to say I'm just loving the super fast 50,000,000 poly test renders!

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: How to use Material IDs already assigned for object?
« Reply #11 on: August 01, 2013, 10:10:35 AM »
I think we can't use Object IDs, because for VRay each Forest is a single object (with an unique ID).

I add your suggestion to the wishlist. We thought on a similar idea some time ago, but we discarded it because we were not sure if it would be useful or not.
Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #12 on: August 09, 2013, 02:47:29 AM »
Hi, I tested this yesterday and it's working. Thanks.

Regarding the custom proxy. This idea could be developed further to allow an additional option to substitute of a low poly version of your object depending on the distance to the camera. With an option to update manually so it wouldn't be dynamic if you were animating the camera. Would be good for really heavy scenes.

I hope you don't mind all of the suggestions - just trying to help. :)

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: How to use Material IDs already assigned for object?
« Reply #13 on: August 09, 2013, 08:42:08 AM »
I'm glad the workaround is working. Please, don't hesitate to send us all your suggestions. We always take it into account, when developing new features.

Regarding the multiple proxy feature, this is basically a LOD system. We have not implemented it until now, because may generate a lot of flickering when used on animations. Anyway, now that Forest supports multiple render engines, we'll repeat our tests, to see how it behaves with each one.

Carlos Quintero
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 73
Re: How to use Material IDs already assigned for object?
« Reply #14 on: August 12, 2013, 02:38:58 AM »
I agree but I'm sure you've seen the potential that if you were producing an animation with several camera moves that were quite controlled (i.e. not a flythrough), or even just a series of stills, then you could very quickly switch the LOD per camera using a fixed camera located closely to the render camera and optimize your scene per render. But you would need a 'not recommended for animations' label next to the enable check box to avoid confusion.

Last week I was modelling high poly and low poly versions of rocks and plants, so I'd use this off the bat.

Also...a near clipping plane option would be handy for rendering out chunks of your scene onto image planes.

Oh and don't feel obliged to reply all the time - I know I've posted a fair bit recently.