LDraw.org Discussion Forums

Full Version: WebGL renderer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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?

w.
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.
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.
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.
I was able to run this in Iron/Chrome, but not in Firefox.

Searching for the cause, I found this information:

http://www.sitepoint.com/firefox-enable-...hics-card/
Quote:"Your graphics card may be WebGL-compatible, but it’ll be blocked in Firefox if the driver version is 0.0.0.1 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.)
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
Wow.
Wow, wow!!!
Amazing!
Quote:- experimental step support
One thing missing (but then - it's experimental!): orientation/scale should be kept when changing step.
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
yes, I agree. when going a step forward or backward, the perspective that the user has established with the mouse
should not be modified.
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
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16