LDraw.org Discussion Forums

Full Version: OMR Model Render
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
That should do it. I have made a new UV calculation heuristic, and it seems to compute good surface coordinates for all of the test elements I have tested it on.

The code has been pushed to the master branch of buildinginstructions.js and the file "sample_physical.php" shows how to load a model using this renderer.

What do you think? Is it alright for the OMR page?
(2019-09-02, 15:17)Lasse Deleuran Wrote: [ -> ]That should do it. I have made a new UV calculation heuristic, and it seems to compute good surface coordinates for all of the test elements I have tested it on.

The code has been pushed to the master branch of buildinginstructions.js and the file "sample_physical.php" shows how to load a model using this renderer.

What do you think? Is it alright for the OMR page

Here's a link for others:
sample_physical.htm

The rendering looks good but the lighting seems a bit dark for my taste. Someone else want to chime in?
You can press "Right arrow" to go to light control, move it around with "WADSQE" and add an additional light using "P" (then click right to select it - the red diamond will indicate it is selected) and move it around. The console will show the position of the lights. Once a good position is found, you can hardcode it.

I am currently looking into adding a "sun"-like light instead of just point lights.
(2019-09-02, 15:53)Lasse Deleuran Wrote: [ -> ]You can press "Right arrow" to go to light control, move it around with "WADSQE" and add an additional light using "P" (then click right to select it - the red diamond will indicate it is selected) and move it around. The console will show the position of the lights. Once a good position is found, you can hardcode it.

I am currently looking into adding a "sun"-like light instead of just point lights.

I'd definitely like something a little more diffuse.
(2019-09-02, 15:57)Orion Pobursky Wrote: [ -> ]I'd definitely like something a little more diffuse.
Yeah, and softer shadows, right? I think they are way too hard right now.

BTW. The code for the scene set up is found in Scene.js: Scene.js



There is also ambient light.

Right now the ambient light is only set to 0.45 out of 1: this.setHemisphereLight(0xF4F4FB, 0x30302B, 0.45);

It can just be increased.
(2019-09-02, 15:57)Orion Pobursky Wrote: [ -> ]I'd definitely like something a little more diffuse.

Also, the rendering is good in my view. At least good enough for our purposes. That said, I'm still getting weird lighting effects on curved surfaces as seen on the top of the test model:
[attachment=3983]
That's interesting. I see this artefact on both 2x4 and 1x3 curved slopes, but not on the 1x2 ones.

That will be next on my list after the light and shadow setup.
(2019-09-02, 15:17)Lasse Deleuran Wrote: [ -> ]That should do it. I have made a new UV calculation heuristic, and it seems to compute good surface coordinates for all of the test elements I have tested it on.

The code has been pushed to the master branch of buildinginstructions.js and the file "sample_physical.php" shows how to load a model using this renderer.

What do you think? Is it alright for the OMR page?

Here's some more weird reflections:
[attachment=3985]

I'd like to reemphasize that my comments are just nits and not complaints. I'm definitely going to be looking into replacing brigl with your code.
(2019-09-02, 17:37)Orion Pobursky Wrote: [ -> ]Here's some more weird reflections:


I'd like to reemphasize that my comments are just nits and not complaints. I'm definitely going to be looking into replacing brigl with your code.
Nitpicking is exactly what I need to make this good, so keep it up!

I have just pushed a commit to master where ambient light has been increased, an additional point light has been added and the scene is nice and light now.

Also. I have decreased the imperfections shown on "ABS material" colors, such as yellow. This decreased the amount of waves you would see in those reflections. The imperfections have been added on purpose - they allow for the light to be reflected irregularly which looks more realistic at some angles. However. I would also love to see other and even better ways of generating these material surfaces. Right now they are simple randomly generated cosine curves with some additional randomness and imperfections thrown in.
(2019-09-02, 16:03)Orion Pobursky Wrote: [ -> ]Also, the rendering is good in my view. At least good enough for our purposes. That said, I'm still getting weird lighting effects on curved surfaces as seen on the top of the test model:
I found the issue. I am making the edges of generated textures curved (so that normal bricks have rounded corners when you zoom in), but the UV generation on curved surfaces was hitting these curved corners, giving the artefacts. A new version has been pushed without this issue.
Pages: 1 2 3 4 5 6