can I make lines in line-loop geometries thicker than 1px?

118 views
Skip to first unread message

Stephen Bannasch

unread,
May 5, 2011, 3:19:32 PM5/5/11
to sce...@googlegroups.com
I'd like to make the lines I'm creating with line-loops and geometry nodes display thicker than 1 pixel.

Is this possible?

Lindsay Kay

unread,
May 5, 2011, 3:28:10 PM5/5/11
to sce...@googlegroups.com
Hi,

it is possible as a "lineWidth" property on a "renderer" node. The
"renderer" node is deprecated as I am moving the functionality from
that into the node "flags" attribute.

Go ahead and use it for now - I'll let you know when I remove the
"renderer" node, at which point you can specify it on some node flags
instead.

Stephen Bannasch

unread,
May 5, 2011, 3:37:46 PM5/5/11
to sce...@googlegroups.com
>I'd like to make the lines I'm creating with line-loops and geometry nodes display thicker than 1 pixel.
>
>Is this possible?

I've tried both of these and I don't see any change in line thickness:

type: "node",
flags: { lineWidth: 2 },

type: "renderer",
flags: { lineWidth: 2 },

Stephen Bannasch

unread,
May 5, 2011, 3:41:02 PM5/5/11
to sce...@googlegroups.com
At 9:28 PM +0200 5/5/11, Lindsay Kay wrote:
>Hi,
>
>it is possible as a "lineWidth" property on a "renderer" node. The
>"renderer" node is deprecated as I am moving the functionality from
>that into the node "flags" attribute.
>
>Go ahead and use it for now - I'll let you know when I remove the
>"renderer" node, at which point you can specify it on some node flags
>instead.

When I tried:

type: "renderer",
flags: { lineWidth: 2 },

The scene went black -- do I need to set all the other normal defaults? Does embedding a render node turn off the normal defaults?

Lindsay Kay

unread,
May 5, 2011, 3:43:40 PM5/5/11
to sce...@googlegroups.com
Like this:

{
type: "renderer",
lineWidth: 2,

nodes: [
// nodes to which lineWidth is applied
]
}

PS. Avoid nesting the "renderer" node - there are issues with that
which is part of the reason for moving to the flags.

On Thu, May 5, 2011 at 9:37 PM, Stephen Bannasch
<stephen....@deanbrook.org> wrote:
>>I'd like to make the lines I'm creating with line-loops and geometry nodes display thicker than 1 pixel.
>>
>>Is this possible?
>
> I've tried both of these and I don't see any change in line thickness:
>

>    type: "node",

Stephen Bannasch

unread,
May 5, 2011, 3:59:12 PM5/5/11
to sce...@googlegroups.com
Like this:

{
    type: "renderer",
    lineWidth: 2,

    nodes: [
          // nodes to which lineWidth is applied
    ]
}

PS. Avoid nesting the "renderer" node - there are issues with that
which is part of the reason for moving to the flags.

I tried this an am getting a black scene in Chrome 10 on a Mac

and this in FF v4.0.1 -- this is after moving the lookAt around a bit ...

P0FDB3D17.png

Terrance Mok

unread,
May 5, 2011, 4:30:48 PM5/5/11
to SceneJS
Will the renderer functionality of being able to specify a viewport be
put into flags as well? I'm currently testing out rendering my
multiple subgraphs into separate portions of a single canvas rather
than using multiple separate canvases.

Lindsay Kay

unread,
May 5, 2011, 4:36:20 PM5/5/11
to sce...@googlegroups.com
Yes it will - "flags" is an unfortunate name really.

BTW the rationale for the "flags" was the freedom to arbitrarily set
modes/configs on any subgraph in a scene, rather than be restricted to
only being able to set them on a subtree rooted by a "renderer".

Stephen Bannasch

unread,
May 6, 2011, 12:08:11 AM5/6/11
to sce...@googlegroups.com

Augusto

unread,
May 6, 2011, 2:17:06 AM5/6/11
to sce...@googlegroups.com
FYI -- linewidth support in webgl is a bit sketchy.  Apparently the OpenGL ES spec says that some range of linewidths must be supported, but the minimum range is (1,1) -- not super useful.  Seems like Chrome & FF4 will use ANGLE which uses the minimum implementation right now.


- Augusto

Terrance Mok

unread,
May 6, 2011, 10:07:46 AM5/6/11
to SceneJS
Interesting. On Windows 7 in Firefox it works but in Chrome the line
is still just 1 pixel width.

On May 5, 10:08 pm, Stephen Bannasch <stephen.banna...@deanbrook.org>
wrote:
Reply all
Reply to author
Forward
0 new messages