OMR Model Render


OMR Model Render
#1
Now that I've implemented Lasse's WebGL renderer on the PT, what is the feeling of expanding it to the OMR? Is anyone particularly attached to brigl? Why?
Reply
RE: OMR Model Render
#2
There is one huge advantages with brigl: It is able to render with light sources and smooth surfaces. This does wonders for realism, as opposed to the building instructions-focused cell shading. I personally find this important for proper presentation of LEGO models. This is in the pipeline for buildinginstructions.js. However. I do not know when this feature will be added as I only have 2-3 hours each evening to work on projects.

While there have been a lot of performance improvements in buildinginstructions.js, I still have to measure it against the renderer on OMR (and to be fair, also Mecabricks): Both loading time, rendering time and storage should be compared.

The optional features buildinginstructions.js brings to the table are:

  • Logos on studs
  • Optional lines (line type "5": Those around the cylinders of studs and other rounded surfaces)
  • Use IndexedDB to cache parts for quicker loading
  • In-browser Generated simple primitives for even quicker loading (stud.dat, 4-4edge.dat, etc.)

New features can of course be added - both pull requests, GitHub issues and direct messages are accepted Smile
Reply
RE: OMR Model Render
#3
For what it's worth, I agree the lit rendering is better on the OMR.
Reply
RE: OMR Model Render
#4
I am currently working on 3 improvements for the buildinginstructions.js project. One of these is more realistic rendering. 

[Image: IDarxYs.png]
As you can see, I have a lot of work ahead of me. Currently there are 3 tasks which have to be finished:

1) Proper computation of normals. In the picture above I have used the built-in normal calculation. There is another post on this forum where we discuss normals, and I will be implementing a custom normal calculation which ensures hard edges where we have lines of type 2.

2) Rendering of special materials. I am currently pretty happy with how rubber is rendered. However. Having proper rendering of chrome and metal will require both a proper environment map, and other textures. My hope is that I will end up with some really neat looking parts, but this is unfortunately a new area for me.

3) Reflections, shadows and floor should be added. There are tutorials showing how to do this with three.js and I just have to find the time to do this right... unless someone else want to take it on and create some pull requests  Wink
Reply
RE: OMR Model Render
#5
Awesome,

Thanks for all the work you have done and continue to do. I look forward to the results.
Reply
RE: OMR Model Render
#6
I'm the one who thanks for all the great parts and tools! This is simply my way of giving a little back.

I think I have the edges under control now:

[Image: fZvNUmL.png]
The next step will be surfaces - they have to be roughed up.
Reply
RE: OMR Model Render
#7
An update!

[Image: vjKiqBV.png]

You can see some artifacts on the flat yellow parts. It is by modifying these artifacts and adding "damage" to the parts that I expect to get the rendering to become more realistic. Also. I will add a pattern to the ground, different lights, and other improvements. Slow and steady Smile


EDIT. A closeup showing the level of detail up close:

[Image: uiC7QsA.png]
Reply
RE: OMR Model Render
#8
(2019-08-23, 12:54)Lasse Deleuran Wrote: An update!

Starting to look very nice.

Did you make those bevels using a shader or did you manipulate the meshes before rendering?
Reply
RE: OMR Model Render
#9
(2019-08-23, 19:25)Roland Melkert Wrote: Starting to look very nice.

Did you make those bevels using a shader or did you manipulate the meshes before rendering?
Thanks! 

With these tenderers I am using out-of-the-box shaders as I am not too worried about performance (yet)

The smooth shading around studs, curved slopes and such is created by some heuristics I have come up with for splitting normals. It is not yet perfect, as can be seen on the macaroni brick in the lower front corner. 

The smoothened corners is done by generating textures for normal maps on the fly and again using some less-than-perfect heuristics for UV calculation. 

I will will post a write up with illustrations in the “adventures of creating a web renderer” topic once I have some more progress on the environment mapping, ground texture and lights. 

But I have to say. This is quite fun. And much more technically than I feared.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)