-
Posts
730 -
Joined
-
Last visited
Content Type
Profiles
Forums
Gallery
Everything posted by hrontos
-
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Try to render this: #version 3.6; #declare ldd_level_of_detail = 3; #declare ldd_light_color = <255/255,255/255,255/255>; #declare ldd_color_variance = 2.00; #include "ldd_default_colors.inc" #include "ldd_default_materials.inc" #include "ldd_part_materials.inc" #declare ldd_part_materials[3001] = ldd_part_material_textile; #declare ldd_part_materials[3003] = ldd_part_material_textile; #include "ldd_part_bevels.inc" #include "ldd_part_position_variances.inc" #include "ldd_main.bin" #declare ldd_camera_transformation = transform { matrix <-0.68896549940109253,0,0.72479408979415894,0.42540118098258972,0.80963975191116333,0.40437242388725281,-0.58682221174240112,0.58692699670791626,-0.55781394243240356,-49.589126586914063,20.251148223876953,-49.191844940185547>} #declare ldd_camera_location = ldd_vtransform(<0, 0, 0>, ldd_camera_transformation); #declare ldd_camera_distance = 33.925437927246094; #declare ldd_camera_look_at = ldd_vtransform(<0, 0, -ldd_camera_distance>, ldd_camera_transformation); #declare ldd_camera_angle = ldd_default_camera_angle; #declare ldd_model_transformation = transform { translate <0,0,0> } #include "ldd_3001.bin" #include "ldd_3003.bin" global_settings { assumed_gamma 1.4 max_trace_level 50 adc_bailout 0.01/2 radiosity { pretrace_start 0.08 pretrace_end 0.005 count 450 nearest_count 4 error_bound 0.05 recursion_limit 1 low_error_factor 0.3 gray_threshold 0.0 minimum_reuse 0.005 //maximum_reuse 0.2 brightness 1 adc_bailout 0.005 normal on media off } } background { color rgbft <255/255, 255/255, 255/255, 1, 1> } light_source { <100,100,0> color 40/100*ldd_light_color area_light 5, 5, 10, 10 adaptive 1 jitter circular orient transform { ldd_camera_transformation } } light_source { <-100,100,0> color 40/100*ldd_light_color area_light 5, 5, 10, 10 adaptive 1 jitter circular orient transform { ldd_camera_transformation } } light_source { <0,100,0> color 40/100*ldd_light_color area_light 5, 5, 10, 10 adaptive 1 jitter circular orient transform { ldd_camera_transformation } } camera { right -(image_width/image_height)*x location ldd_camera_location look_at ldd_camera_look_at angle ldd_camera_angle } #declare ldd_model = union { ldd_3001(array[1]{23},array[1]{0},array[1][12]{{0.9999997615814209,0,0,0,0.9999997615814209,0,0,0,0.99999988079071045,-32.399997711181641,0,-27.599998474121094}}) ldd_3001(array[1]{21},array[1]{0},array[1][12]{{0,0,0.99999988079071045,0,0.9999997615814209,0,-0.9999997615814209,0,0,-31.599996566772461,0.95999687910079956,-30.799999237060547}}) ldd_3001(array[1]{23},array[1]{0},array[1][12]{{0,0,-0.99999988079071045,0,0.9999997615814209,0,0.9999997615814209,0,0,-31.599996566772461,0,-29.19999885559082}}) ldd_3001(array[1]{24},array[1]{0},array[1][12]{{0,0,-0.99999988079071045,0,0.99999988079071045,0,0.9999997615814209,0,0,-29.999998092651367,1.9199975728988647,-29.200000762939453}}) ldd_3001(array[1]{21},array[1]{0},array[1][12]{{0.9999997615814209,0,0,0,0.99999988079071045,0,0,0,0.99999988079071045,-31.599996566772461,0.95999705791473389,-31.600002288818359}}) ldd_3001(array[1]{23},array[1]{0},array[1][12]{{-0.9999997615814209,0,0,0,0.9999997615814209,0,0,0,-0.99999988079071045,-29.999998092651367,0,-33.200000762939453}}) ldd_3003(array[3]{26,0,0},array[2]{0,0},array[1][12]{{0,0,-0.99999988079071045,0,0.99999988079071045,0,0.9999997615814209,0,0,-29.19999885559082,2.8799974918365479,-30.000001907348633}}) ldd_3001(array[1]{21},array[1]{0},array[1][12]{{0,0,-0.99999988079071045,0,0.99999988079071045,0,0.9999997615814209,0,0,-27.599996566772461,0.95999747514724731,-29.999998092651367}}) ldd_3001(array[1]{23},array[1]{0},array[1][12]{{0.9999997615814209,0,0,0,0.99999988079071045,0,0,0,0.99999988079071045,-29.199996948242188,0,-32.400001525878906}}) ldd_3001(array[1]{23},array[1]{0},array[1][12]{{0,0,-0.99999988079071045,0,1,0,0.9999997615814209,0,0,-26.799997329711914,0,-29.19999885559082}}) ldd_3001(array[1]{24},array[1]{0},array[1][12]{{0,0,-0.99999988079071045,0,0.99999988079071045,0,0.9999997615814209,0,0,-28.399997711181641,1.9199975728988647,-29.19999885559082}}) ldd_3001(array[1]{21},array[1]{0},array[1][12]{{0.9999997615814209,0,0,0,1,0,0,0,0.99999988079071045,-29.999998092651367,0.96000140905380249,-28.399997711181641}}) ldd_3001(array[1]{23},array[1]{0},array[1][12]{{0.9999997615814209,0,0,0,0.9999997615814209,0,0,0,0.99999988079071045,-29.199996948242188,0,-27.600002288818359}}) } ldd_model ldd_statistics() plane { y, min_extent(ldd_model).y texture { pigment { color ldd_colors[1] } } } Note the two lines: #declare ldd_part_materials[3001] = ldd_part_material_textile; #declare ldd_part_materials[3003] = ldd_part_material_textile; It should give you "textile" pyramid. Modifying material file should give the same result. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Do you have "Use part materials" on the "Materials" tab checked? -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Yes. The same file contains lines like: #declare ldd_part_materials[2335] = .....; If you put there: #declare ldd_part_materials[2335] = ldd_part_material_roughPlastic; Part 2335 will be rendered with sandpaper texture. Do it for all parts from 1 to 99999 and all parts will be like that. Excel may help you to generate needed lines. -
Whole LXFML file is expected as an input. Result has to be put back to LXFML file manually. I do not know xsltproc on Mac, I run it either in Visual Studio or using MSXML.
- 25 replies
-
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Includes directory contains file ldd_part_materials.inc. At the end this file contains items in array named ldd_part_slope_materials. For example: #declare ldd_part_slope_materials[2449] = ldd_part_material_roughPlastic + ldd_slope_inverted; #declare ldd_part_slope_materials[2875] = ldd_part_material_roughPlastic; means that part 2449 has sand paper slope on the bottom (that's why ldd_slope_inverted). 2875 has slope on the top. Remove line #declare ldd_part_slope_materials[92946] = ldd_part_material_roughPlastic; and the problematic part will not have the sand paper look. -
Understanding LDD's LXFML Schema
hrontos replied to Gnac's topic in Digital LEGO: Tools, Techniques, and Projects
Hehe, ok, I will be more precise: transformation="1,2,3,4,5,6,7,8,9,10,11,12" should be written into matrix form like: 1,2,3 4,5,6 7,8,9 10,11,12 and the add the 4th column: 1,2,3,0 4,5,6,0 7,8,9,0 10,11,12,1 and use that in math like (0,0,0,0) multiply by (1,2,3,0 4,5,6,0 7,8,9,0 10,11,12,1) to get output coordinates. -
Understanding LDD's LXFML Schema
hrontos replied to Gnac's topic in Digital LEGO: Tools, Techniques, and Projects
That transformation is not more not less than a standard 3D rotatation matrix. Just write it into 4 rows, 3 numbers each and add 4th column containing just 0,0,0,1. And use matrix math to calculate final coordinates of a given brick. Take input position as (0,0,0,0) and apply the matrix to get output position of a brick in standard coordinates (x, y, z, i). Ignore the "i" value. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Yes, they should be turned off for rendering purposes. Use them only when you want to create images for building instructions or similar puposes. Exactly, on such large model bevels do not make too much sense, since they are smaller than one pixel. And rendering will be much faster. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
The part materials are defined as: #ifndef(ldd_materials[21]) #declare ldd_materials[21] = texture { pigment { color ldd_colors[21] filter ldd_filters[21] transmit ldd_transmits[21] } #ifdef(ldd_normals[21]) normal { ldd_normals[21] } #end finish { ldd_finishes[21] } } #end That is an example for material ID 21. So easiest way is to declare you own definition for given material ID at the begining of the POV file: #declare ldd_materials[21] = texture { pigment { color ldd_colors[21] filter ldd_filters[21] transmit ldd_transmits[21] } #ifdef(ldd_normals[21]) normal { ldd_normals[21] } #end finish { my_own_finish } } Of course, you can define it in the way, that it uses color from some other material: #declare ldd_materials[21] = texture { pigment { color ldd_colors[2] filter ldd_filters[21] transmit ldd_transmits[21] } #ifdef(ldd_normals[21]) normal { ldd_normals[21] } #end finish { my_own_finish } } Above does not work with color variance. With color variance you have to redeclare only finish: #declare ldd_finishes[21] = { my_own_finish } -
Since I was asked to share the XSLT that can be used to convert groups in to BI steps, I attached the transformation. Transformation outputs something like this: <BuildingInstruction name="BuildingGuide1"> <Step name="Step1"> <Step name="Step1Substep1"> <Step name="Step1Substep1Substep1"> <Step name="Step1Substep1Substep1Substep1"> <PartRef partRef="437" /> <PartRef partRef="438" /> </Step> ... </BuildingInstruction> It assumes,that your input file contains one main group split into more subgroups representing submodels and each subgroup can be split again into subgroups representing submodels of a submodel. Or the subgroup can contain individual parts that should be added in the given step. maxnestlevel variable in the XSLT controls the nesting of BI steps. Output should be pasted between <BuildingInstructions> elements at the end of the LXFML. LDD will display these instructions, but camera view is not adjusted. Also when there is any minor change made in the model, LDD will probably regenerate the instructions. Technically, it is possible to change also camera view, but it is a manual work. You can add: <Camera cameraRef="1"/> where cameraRef is a reference (number) to a camera defintion you create at the begining of the LXFML file. Groups2BIs.zip
- 25 replies
-
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Try to render this scene. It is a simple spotlight demostration in POV-Ray. And it shows also how to place a light on the same position as some brick. It is just tricky to find the right brick. #version 3.6; #declare ldd_level_of_detail = 3; #declare ldd_white = <255/255,255/255,255/255>; #declare ldd_black = <0/255,0/255,0/255>; #declare ldd_stretch_palette = 1; #declare ldd_light_color = <255/255,255/255,255/255>; #declare ldd_ambient_light_color = 0/100*ldd_light_color; #include "ldd_lego_colors.inc" #include "ldd_main.bin" #declare ldd_camera_transformation = transform { matrix <0.76167279481887817,0,-0.64796173572540283,-0.30815255641937256,0.8796766996383667,-0.36223039031028748,0.56999683380126953,0.4755721390247345,0.67002588510513306,11.696864128112793,12.339683532714844,17.410989761352539>} #declare ldd_camera_location = ldd_vtransform(<0, 0, 0>, ldd_camera_transformation); #declare ldd_camera_look_at = ldd_vtransform(<0, 0, -22.957365036010742>, ldd_camera_transformation); #declare ldd_camera_angle = 25; #declare ldd_model_transformation = transform { translate <0,0,0> } #include "ldd_3814.bin" #include "ldd_3818.bin" #include "ldd_3819.bin" #include "ldd_3820.bin" #include "ldd_3626.bin" #include "ldd_3815.bin" #include "ldd_3816.bin" #include "ldd_3817.bin" #include "ldd_4599.bin" #include "ldd_6141.bin" #include "ldd_33320.bin" #include "rad_def.inc" global_settings { assumed_gamma 1.4 max_trace_level 50 adc_bailout 0.01/2 radiosity { Rad_Settings(Radiosity_Fast, on, on) } // fast radiosity - comment out for better quality /* uncomment these radiosity settings for better quality radiosity { pretrace_start 0.08 pretrace_end 0.005 count 1600 nearest_count 20 error_bound 0.02 recursion_limit 1 low_error_factor 0.25 gray_threshold 0 minimum_reuse 0.015 brightness 1.0 adc_bailout 0.01/2 normal on media on } */ } background { color rgbft <255/255, 255/255, 255/255, 1, 1> } // traditional light is commented out - uncomment to make scene brighter /* light_source { <101,101,101> color 75/100*ldd_light_color area_light 30, 30, 10, 10 adaptive 1 jitter circular orient transform { ldd_camera_transformation } media_interaction off }*/ camera { right -(image_width/image_height)*x location ldd_camera_location look_at ldd_camera_look_at angle ldd_camera_angle } #declare brick_0 = union { ldd_3814(array[3]{21,0,0},array[2]{0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.39999991655349731,1.6000000238418579,0.39999961853027344}}) ldd_3818(array[1]{21},array[1]{0},array[1][12]{{0.98325490951538086,-0.18223552405834198,0,0.17517611384391785,0.94516557455062866,0.2756374180316925,-0.050230953842401505,-0.27102187275886536,0.96126192808151245,-0.61999970674514771,2.5099999904632568,0.39999961853027344}}) ldd_3819(array[1]{21},array[1]{0},array[1][12]{{0.98325490951538086,0.18223552405834198,0,-0.18223552405834198,0.98325490951538086,0,0,0,1,0.62000006437301636,2.5099999904632568,0.39999961853027344}}) ldd_3820(array[1]{24},array[1]{0},array[1][12]{{0.98474615812301636,-0.17398057878017426,0.0024053670931607485,0.16658905148506165,0.94671988487243652,0.27562692761421204,-0.050230953842401505,-0.27102187275886536,0.96126192808151245,-0.91031485795974731,2.0959556102752686,0.97849023342132568}}) ldd_3820(array[1]{24},array[1]{0},array[1][12]{{0.98480772972106934,0.17364819347858429,0,-0.17364819347858429,0.98480772972106934,0,0,0,1,0.87797993421554565,2.2703990936279297,1.0828781127929687}}) } #declare brick_1 = ldd_3626(array[4]{24,0,0,0},array[3]{55196,0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,0,2.880000114440918,0.39999961853027344}}) #declare brick_2 = union { ldd_3815(array[3]{23,0,0},array[2]{0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000000596046448,1.6000000238418579,0.39999961853027344}}) ldd_3816(array[4]{23,0,0,0},array[3]{0,0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,-0.40000000596046448,0,0.39999961853027344}}) ldd_3817(array[4]{23,0,0,0},array[3]{0,0,0},array[1][12]{{1,0,0,0,1,0,0,0,1,0.40000003576278687,0,0.39999961853027344}}) } #declare brick_3 = ldd_4599(array[1]{26},array[1]{0},array[1][12]{{-0.98659539222717285,0.16226089000701904,0.017338462173938751,0.068929694592952728,0.51068824529647827,-0.85699862241744995,-0.14791196584701538,-0.84431588649749756,-0.51502722501754761,-0.91503679752349854,1.9815648794174194,2.2981905937194824}}) #declare brick_4 = ldd_6141(array[1]{44},array[1]{0},array[1][12]{{-0.98659539222717285,0.16226089000701904,0.017338469624519348,0.068929694592952728,0.51068824529647827,-0.85699862241744995,-0.14791196584701538,-0.84431588649749756,-0.51502722501754761,-0.93709433078765869,1.818144679069519,2.5724301338195801}}) #declare brick_5 = ldd_33320(array[1]{28},array[1]{0},array[1][12]{{0,0,-1,0,0.99999970197677612,0,1,0,0,-2,0,3.6000001430511475}}) #declare ldd_model = union { object { brick_0 } object { brick_1 } object { brick_2 } object { brick_3 } object { brick_4 } object { brick_5 } } ldd_model ldd_statistics() // removed standard plane //plane { y, min_extent(ldd_model).y texture { pigment { color rgb ldd_colors[1] } finish { ldd_finish_shinyPlastic_255 } } } // this is spotlight placed in the same location as "brick_4" which is the trans 1x1 round plate light_source { <0,0.4,0> // location is slightly offset from <0,0,0> because otherwise stud from the black brick_3 would overlap the light source and no light would be visible color rgb 1 //pure white spotlight // spotlight - has conical shape radius 15 // angle of the cone with full light intensity falloff 25 // angle of the cone within which the light is gradually dimmed to 0 point_at <0,-1,0> // direction in which light points - in this case, it points down, because 1x1 plate has basic orientation in LDD with stud hole down and we want the light to come out of stud hole matrix <-0.98659539222717285,0.16226089000701904,0.017338469624519348, 0.068929694592952728,0.51068824529647827,-0.85699862241744995, -0.14791196584701538,-0.84431588649749756,-0.51502722501754761, -0.93709433078765869,1.818144679069519,2.5724301338195801> // this is the same transformation matrix as is specified in declaration of brick_4 media_attenuation on // media will influence the intensity media_interaction on // media will make light beam visible } // this box is filled with media, that interacts with light beam and makes it visible box { , pigment { rgbt 1 } hollow interior { media { scattering { 1, 0.2 extinction 0.01 } samples 30 } } } // wooden floor starts here #include "woods.inc" #declare Floor_Texture = texture { pigment { P_WoodGrain18A color_map { M_Wood18A }}} texture { pigment { P_WoodGrain12A color_map { M_Wood16B }}} texture { pigment { P_WoodGrain12B color_map { M_Wood18B }} finish { specular 0.25 roughness 0.02 reflection { 0.1, 0.3 } } } plane { y, min_extent(ldd_model).y texture { Floor_Texture scale 5 rotate y*90 rotate <5, 6, 5> translate z*15 } } I have seen similar question from somebody else from China using some local antivirus. I am using NOD from the ESET software and checked also the published files (to make sure, they were not altered). I presume some heuristic analysis in Kaspersky could be the source of similar false alarms. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
ldd_part_position_variances.inc first defines 3 constants, if not defined: ldd_ppv_x_shrink_amount, ldd_ppv_y_shrink_amount, ldd_ppv_z_shrink_amount. These define how much smaller the bricks should be comparing to original LDD dimensions. Modifying these values will result in larger gaps bewteen bricks which have some variance defined. It is enough to define custom value at the top of the POV file like this: #declare ldd_ppv_x_shrink_amount = 0.006; Then there are some "typical" brick variations defined. Like ldd_1axis_symetric_top_studed_ppv or ldd_2axis_symetric_top_studed_ppv. They consist of definition of shrinking in each direction, tilting in each direction and rotation in each direction. Shrinking generates gaps. Rotation is a result of a building process - people usually do not pay attention to the exact orientation of some bricks, so logo on studs might be rotated. Or steering wheels, technic pins may be randomly rotated. Tilting is a result of brick not being attached precisely enough. Amount of tilt is related to the amount of shrink (gaps), because with real bricks, brick has to fit between neighbouring bricks - it cannot be tilted too much, otherwise it would overlap next bricks. These typical variations are then assigned to some bricks based on similarity in position variability. Like steering wheel and technic pin are similar in position variability. Car rim with pin hole can be also freely randomly rotated. Car rim with cross hole can be rotated only in 90 degree steps. Car tyre can be freely rotated on rim. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
I like those two bikes with added scenery. Technic models take longer to render, because technic beams need more bevels for each hole. Two weeks ago POV-Ray made a final release of version 3.7 and for this version latest version of LDD2POVRay is necessary. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Your models look really great great. Files having names starting with ldd_best_ do not exist in real life, they were just examples of files with custom settings. You can take ldd_finishes.inc, copy it to ldd_my_finishes.inc and try to make custom settings. Metallic materials are tricky to render, they need some nice surrounding environment to reflect, so finding realistic looking definition may require a lot of work. Pearl finishes are even more complex. If you will improve them, please, share the definition with us. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Why is the POV-Ray trying to access that directory? Did you put it into some ini file? It should not be accessed directly by POV-Ray. Could you please, post your messages pane from the POV-Ray so that we will see what settings you have. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
Please, first find the db.lif on your disk using windows search function. Then setup the db.lif path in the converter according to that. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
That checkbox serves mainly to allow conversion while LDD is running (since LDD is using db.lif file in exclusive mode, it cannot be read by the converter). If you do not generate includes at least when you convert some model for the first time, POV-Ray may miss some needed include files. You should find the file somewhere. -
What may be posted / not be posted
hrontos replied to thehuuf's topic in Digital LEGO: Tools, Techniques, and Projects
I can imagine, that also some software using LDD brick geometries without revealing them could be acceptable for the LDD team. For example instruction step generator/editor would perfectly fulfill these requirements. Or some windows shell extension for displaying info about LXF content. Exporters/converters to some general formats are not acceptable, since they directly reveal TLG's brick geometries which are considered proprietary. -
[Software] LDD2PovRay
hrontos replied to Superkalle's topic in Digital LEGO: Tools, Techniques, and Projects
May be a stupid question: is it possible that you did not run LDD yet? This db.lif file is created by the LDD when it starts for the first time. And it is possible, that this file will be in a different location, since custom location can be specified in the LDD ini file. Could you please, search for the db.lif file on the disk? -
41999 Top 100 Winner
hrontos replied to haiout's topic in LEGO Technic, Mindstorms, Model Team and Scale Modeling
I think, I am the guy having the missing bag. I compared my bags with the picture of all bags and I have twice the middle bag from the last row of bags with nr. 2 and the right most bag nr. 2 from the same row is missing. -
Mine is 15700. Looking forward to build it with my kids. It will be fun for next few days. Thank you LEGO.
- 220 replies
-
- 41999
- lego technic
-
(and 2 more)
Tagged with:
-
Extendable Shock Absorbers Hack
hrontos replied to pocketpc's topic in Digital LEGO: Tools, Techniques, and Projects
I think 5 resets the view. Since these files contain 2 shock absorbers with one half put 5000 units above base plane, reset of view will try to take it into account and it looks like everything disappeared. These hidden halves have 0 as material ID and so rendering of a LDD model containing these modified parts with LDD2POVray will fail. It would be better to change it to some real material ID before rendering.