Git Product home page Git Product logo

Comments (7)

kwokcb avatar kwokcb commented on September 27, 2024

Leaving a ping for @ashwinbhat as I believe you and Roberto worked on these ?

from materialx.

dbsmythe avatar dbsmythe commented on September 27, 2024

I had similar observations about several of the Shape nodes, wondering if they should be updated to be more consistent, predictable and complete:

  • Should the default value for "center" in <circle>, <cloverleaf> and <hexagon> be (0.5, 0.5) and not the currrent (0,0)? That would make the pattern default to being centered in the 0-1 space rather than cut off in the corner.
  • For <cloverleaf>, the pattern is currently centered if "center" is 1,1, and is placed in the upper-right if "center" is 2,2. I think "center" input value should be internally multiplied by 2 so the user sees input values of 0-1 with 0.5 in the center.
  • Should <hexagon> have a rotation angle input to make it more general?
  • In <tiledcircles> with "staggered" turned on, the pattern is not the specified uvtiling height. It looks like this was done so the circles are exactly on equilateral triangle vertices? If so, should there be a boolean input to switch between "circles on equilateral triangle vertices" mode vs "fit the uvtiling size in U and V"?

from materialx.

kwokcb avatar kwokcb commented on September 27, 2024

Yes.

  • To me it's strange that the default places the pattern so it's 1/4 cropped at 0,0. DCCs AFAIK center the pattern.
    It would be nicer IMO to have the patterns centered normalized UV space by default,
  • The line pattern is quite stange to me as well as it's a line that is diagonal from the 0,0 to 1.1
    • it looks like a a line with 2 circles at the end ?
    • center is 0,0 which actually places it centered at 0.5, 0.5 so is also inconsistent
    • radius I believe is thickness of the line., but I guess referes to the radius of the circles at the end points.
    • I have no idea if I can get a vertical or horizontal line without circles.. This is the best I could do.

but it's a lot of work to offset the line to handle the radius. Also can't get rid of the circles ?

from materialx.

dbsmythe avatar dbsmythe commented on September 27, 2024

<Line> actually makes sense to me: the point1 and point2 positions are the centers of the endpoints of the line, and radius is the half-thickness of the line, so all pixels that are within "radius" pixels of the (infinitesimally-thin) line between point1 and point2 are "on".
The only addition I would suggest is like I mentioned at the TSC meeting, to have a "color3" variant of <line> as well as float, which would have a pair of color inputs to define the "in the line" and "not in the line" colors. And same for all other Shape nodes: have both float-output and a color3-output variants of all of them rather than "some output float, some output color3". Though maybe better choices for the two color inputs would be "colorfg" and "colorbg" rather than color1/color2 so it's more clear which color input drives the color of the pattern and which is the non-pattern background color.

from materialx.

kwokcb avatar kwokcb commented on September 27, 2024
  • For radius, I guess what I was looking for was a rectangle for a line with a width / height or a single thickness. Perhaps a different primitive to add.
  • Having center is still weird to me. If you set it to 0.5, 0.5 then just offsets the entire line so may it should be called offset ?
  • Having color variants would be good. I have been creating graphs to remap to colors.

from materialx.

zicher3d avatar zicher3d commented on September 27, 2024

The circles on the line ends is because we are using a signed distance field formula. If we use rectangles we will have issues connecting lines together.
I guess we could have option or another line node for rectangle ends. I haven't thought about that.

from materialx.

zicher3d avatar zicher3d commented on September 27, 2024

Regarding circles, hexagon, or cloverleaf position. The initial position is consitent but yes, looks like the offset for cloverleaf needs to be multiplied by 2. That should be fixed.
But the tiled version works ok, maybe there it's compensated somehow. if we fix one we need to probably "unfix" the other.

from materialx.

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.