LDraw.org Discussion Forums
New Parts for LGEO Library - 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: New Parts for LGEO Library (/thread-16260.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Re: New Parts for LGEO Library - Michael Horvath - 2015-09-21

Try replacing the lg_elements.lst and lg_colors.lst files with the ones I've attached, add the -lgeo flag to the end of the command line, and run L3P again.

For instance:
"l3p.exe" "building_007_firecompany.ldr" "l3p_building_007_firecompany_lgeo.pov" -o -cg30,45,-50 -ca60 -lgeo -ar
The resulting POV-Ray scene will quit rendering when it gets to one of your color definitions. Here's a screenshot:

[Image: FpcjuPU.png]

You might want to ask on the POV-Ray newsgroup if there's a workaround. Whatever that may be, it should be applied to the older LGEO files as well, because currently things are not being done consistently.


I solved the lg_tech_knob problem.

Re: New Parts for LGEO Library - Michael Horvath - 2015-09-21

Why not define this:

#declare lg_slope_normal = normal { bumps 1 scale 25*0.02 }

and add it to "lg_defs.inc"? Then, all you have to do is:

material { texture { lg_black normal { lg_slope_normal } } }

Re: New Parts for LGEO Library - Damien Roux - 2015-09-21

You are right, but as I was not planning to share that file, I haven't cleaned it up.

Re: New Parts for LGEO Library - Damien Roux - 2015-09-21

The error says that LDXColor0 is not defined.

You need to write #include lg_color_slope.inc somewhere above.

When my library will be ready to be included in the ldraw AIOI, I will see how I can harmonize everything. Currently it is a WIP, sorry if I didn't take L3P compatibility into account.
But I'm pretty sure the lg_color_slope.inc file should solve the problem.

Re: New Parts for LGEO Library - Travis Cobbs - 2015-09-21

Darats Wrote:I've looked into it a bit deeper, and my bad, I was sure LDXcolorX was the standard:

Just as an FYI, I can confirm that the LDX color defines come from LDView originally. The LDX stands for LDView eXporter (perhaps not the best TLA).

Re: New Parts for LGEO Library - Michael Horvath - 2015-09-21

Your solution doesn't work for all the *other* colors though. How is lg_color_slope.inc going to help for colors like this (from LP3 output):

//// Color 46 Trans_Yellow (from lg_color.inc)
#ifndef (L3Texture46)
#declare L3Texture46 = texture { lg_clear_yellow }
#ifndef (L3Texture46_slope)
#declare L3Texture46_slope = L3TextureSlope(L3Texture46)
#ifndef (L3Color46)
#declare L3Color46 = L3MaterialT(L3Texture46)
#ifndef (L3Color46_slope)
#declare L3Color46_slope = L3MaterialT(L3Texture46_slope)

//// Color 4 Red (from lg_color.inc)
#ifndef (L3Texture4)
#declare L3Texture4 = texture { lg_red }
#ifndef (L3Texture4_slope)
#declare L3Texture4_slope = L3TextureSlope(L3Texture4)
#ifndef (L3Color4)
#declare L3Color4 = L3Material(L3Texture4)
#ifndef (L3Color4_slope)
#declare L3Color4_slope = L3Material(L3Texture4_slope)

//// Color 14 Yellow (from lg_color.inc)
#ifndef (L3Texture14)
#declare L3Texture14 = texture { lg_yellow }
#ifndef (L3Texture14_slope)
#declare L3Texture14_slope = L3TextureSlope(L3Texture14)
#ifndef (L3Color14)
#declare L3Color14 = L3Material(L3Texture14)
#ifndef (L3Color14_slope)
#declare L3Color14_slope = L3Material(L3Texture14_slope)

So you're creating three different sets of colors because you don't want to stick with the existing standard?

Re: New Parts for LGEO Library - Damien Roux - 2015-09-21

Don't be rude.
I'm sharing a library made originaly for my own use, if I used LDX statements within the files it was because of 2 reasons:
- I was not using L3P
- I cannot globaly control slope grainy surface roughness if the roughness is defined in the part inc file. This is the main reason I didn't stuck with the standard.

I can use the "standard" color definition and remove LDX colors from the parts, but not until I have found a solution that fullfil what I need.

lg_color_slope.inc is a file for my personnal use that was never intended to be shared. I thought it would work for you, sorry if it doesn't. I still think you can use it as a workaround because it does work for me (with L3P generated files I mean), waiting for a better solution.
It also doesn't need to help for the L3colors because those colors should aleady work for you.


I've modified the Package (donwload link on the 1st page of this topic), now I have included a file call lg_color_LDX_L3P.inc which is basically a copy of my lg_color_slope.inc, but which define both LDXColors and L3Colors.
Then it should work for both L3P and Ldview generated files.
In that file you will be able to change the roughness of the slopes.

Only one thing that needs to be done is to add #include "lg_color_LDX_L3P.inc" at the end of your lg_color.inc file (just above the #end at the end of the file).

Re: New Parts for LGEO Library - Michael Horvath - 2015-09-21

Here are the normals that L3P uses:

#declare L3NormalBumps = normal { bumps 0.01 scale 20 }
#declare L3NormalSlope = normal { bumps 0.3 scale 0.5 }

They differ from yours as well as LDView's. Ideally, these should have been defined by Lutz Uhlmann, not by Lars or you or Travis.

Also, I just tried using your lg_color_slope.inc and the render quits when it gets to lg_metallic_dark_grey. Do you have an updated lg_color.inc with that color in it? Because it does not exist in my copy.

Re: New Parts for LGEO Library - Damien Roux - 2015-09-21

That's why defining the slopes values in the part inc files is not a good thing.
If you render a slope patterned part from ldview you will have a certain grain value for the main color but different one for the pattern color (because it is defined within the part).

A user should be able to globally set the bump value he wants.

Make sure to delete lg_color_slope.inc, and redownload my package and use lg_color_LDX_L3P.inc (see my post above for how to use this).

I guess lg_metallic_dark_grey is a color I've added because it was not in the LGEO library.
Just delete it from lg_color_LDX_L3P.inc (do the same if you get problem with other colors).

I just can't share my lg_color.inc because I have heavily edited it, and I first need to make sure it will work for everyone.
I'm planning to do it soon.

Re: New Parts for LGEO Library - Michael Horvath - 2015-09-22

That seems to work. However, make sure to update "lg_colors.lst" and "lg_elements.lst", otherwise L3P doesn't know which parts and colors to convert, similarly to "LGEO.xml".


Also, I think the regular bricks should have a slight waviness in their normals as well. Does LDView not add one by default?