Vantage 2.5 Wind + Trees: No movement?

Hi,
excited to try out the new 2.5 release with SketchUp I have found that the animated foliage tick box doesn’t seem to affect the animated cosmos assets I added to the model in Sketchup (when using live link)
Does the animated foliage only move with limited cosmos assets brought in directly within Vantage? Or am I missing another toggle switch somewhere to get them jiggling!!!

Thanks for the continued development of the SU side of things.

Since the Cosmos asset is converted to V-Ray objects and some metadata is lost, the Sketchup exporter needs to add the metadata back in for Vantage to correctly identify the animated asset. I believe this will soon be added in V-Ray for Sketchup.

Hello @NRH1981 ​!

A fix for that will be included in our next V-Ray for SketchUp version. Until then, an option to try out the Cosmos animated assets in Vantage 2.5 is using the following script in the SketchUp’s Ruby Console (SketchUp > Extensions > Ruby Console):

class VantageAnimatior

  include VRay

  def initialize(active_context: Context.active(false))
    Context.subscribe(self)
    active_context&.subscribe(self)
  end

  def on_context_created(context)
    context.subscribe(self)
  end

  def on_model_exporter_created(exporter)
    exporter.subscribe(self)
  end

  def on_model_exported(exporter)
    exporter.renderer.grep(:Node) { |node|
      user_attributes = node[:user_attributes]
      next if user_attributes[/cosmosAsset=/].nil?
      cosmos_pkg_id = node.name[/@[^|]+/]&.gsub('@', '')
      node[:user_attributes] = "#{user_attributes}cosmos_pkg_id=#{cosmos_pkg_id};"
    }
  end

  INSTANCE ||= VantageAnimatior.new

end​


Then start again Vantage Live Link and enable the Wind option. Enjoy the animated assets marked with the special symbol!

Regards,
Ivelina

Thanks both to npg for the feedback and Ivelina for the workaround solution. I appreciate the quick replies!
I will use this workaround until the next release of Vray for SU.

Loving the evolution of the Cosmos library. It’s quickly building to be a really deep asset library. Great work.

Have a good day.

Trees are dancing!!!

On a side note for anyone using this Ruby Script.
I had to copy and paste it into a Word doc to get rid of the internet formatting association. Then re-copy/paste it into Ruby Console. Copying it straight from the Forum resulted in an error.

You are right. At the very end of the script is added an unexpected symbol that causes an error after pasting it in the Ruby Console. Coping the script right to last visible characters (the last “end”) works for me. Or just use this file - .

Ivelina
Animated_assets-script.txt (710 Bytes)

Ctrl+Shift+V usually also works to avoid such issues.

Hello, It’s possible to add Wind effect on trees not from Cosmos assets?

No, the animated trees in Cosmos contain specific data encoded in the mesh that is used to compute the movement. It doesn’t work with an arbitrary mesh.

but maybe we can add this data by ourself to the mesh?

Hi Mikhalenko,

Unfortunately it’s not that easy to add the necessary data outside of our established internal pipeline for the animated assets, so I would say you cannot add it yourself,

Best regards,
Alexander

Thanks. Even with Houdini ? :roll_eyes: