The forum on this site is closed for new comments and posts. Continue the conversation in the new forum, and learn more here.

Baseball Cap adding second and changing colour

  • Hi Stickyshocker,

    The hat was designed for only one face at a time so a lot of the variables and data controlling the customization options for the hat in Lens Studio expects there to be only one hat. While it is possible to duplicate all the necessary data it will require some time to put together an example regarding how to do it on your end. I wanted to reach out to you and let you know that we're actively investigating a solution.

    Best

    Doug

    Comment actions Permalink
  • Hi Doug

     

    Thanks for the reply.

    I have followed steps and got a second cap working and able to change the brim curve but i am unable to change the colour of the second hat.  If i change the properties for the second it changes both.  Also when asking the software to change colour when opening mouth etc it throws up an error report.

     

    Any idea?

    Comment actions Permalink
  • Ok. So. Here we are. To create two hats that operate independently you have to duplicate almost everything. I mean almost everything haha. So let's go through this step by step.

    First. Find the script BaseballCapController.js. Open it in an editor of your choice and find the line at 30. You'll need to change this default value to false. This will expose the input for BaseballCapProperties.js in the inspector tab.

    Change it to false

    You should see this exposed at the bottom now of the BaseballCapController script object.

    Next, duplicate all of the materials associated with the hat. I like to leave the numbers added to the end when duplicating to make it easier to associate everything.

    Now we have to duplicate everything related to the hat and face as we've done here

    On Head 2 you find a duplicate of the HatTransform. We'll need to go into every mesh visual and apply the duplicate materials to each object so that they can be controlled separately. If for some reason by the end of this your second script isn't controlling the second hat then this is most likely the issue.

    For every instance of a second object select all of them and set their Face Index value to 1. This will associate it with a second face when found.

    On your duplicate copy of BaseballCapProperties you'll need to link all of the duplicated objects to control the second hat. You can see here we've linked the second version of the materials. For the blend shapes it looks like they all have the same names but these are the duplicate versions coming from the second Head object. So make sure you link the correct ones to this second instance of BaseballCapProperties.

    It should look like this.

    You can copy the exact same names for the Blendshape Names values as they will be the same. Just copy and paste the names from the first instance of BaseballCapProperties.

    Finally, on your second copy of BaseballCapController you need to link the second version of BaseballCapProperties at the bottom. This will allow this second version of BaseballCapController to manipulate all the values associated with it. 

    I know this is a lot of setup so let me know if you have any issues.

    Best

    Doug

     

    Comment actions Permalink
  • Thanks man! Sorry missed you had replied. I will try when I get home later! Regards

    Comment actions Permalink

We're here to help! We just need a little bit of information...

What system are you using?

Have you downloaded the latest version of Lens Studio?

Please download the latest version of Lens Studio. If you still run into this issue, please come back and report it!

Is this issue causing Lens Studio to crash?

What system do you run Lens Studio on?

Version

Graphics

Follow the next steps to help us solve your issue:

  • Copy and paste this text into your TerminalCommand Window
    open ~/Library/Preferences/Snap/Lens\ Studio/ %LOCALAPPDATA%\Snap\Lens Studio Copy Text
  • Press ReturnEnter to run the command. The Lens Studio folder will automatically open
  • Prepare to upload your files: zip the "Log" Folder by right-clicking and choosing "compress."
    Locate the Log.txt file right above it.

    Attach a screenshot of the issue:

Name:

Email:

What is this most relevant to?

Please enter a brief description of your issue:

Thanks for submitting this issue.

Unfortunately, it's likely due to the operating system or hardware you're using – since they don't meet the system requirements for Lens Studio.

Still, we hear you loud and clear, and are logging the issue in case there's ever a workaround we can provide!

Minimum Requirements

Operating System: Windows 10 (64 bit); MacOS 10.11+

Hardware: Minimum of Intel Core i3 2.5Ghz or AMD Phenom II 2.6Ghz with 4 GB RAM; Intel HD Graphics 4000 / Nvidia GeForce 710 / AMD Radeon HD 6450 or better; screen resolution of 1280x768 or higher

We'll try to resolve this issue as soon as possible. Thanks for letting us know about it!

Keep an eye out for a followup email from us. We may have a couple more questions for you, or we might already have a solution to offer.

Happy creating!