LDraw.org Discussion Forums
using looks_like command in pov-ray - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: Rendering Techniques (https://forums.ldraw.org/forum-20.html)
+--- Thread: using looks_like command in pov-ray (/thread-22744.html)



using looks_like command in pov-ray - Joscha - 2018-03-06

Hi

since a few days I try to figure out how to create a kind of 'light bar' in pov-ray. I mean a for example a 1x4 plate which seems to emit light from its surface like shown in the pov tutorial with the command looks_like.

I started with a smal example:
[Image: light_test2_03area_light_on_spot_off.png]
I used a transparent brick (LDXColor79) and an area light with 4 light in a row placed exactly on the surface of the transparent brick.
What I do not like in the result is that the brick does not seem to emit light. I would like to have just a plain white surface.

Then I changed the colour of the plate to white:
[Image: light_test2_04area_light_on_white.png]

Here I had to move the area light slightly above the surface in order not to get blocked. But this is still not the look I wanted. Therefore pov-ray has the looks-like command.

If I try to use the looks-like command in the light source definition I have to point to an object name, i.e. the name of the brick. I searched the line in the pov-script where the object is defined...

Quote:// Author: LDraw
object {
        lg_3710
        matrix <0,0,-25,-25,0,0,0,-25,0,0,0,0>
        LDXSeamMatrix(80, 12, 20, 0, 2, 0)
        matrix <1,0,0,0,1,0,0,0,1,0,-32,0>
        #if (version >= 3.1) material #else texture #end { LDXColor15 }
}

and added:
Quote:#declare lightbar =    object {
        lg_3710
        matrix <0,0,-25,-25,0,0,0,-25,0,0,0,0>
        LDXSeamMatrix(80, 12, 20, 0, 2, 0)
        matrix <1,0,0,0,1,0,0,0,1,0,-32,0>
        #if (version >= 3.1) material #else texture #end { LDXColor15 }
    }
The result after this step is already that the plate is missing.


I tried to draw a box with the box command instead, but if I try to declare it to give it a name to be refered to with the looks_like command, the box disappears (like above the lego plate). Just using the light w/o looks_like brings this:
[Image: light_test2_05area_light_on_box.png]
It looks already similar to the resulty I have seen in the pov tutorials applying the looks-like command.

But then my questions are, is there a difference between the above image (looks_like not applied) and an image with the looks_like command applied? And how to use it in the code?

Regards
Joscha