Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blur, Shadows not working #203

Closed
nikitattt opened this issue Dec 13, 2019 · 13 comments
Closed

Blur, Shadows not working #203

nikitattt opened this issue Dec 13, 2019 · 13 comments
Assignees

Comments

@nikitattt
Copy link

nikitattt commented Dec 13, 2019

Tried recently added Blur, Inner, Drop Shadows and found that they are not rendered in Flutter.
Plugin version: 1.8.1, stable channel.

@luigi-rosso
Copy link
Contributor

Hi @nikitattt, can you send a link to your file on https://rive.app?

@nikitattt
Copy link
Author

@luigi-rosso
Copy link
Contributor

Thanks @nikitattt, could you post a screenshot of what you see in Flutter? I do see the effects, but some of them look wrong. I need to do a little more investigation but I'm still traveling for the next two days so it may take a little more time to get to the bottom of this. Here's what I see in Flutter, do you see the same thing?

image

One thing I did want to mention is that it looks like you're using a lot of effects on individual shapes, you can apply the effects to nodes too by grouping shapes together. This will be more performant at runtime.

@luigi-rosso luigi-rosso self-assigned this Dec 16, 2019
@Effizjens
Copy link

Effizjens commented Dec 16, 2019

Hey,
I guess this is kind of the same problem. By adding an inner shadow there is also a blur effect.
This is my rive file https://rive.app/a/Effizjens/files/flare/new-file .

This is what I see in Flutter.
Screenshot_20191216-175851

And here is my code using flare_flutter: ^1.8.2 and flutter v1.12.13+hotfix.5.

import 'package:flutter/material.dart';
import 'package:flare_flutter/flare_actor.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        backgroundColor: Colors.amberAccent,
        body: FlareActor(
          "assets/File.flr",
          alignment: Alignment.center,
          fit: BoxFit.contain,
        ),
      ),
    );
  }
}

I saw that there is an blur value in the JSON file but for my understanding, this isn`t for the blur effect of the shape itself but for the innershadow to define how hard the shadow is.

@nikitattt
Copy link
Author

@luigi-rosso yes, I see absolutely the same thing as in your example.

P.S. Thanks. I'll try to achieve the same effects with nodes. One more point I wanted to mention(not really related to this issue), when working with files that have many elements(example: https://rive.app/a/nikita.nvgames/files/flare/nixie) I notice a significant slowdown in client interface. I don't know if this is an issue and is it related to rive client rendering speeds. Maybe you have advice on how to organize many elements for fast work?

@Chaitanyabsprip
Copy link

I have the same issue
what is the fix?

@nikitattt
Copy link
Author

Hi @luigi-rosso! How this issue is going?
Planned to use elements with shadows and blur in Flutter Clock Challenge which deadline is on 20 January...

@avinath1998
Copy link

Yep same, still facing this shadow issue.

@kingcla
Copy link

kingcla commented Jan 15, 2020

Hi @luigi-rosso I am also facing the same problem (for the flutter clock challenge as well BTW). There is a shadow in my model and it appears blurred in Flutter.
In Rive:
image
In Flutter:
image

Can you please help us?

@luigi-rosso
Copy link
Contributor

Apologies for the delay on this. Could everyone who is facing the issue please make sure to update your posts to include a link to your file (or please email the .flr2d files to luigi@rive.app)? Hoping to get this fixed in the next couple of days.

@Chaitanyabsprip
Copy link

Chaitanyabsprip commented Jan 16, 2020

@luigi-rosso
Copy link
Contributor

Thanks! Please try version flare_flutter: ^2.0.1, where it should be fixed.

@kingcla
Copy link

kingcla commented Jan 16, 2020

@luigi-rosso I just tried, it works!! Thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants