Giter VIP home page Giter VIP logo

Comments (7)

takahirox avatar takahirox commented on May 18, 2024 2

Why MMD needs OutlineEffect

MMD uses "rendering backface of little bigger model" technique for drawing outline. Some MMD models expect this outline technique. For example sleeves of cloths have front face material (back-face culling) and the inside of them are expected to be rendered as black with the outline.

With outline

image

Without outline

image

This isn't doable with the edge-detection postprocessing approach. So I hope we can keep OutlineEffect.

OutlineEffect documents and API

I can't deny that the current OutlineEffect API is a bit too special in Three.js and specific to MMD. And honestly the implementation is a bit too way more complicated than it needs to be.

I'm thinking of reimplementing OutlineEffect for more Three.js API friendly. (I already have an idea but just lack of time.) We may document when we reimplement it.

from three.js.

Mugen87 avatar Mugen87 commented on May 18, 2024

The MMD examples use OutlineEffect.

from three.js.

linbingquan avatar linbingquan commented on May 18, 2024

The MMD examples use OutlineEffect.

Yes, I think users only see the source code to know how to use, even the useful userData.outlineParameters.visible

material.userData.outlineParameters = {
  visible: false,  //  User does not want to render it
};

TBH, I was try write toon material demo with OutlineEffect and I does not want to render something with OutlineEffect.
The current OutlineEffect examples does not use material.userData.outlineParameters.visible by now.

I searched outlineParameters keyword in code repository, only MMDLoader.js module is used.

from three.js.

Mugen87 avatar Mugen87 commented on May 18, 2024

Would adding a documentation page for OutlineEffect help?

from three.js.

linbingquan avatar linbingquan commented on May 18, 2024

Would adding a documentation page for OutlineEffect help?

I am not sure documentation page is useful.

In my opinion, a good example would be more intuitive and easier to learn and use on a basic level by now.

Only OutlineEffect.js without example by now...

Effect Module Example File
OutlineEffect.js None
AnaglyphEffect.js https://threejs.org/examples/webgl_effects_anaglyph.html
AsciiEffect.js https://threejs.org/examples/webgl_effects_ascii.html
ParallaxBarrierEffect.js https://threejs.org/examples/webgl_effects_parallaxbarrier.html
PeppersGhostEffect.js https://threejs.org/examples/webgl_effects_peppersghost.html
StereoEffect.js https://threejs.org/examples/webgl_effects_stereo.html

from three.js.

Mugen87 avatar Mugen87 commented on May 18, 2024

OutlineEffect was specifically added for MMD / MeshToonMaterial. Compared to the other effects, I'm not sure a usage outside of this context makes sense (if you want to highlight something, there is OutlinePass).

@takahirox What do you think?

from three.js.

Mugen87 avatar Mugen87 commented on May 18, 2024

I'm thinking of reimplementing OutlineEffect for more Three.js API friendly. (I already have an idea but just lack of time.) We may document when we reimplement it.

Sounds good! In this case, it's okay to not add a documentation page or further examples for the existing OutlineEffect.

from three.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.