LDraw.org Discussion Forums
WebGL renderer - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: LDraw Editors and Viewers (https://forums.ldraw.org/forum-11.html)
+--- Thread: WebGL renderer (/thread-6835.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Re: WebGL renderer - Willy Tschager - 2012-11-22

This is working out all fine which leads us to the ultimate question:

How do we implement such a renderer into the forum or the CMS once it if fully featured?


Re: WebGL renderer - Nicola - 2012-11-22

Well it's just importing the .js files and glueing some html and php for the forum.
The problem is making the parts avaiable on the server. They must be on the same server since they're fetched by ajax, or in a server that implement the Access-Control-Allow-Origin directive.

Re: WebGL renderer - Steffen - 2012-11-22

Nicola Wrote:I've yet to understand completely how color works, but i got that 16 is actually the "current color",
and i correcly substitute >it with what "parent lines" says, it's not hardcoded to 0. What i miss is the whole "complementary" colors and code 24.
As Philo already answered, colors 16 and 24 are for "use parent color".
I just asked to correct the implementation of "what to do when there's no parent".
For example, I put some unofficial part from the parts tracker into your tool.
Then it gets all black, because you map color 16 to "parent color", and when there is no parent,
then use 0/0/0. My only, very simple, request was, as color 16 for this purpose has a R/G/B value
set in ldconfig.ldr, that you use _that_ color from there when there's no parent, instead of 0/0/0

Nicola Wrote:Normal edges would be trivial, conditional edges will be not Smile
I know, I was asking just for the simple, normal edges.

Re: WebGL renderer - Steffen - 2012-11-22

maybe we CAN allow to host the parts on the ldraw.org server,
BUT only activate your renderer for logged-in forum participants.
this way we can limit bandwidth, as we're not publicly offering the parts download to everybody,
and at the same time get the nice feature of 3D viewing arbitrary LDRAW files in realtime in the forums.

WebGL in Firefox (or other Mozilla browsers?) - Steffen - 2012-11-22

I was able to run this in Iron/Chrome, but not in Firefox.

Searching for the cause, I found this information:

Quote:"Your graphics card may be WebGL-compatible, but it’ll be blocked in Firefox if the driver version is behind the approved list."

I applied the 3 changes mentioned there:
- To enable WebGL, set webgl.force-enabled to true
- To enable Layers Acceleration, set layers.acceleration.force-enabled to true
- To enable Direct2D in Windows Vista/7, set gfx.direct2d.force-enabled to true

, and voila, I also had WebGL in Firefox without problems.

Maybe it's the same for SeaMonkey.

(My graphics card is just a normal ATI Radeon HD 4600, which bought because it is passively cooled and thus silent.)

Re: WebGL renderer - Nicola - 2012-11-23

Steffen Wrote:as color 16 for this purpose has a R/G/B value
set in ldconfig.ldr, that you use _that_ color from there when there's no parent, instead of 0/0/0

Oh ok, didn't noticed this Smile Implemented!

I've uploaded the new version, it includes:
- zooming and panning with mouse wheel
- mesh centering as LDview (and vertices merging for some performaces)
- very basic line handling
- experimental step support

see here for all links

line rendering is very limited becouse: 1) Three.js doesn't support different materials for same line geometry, so only black edges for now, and 2) line width is fixed to one pixel becouse the parameter is ignored (see here, looks like a webgl gap). In linux it should look better.

Let me know of any bug Smile

Re: WebGL renderer - Philippe Hurbain - 2012-11-23

Wow, wow!!!
Quote:- experimental step support
One thing missing (but then - it's experimental!): orientation/scale should be kept when changing step.

Re: WebGL renderer - Steffen - 2012-11-23

Nicola Wrote:Let me know of any bug Smile

I think that the computation of the part center for rotation is not correct.
The topright red shuttle on page http://www.lugato.net/ldraw/multiple.html
does not rotate about its center. It rotates around "some other point".

EDIT: probably I am wrong here

Re: WebGL renderer - Steffen - 2012-11-23

yes, I agree. when going a step forward or backward, the perspective that the user has established with the mouse
should not be modified.

Re: WebGL renderer - Michael Heidemann - 2012-11-25

On my Laptop I just needed to update to the latest driver Wink

Really great to see that working.

But I run into an error by processing the attached file. I know it's still beta or alpha, but just at that point I am sure every feedback will help you Smile