Itoo Software Forum

Author Topic: Forest Pack Object materials  (Read 427 times)

damien11235

  • Newbie
  • *
  • Posts: 32
Forest Pack Object materials
« on: November 30, 2021, 08:34:05 AM »
hi,

is there a way to ensure that the forest pack object takes the material of the object.
I have multiple forestpack objects using the same base geometry. but each forestpack takes a copy of the material instead of using the same material resulting in multiple materials of the same name in my library.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2450
Re: Forest Pack Object materials
« Reply #1 on: November 30, 2021, 11:38:58 AM »
Thanks for the post, I can reproduce this issue when loading items via the library with On Duplicate Material > Replace From Library enabled. We'll look into it.

In the meantime, you can get around this by using one of the two other modes, either Use Scene Material or Ask User, in which case the replace from library option does work as expected.



Thanks again,
Paul
Paul Roberts
iToo Software

damien11235

  • Newbie
  • *
  • Posts: 32
Re: Forest Pack Object materials
« Reply #2 on: November 30, 2021, 02:28:17 PM »
Hi,
As usual i really appreciate the quick response.
This problem i have noticed also happens when you copy a forest pack object to create a new one as at times that needs to be done as i might need a different forest object selection for masking in post.
i am not sure if this used to happen earlier, but this is the first time i have noticed the materials getting copied multiple times.
Also changing the material on the base mesh does not update the material inside the forest pack even when i press reassign material.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2450
Re: Forest Pack Object materials
« Reply #3 on: November 30, 2021, 02:35:14 PM »
Regarding changing the material on the base object. If this isn't working it's usually because a material is assigned directly in the Geometry rollout.



If you clear this it will revert to using the material on the source object instead.

The "Reassign" button wouldn't help in this case because it is intended to be used only if you accidentally assign another material directly to the whole Forest object. In this case, the automaterial still exists in the scene but it is not assigned to Forest. The button fixes that.

I hope that clears things up,
Paul
Paul Roberts
iToo Software

damien11235

  • Newbie
  • *
  • Posts: 32
Re: Forest Pack Object materials
« Reply #4 on: December 09, 2021, 08:23:17 PM »
Hi,
There is another problem with the material application when getting objects from the library.
I am using the forestlib.ms file attached for most of my plant libraries.
Most of my objects have vray2sided materials used for leafs. i rarely use 2 sided materials for plants and trees as they are mostly in the background.
What this used to do was as follows,
1. on the low setting option it used to remove the 2 sided materials in the object when inserting into the scene replacing it with the material in the front face of the vray 2 sided material.

This behavior is absent now. and it inserts the object with the vray 2 sided material and now i have to manually remove the 2 sided material.
this is a big problem and took me a bit to realize why my per frame times went up for an animation.

Also there is a problem when trying to modify an existing path in the preferences in FP.
Please see the attached image for the clarification on the problem.

I am not using the beta version. i am using FP 7.1.2



Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2450
Re: Forest Pack Object materials
« Reply #5 on: December 10, 2021, 10:32:55 AM »
Hi,

I gather from your post that this is an issue with libraries that you are creating yourself?
In addition to the .ms file you need some additional code in the XML for the quality selector to work as shown below

This code is needed to fire the maxscript function when the material is loaded
Code: [Select]
<maxscript file="forestlib.ms" script='onMaterialLoad "$(LIBMATERIAL)" "$(PRESET_QUALITY)"' execute_on="material_load"/>
And this code adds the Quality drop down to the library browser

Code: [Select]
<select class="quality" label="Render quality (V-Ray/Mental)" setmacro="PRESET_QUALITY">
<option value="high" default="1">High</option>
<option value="low">Low</option>
</select>

For example, please check the lawns presets which use both these snippets.

Best,
Paul
Paul Roberts
iToo Software

damien11235

  • Newbie
  • *
  • Posts: 32
Re: Forest Pack Object materials
« Reply #6 on: December 10, 2021, 10:40:52 AM »
Yes i am aware of that and that code is present in my xml files

extract from my xml file is given below


<?xml version="1.0" encoding="utf-8"?>
<library version="100" order="1" masterScale="12." xref="1" bitmap="scene3.jpg">
   <maxscript file="forestlib.ms" script="onMaterialLoad &quot;$(LIBMATERIAL)&quot; &quot;$(PRESET_QUALITY)&quot;" execute_on="material_load"/>
   <select class="material" setmacro="RENDERER">
      <option value="@forestlib.ms:getRenderer()">Automatic Selector</option>
      <option value="standard">Standard</option>
      <option value="vray">VRay</option>
      <option value="corona">Corona Renderer</option>
      <option value="arnold">Arnold</option>
      <option value="fstorm">Fstorm</option>
      <option value="octane">Octane</option>
   </select>
   <select class="quality" label="Render quality (V-Ray)" setmacro="PRESET_QUALITY">
      <option value="low" default="1">low</option>
      <option value="High">High</option>
   </select>
   <item class="maxobject">

i have made the low reset to be default instead of the high and the line in present in all my xml files.
like i said earlier, the function was working perfectly fine till forest pack 6 and the problem has occurred since installing fp 7. 

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2450
Re: Forest Pack Object materials
« Reply #7 on: December 10, 2021, 10:55:32 AM »
That's strange then - I just tested it here using FP7 and one of our built-in libraries from the lawns presets and it worked fine.

Would you mind testing the Lawns> Common Grass 01 (detail) preset to see if that works for you?

If that does work, perhaps you could ZIP one of you libraries (only one entry needed really) and send it to helpdesk@itoosoft.com and I'll take a closer look.

Thanks,
Paul
Paul Roberts
iToo Software

damien11235

  • Newbie
  • *
  • Posts: 32
Re: Forest Pack Object materials
« Reply #8 on: December 13, 2021, 11:36:45 AM »
Sorry for the delay in reply. was busy with a submission. will send a sample library today.