ITOOSOFT Forum

Author Topic: Using GBuffer ID to Switch Material Visibility in Single Forest Pack Preset?  (Read 87 times)

CM1251

  • Newbie
  • *
  • Posts: 27
Good day,

I was wondering if anyone here has experience with a tricky problem I'm facing. Currently, I have two custom FP presets: one with my traffic vehicles where the lights are on and the driver is visible, and another with the same vehicles but materials adjusted so the driver is invisible and the lights appear off. Essentially, an Active and a Parked group.

I’d like to combine these into a single preset without duplicating vehicles in the geometry list. In other models and scenes (unrelated to FP), I often use CoronaMultiMap and/or BlendMtl/LayeredMtl to drive an object's material visibility. For this problem, I would take the headlight, taillight, and driver materials and inject a CoronaMultiMap into the self-illumination or opacity slot (depending on the material), where Object GBuffer ID 0 is OFF (Parked) and GBuffer ID 1 is ON (Active). Then, in the FP Item Editor, I would place all my car models and modify their User ID or Sub Item selection to set each as parked or active.

From what I can tell in the documentation, this isn’t currently possible within FP, forcing me to rely on two separate presets. I’m hoping someone has tried something similar and found a workflow to make it work, though I’m ready to accept it may not be feasible.

If that’s the case, could the devs kindly consider adding functionality—even as another FP material map node (like Colour or Edge)—that allows presets to include additional material options or variations through a selector, similar to CoronaMultiMap or CoronaSelectMap?

Cheers!

Michal Karmazín

  • ITOOSOFT
  • Hero Member
  • *****
  • Posts: 3039
Hi,

Probably the easiest way to handle this is to "duplicate" the item in the Geometry list, assign the desired material to the duplicate, and then switch between the items as needed. I hope that helps!

Best regards,

CM1251

  • Newbie
  • *
  • Posts: 27
Hi Michal,

That is an option too, but I would’ve preferred a single instance of the object and some feature to control its variables. Mainly to keep the list shorter, as right now it already has 20 vehicles (and I plan to increase this to 24). Duplicating them would make the list incredibly unwieldy.

For example, if I place everything down and then select the active cars, I can’t just mass-change their GBuffer IDs to 1. I’d have to go through the list, set all the inactive/parked car probabilities to 0%, and then run a randomizer to replace those vehicles. After that, I’d still need to manually check that each placed vehicle has the correct geometry selection and colour. Knowing the workflow beforehand would help, but since I only do this occasionally, it ends up involving a lot of rework and trial and error each time.

This is why having the ability to control each instance’s GBuffer ID (or a custom Forest ID) would be so helpful. If I had furniture, trees, or vehicle colours tied to the ID, I could simply change an item’s ID value to get the result I want, without needing separate geometry items or FP presets.