[LDPartEditor] First Alpha Version News (until 2014-09-19)


[LDPartEditor] First Alpha Version News (until 2014-09-19)
#1
I wish to announce that I am targeting to release the version 0.8.0 Beta on Monday, 24 December 2014.
Reply
Re: [LDPartEditor] First Alpha Version as a Christmas Gift
#2
Now that's a teaser Wink
Reply
Re: [LDPartEditor] First Alpha Version as a Christmas Gift
#4
Oh yeah, I'm really looking forward to your new editor. Maybe we could get a sneak peek for Nicholas (6th December)? ;-) Perhaps a first screenshot?

Rolf
Reply
Re: [LDPartEditor] First Alpha Version as a Christmas Gift
#3
I can merge it for you. But I think starting a new thread to announce a working copy is a good idea so would prefer not to.

Tim
Reply
Deadline Change
#5
I wish you a Merry Christmas! - Frohe Weihnachten! Smile
I do not manage to release the alpha version during the holidays..
You have to wait a little longer Wink

Nils
Reply
Re: Deadline Change
#6
Ohhh... one less Christmas gift this year... Wink
Reply
First Alpha Screenshots
#7
[Image: lpe_02.jpg]
https://lh5.googleusercontent.com/-_Gn7S...lpe_03.jpg
[Image: lpe_04.jpgg]
https://lh5.googleusercontent.com/-8iZPG...lpe_05.jpg

Well, it's all work in progress... :o)
Reply
Additional Screenshots from the 3D Editor
#8
Just a little demonstation of the multiple 3D view feature Wink
[Image: lpe_06.jpg]
https://lh3.googleusercontent.com/-F7CQq...lpe_07.jpg
https://lh5.googleusercontent.com/-cA4b4...lpe_08.jpg
Reply
Re: Additional Screenshots from the 3D Editor
#9
Uh ho... I can see a teapotahedron Wink
Reply
Re: Additional Screenshots from the 3D Editor
#17
First time I came across the Utah Teapot was back in 1990 when I wondered if I ever could do animations like this:

http://90.146.8.18/en/archives/prix_arch...ctID=10792

on my Amiga 3000 (I still have stored away somewhere).

w.
LEGO ergo sum
Reply
Re: Additional Screenshots from the 3D Editor
#18
You would have waited for years for the pictures to be rendered those days. Wink
Reply
Grid implementation done
#10
A first impression of the grid "feature":
[Image: lpe_grid.png]
Reply
Re: Grid implementation done
#11
Looks like the grid is scalable and ajustable for every single pane. Excellent! May I also change the color and the color of the background?

w.
LEGO ergo sum
Reply
Re: Grid implementation done - Note to Custom Colours & Shortkeys
#12
Willy Tschager Wrote:May I also change the color and the color of the background?
Sure, I am going to add this feature, too. As in LDPatternCreator, it will be possible to customise editor colours and shortkeys.
Reply
Text Editor Impression
#13
Stay tuned.. Wink
[Image: lpe_syntax_ok_1.png]
Reply
Re: Text Editor Impression
#14
Does it come with something SyncEdit did for LDDP?

http://news.lugnet.com/cad/?n=13719

w.
LEGO ergo sum
Reply
Re: Text Editor Impression
#27
Yes, it does.
Reply
[LDPartEditor] "SyncEdit" Feature
#49
ALT+SHIFT+R activates the simultaneously manipulation of the same vertex within the text editor.
[Image: sync_edit.png]
Reply
Startup dialog
#15
Last week, I implemented a little startup dialog which will be shown on the first start of the application. I am going to consider a option to use relative paths when the folder of LDPartEditor, the LDraw lib and your part authoring share the same base path. As a result, the application becomes portable.
E.g.

"base-path"<path-separator>LDraw
"base-path"<path-separator>Foo<path-separator>Parts Authoring
"base-path"<path-separator>Bar<path-separator>Baz<path-separator>LDPartEditor_(win32, linux, mac)

[Image: lpe_first_start.png]
Reply
Re: Startup dialog
#16
I can adapt, but presently my working folder is in a different partition from my LDraw library...
Reply
Syntax Highlighting
#19
The text editor will highlight errors and warnings when you key-in something wrong (e.g. a collinear triangle, a quad with bad vertex sequence, ...). It will also highlight keywords.

The file will be parsed on save. In this process, all errors, warnings and hints will be written to a list on the bottom of the window. You have the option to quick fix the issues if possible.

Finally, the updated 3D model will be rendered on the 3D editor screen.

edit: It might be is possible to implement a real-time parser (I already did it!!)

[Image: lpe_syntax_ok_1.png]
https://lh3.googleusercontent.com/-w28lJ...x_ok_2.png
[Image: lpe_syntax_error.png]
Reply
[Video] Text Editor with Drag & Drop Features
#20
I uploaded a simple 1min video to demonstrate this feature.
Reply
Re: [Video] Text Editor with Drag & Drop Features
#21
It's sometimes a bit hard to follow without comments, but I think I get the picture... The on the fly error spotting looks great!
Reply
LDPartEditor on Ubuntu 14.04 LTS
#22
I am still working on LDPartEditor. Here is a screenshot from Ubuntu 14.04 LTS running the LPE alpha without any proprietary graphics driver installed.

https://lh3.googleusercontent.com/-nJngN..._14_04.png
Reply
Re: LDPartEditor on Ubuntu 14.04 LTS
#23
Sweet. Looking good.

Tim
Reply
Re: LDPartEditor on Ubuntu 14.04 LTS
#24
Looking forward to the Windows version ;-)

w.
LEGO ergo sum
Reply
Test Environments
#25
I managed to setup a test environment for LDPartEditor.
By now, I am able to test it on:
  • Linux (32 and 64bit JVM [the "Java Virtual Machine"])
  • Windows XP (32bit JVM)
  • Windows Vista (32bit JVM)
  • Windows 7 64bit (32bit JVM + 64bit JVM)
  • Windows 8 64bit (32bit JVM)
  • {OS X for Mac 64bit (32bit JVM): This machine belogs to my dad. I can use it at rare intervals.}
Reply
Another Text Editor Teaser
#26
What I've achieved so far:
  • Undo / Redo feature
  • The tabs are movable and you can drag & drop it into another text editor window from LDrawPartEditor.
  • Efficient realtime syntax highlighting
  • Efficient realtime parsing
  • "Quick Fix" feature for syntax-, logic- and header-errors, warnings and hints
  • Cut, copy, paste & delete

[Image: new_teaser.png]
Reply
[LDPartEditor] First Appearance of 53588.dat :)
#28
Instead of drawing still teapots and spheres...
[Image: firstrender.png]
Reply
Re: [LDPartEditor] First Appearance of 53588.dat :)
#29
I don't quite understand what's the point of this since ldforge already is a thing...
Reply
Re: [LDPartEditor] First Appearance of 53588.dat :)
#30
What's the sense of having: MLCad, LDCad, SR3D-Builder, Bricksmith, etc. pp. ?!

I really like to have more than only one programme for the same purpose. Maybe there are some futures that are missing in an other application...

@Nils: I'm looking forward to a public beta.

/Max
Reply
[LDPartEditor] Integrated Backface Culling Support
#31
The implementation of the BFC specification (what is Backface Culling?) into LDPartEditor is done.

All BFC changes will be applied instantly.
[Image: bfc.png]

A "BFC NOCERTIFY" among others:
[Image: uncertified.png]

BFC CLIP / NOCLIP
[Image: clipnnoclip.png]

Here is another example of multiple views. The screenshot was taken before I finished the BFC feature.
https://lh4.googleusercontent.com/-cDj9Z...t_view.png
Reply
Re: [LDPartEditor] Integrated Backface Culling Support
#32
Closer and closer to release...??? Wink
Reply
Re: [LDPartEditor] Integrated Backface Culling Support
#33
Even a pre-alpha would do it. Better soon than perfect.

w.
LEGO ergo sum
Reply
Re: [LDPartEditor] Integrated Backface Culling Support
#34
I fully agree with Willy Smile
Reply
[LDPartEditor] Optional Lines
#35
The next implementation step were optional lines.

There are different ways to display these lines, e.g.:

1. Show all
2. Show all + control points
3. Draw them as described in the official specification
4. " + control points

However.. I will improve the rendering of (optional) lines in the future.

[Image: condlines1.png]
[Image: condlines2.png]
[Image: condlines3done.png]
Reply
Re: [LDPartEditor] Optional Lines
#37
How do you go about rendering conditional lines like that..? It apparently is a big hassle when you do it with OpenGL. What's the stunt here?
Reply
Re: [LDPartEditor] Optional Lines
#38
Imagine an optional line with the four points A2, B2, C2 and D2.

1. Take these points and multiply them by their perspective and modelview matrix M.
As a result you'll get A, B, C and D in screen coordinates.

Code:
Matrix4f.transform(M, A2, A);
Matrix4f.transform(M, B2, B);
Matrix4f.transform(M, C2, C);
Matrix4f.transform(M, D2, D);

2. Calculate the line normal

Code:
N.x = A.y - B.y;
N.y = B.x - A.x;

3. Calculate the discriminant r by

Code:
[b]r[/b] = Vector4f.dot(N, Vector4f.sub(C, A)) * Vector4f.dot(N, Vector4f.sub(D, A));

where Vector4f.dot() calculates the dot product of these two vectors and Vector4f.sub() the difference vector.

4. draw the line between A2 and B2 only if r > 0
Reply
[LDPartEditor] Improved Line Rendering
#36
[Image: hq_line1.png]
https://lh4.googleusercontent.com/-TcgGu..._line2.png
https://lh4.googleusercontent.com/--ezgc..._line3.png

edit: Two new pictures from the vertex development process

https://lh6.googleusercontent.com/-W7spE...rtices.png
[Image: vertices2.png]
Reply
Re: [LDPartEditor] Improved Line Rendering
#40
Big question is: Will I be able to select a vertex, move it with the mouse in 3D and all lines, cond. lines, triangles, quads connected will be affected by the move?

w.
LEGO ergo sum
Reply
[LDPartEditor] Vertex Manipulation
#41
Short answer: Yes.

Long answer:

There are different usecases for this scenario.

1.) As a user I want to select one / or more vertices move it with the mouse in 3D and all lines, cond. lines, triangles, quads (no vertices from type 1) connected will be affected by the move. An isolated vertex should be defined by a "0 !LD_PART_EDITOR VERTEX x y z" meta command within the file source code. The occurence of these meta commands will produce a discreet warning message. (this is already feasible with the current data model)

2.) As a user I want to select one / or more vertices which are linked to one / or more subfiles move it with the mouse in 3D and all lines, cond. lines, triangles, quads and subfile vertices connected will be affected by the move. (edit: this is now feasible with the current data model)

3.) As a user I want to select all vertices which are linked to one / or more subfiles move it with the mouse in 3D and all lines, cond. lines, triangles, quads connected will be affected by the move. (this is already feasible with the current data model)

The second use case is not trivial to implement, but it is possible.
Reply
[LDPartEditor] Backface Culling, Random Colours, Vertices, Mesh Lines, Lighting...
#39
[Image: view_demo.png]
Reply
[LDPartEditor] Edit different files in the 3D editor
#42
[Image: different_files_3d.png]
Reply
[LDPartEditor] Vertex Selection I
#43
Demo video on Youtube


1. Select all vertices, which are inside the selection rectangle.
[Image: vertex_selection_hidden.png]

2. Select all visible vertices, which are inside the selection rectangle.
[Image: vertex_selection_standard.png]
Reply
[LDPartEditor] Anaglyph 3D + Transparency
#44
Sample screenshot for anachrome red (left eye) and cyan (right eye) filters
https://lh6.googleusercontent.com/-FcKa5...arency.png
Reply
Re: [LDPartEditor] Anaglyph 3D + Transparency
#45
Dunno if this will proove useful, but it's fun for sure. Next step: Occulus Rift? ;D
Reply
Re: [LDPartEditor] Anaglyph 3D + Transparency
#48
Just check this with correct glasses. This looks great Smile

Can you maybe share a model like car.dat in 3D?
Reply
[LDPartEditor] Anaglyph Car
#50
[Image: anaglyph_car.png]
Reply
Re: [LDPartEditor] Anaglyph Car
#52
This looks indeed also very good Smile
Reply
[LDPartEditor] Integrated Text 2 Dat Converter
#46
LDPartEditor can convert text with a given font and size to a 3D mesh.
[Image: text_2_dat.png]
Reply
[LDPartEditor] VERTEX Meta Command
#47
[Image: vertex_metacommand.png]
Syntax:
0 !LPE VERTEX x y z

As you can see, the vertex definitions from the subfile are also parsed.
Reply
[LDPartEditor] Line and Face Selection I
#51
[Image: face_selection2.png]
[Image: line_selection.png]

Another visualisation of selected faces:
[Image: face_selection.png]
Reply
Re: [LDPartEditor] First Alpha Version News
#53
I would like to test the latest version. But according to SourceForge only the initial version is available?!
In the SVN-Repository is no building instructions. But according to the files commited I need eclipse. Do you ever considered adding a Maven-POM for building?
Reply
Re: [LDPartEditor] Self-made Build?
#55
Yes, I thought about it, but I am not going to change my project setup.
I will post detailed building instructions in the near future.
For now, I can only provide my ANT buildfile (for linux).

Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project LDPartEditor_linux">
    <!--this file was created by Eclipse Runnable JAR Export Wizard-->
    <!--ANT 1.7 is required                                        -->
    <target name="create_run_jar">
        <jar destfile="/home/nils/workspace/LDPartEditor/LDPartEditor_linux_x86/LDPartEditor.jar" filesetmanifest="mergewithoutmain">
            <manifest>
                <attribute name="Main-Class" value="org.nschmidt.ldparteditor.main.LDPartEditor"/>
                <!-- Modified Classpath -->
                <attribute name="Class-Path" value=". plugin/"/>
            </manifest>
            <fileset dir="/home/nils/workspace/LDPartEditor_linux/bin"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/LDPartEditor_linux/lib/lwjgl_util.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/LDPartEditor_linux/lib/lwjgl.jar"/>
            <fileset dir="/home/nils/workspace/org.eclipse.swt_linux"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/org.eclipse.swt_linux/swt.jar"/>
            <fileset dir="/home/nils/workspace/org.eclipse.jface/bin"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/jface/org.eclipse.core.commands_3.6.0.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/jface/org.eclipse.equinox.common_3.6.0.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/jface/org.eclipse.jface_3.5.0.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/jface/org.eclipse.osgi_3.6.0.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/jface/org.eclipse.ui.workbench_3.1.0.jar"/>
            <fileset dir="/home/nils/workspace/com.sun.tools/bin"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/runtime_compiler/tools.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/LDPartEditor_linux/swt-grouplayout.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/workspace/LDPartEditor_linux/swing2swt.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/eclipse/plugins/org.eclipse.core.databinding_1.4.1.v20130515-1857.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/eclipse/plugins/org.eclipse.core.databinding.beans_1.2.200.v20130515-1857.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/eclipse/plugins/org.eclipse.core.databinding.observable_1.4.1.v20130515-1857.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/eclipse/plugins/org.eclipse.core.databinding.property_1.4.200.v20130515-1857.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/eclipse/plugins/org.eclipse.jface.databinding_1.6.200.v20130515-1857.jar"/>
            <zipfileset excludes="META-INF/*.SF" src="/home/nils/eclipse/plugins/com.ibm.icu_50.1.1.v201304230130.jar"/>
        </jar>
    </target>
</project>
Reply
[LDPartEditor] Transform Control / Manipulators
#54
[Image: manipulator.png]
Reply
[LDPartEditor] First Example (Manipulator)
#61
LDPartEditor's manipulator will support
  • Local and global transformations, with a customisable pivot point ( [0;0;0] for global transformation )
  • Translation
  • Rotation
  • Scaling
  • A combined mode of Translation, Rotation, Scaling

  • Transformation of adjacent data (disengageable)
  • Subfile content modification (disengageable)

  • Protection mechanisms for official library parts (e.g.: the accidental translation of three vertices from a primitive like 4-4disc.dat)


[Image: manipulator2.png]
Reply
[LDPartEditor] More Manipulator Features
#63
I implemented a bunch of new features for the 3D manipulator in this week and the week before.
You can now...
  • ...transform the camera to the position and orientation of the manipulator.
  • ...swap and invert the manipulator axes.
  • ...adjust the orientation of the manipulator to the nearest vertex, edge, or surface normal.
  • ...adjust the position of the manipulator to the nearest vertex, edge, or surface.
  • ...adjust the position of the manipulator to the selection center.
  • ...adjust the position and orientation of the manipulator via the transformation matrix of a selected subfile.


PS: I will change the icon design and the icon order from time to time to better clarify the unique features which are kept behind these buttons and improve the usablility. By now, it's a little bit cryptic Wink


[Image: new_manipulator_buttons.png]
Reply
Re: [LDPartEditor] More Manipulator Features
#64
:-D :-D :-D
Reply
[LDPartEditor] Constructive Solid Geometry (CSG) - *UPDATED 2014-06 -24*
#56
LDPartEditor will also support CSG.

Here are screenshots from the first implementation draft:

A "union" with a cube and a sphere:
https://lh3.googleusercontent.com/-vo20S...csg_v2.png

A cube "minus" a sphere and its intersection with another sphere:
https://lh6.googleusercontent.com/-YZk9r...g_v2_2.png

RESULTS of the final implementation Smile
[Image: csg_complex_example.png]
[Image: csg_final_implementation.png]
Reply
Re: [LDPartEditor] Constructive Solid Geometry (CSG)
#57
Wow! You're going to make Intersector obsolete... and I thank you for that Wink
Reply
Re: [LDPartEditor] Constructive Solid Geometry (CSG)
#58
Nils, the king of teasers...
Reply
[LDPartEditor] CSG - A more complex example with DAT source code
#59
[Image: csg_complex_example.png]
Code:
0 // CSG commands can be used in subfiles, too
0 // The identifiers are non-global and bound to the file / subfile

0 // It is possible to inline CSG commands from subfiles

0 BFC CERTIFY CCW

0 // SYNTAX 1 0 !LPE [CSG FORM] [ID] [COLOUR] [MATRIX]
0 !LPE CSG_CUBOID    a  4 0 0 0 1 0 0 0 1 0 0 0 1
0 !LPE CSG_ELLIPSOID b  1 0 0 0 1.35 0 0 0 1.35 0 0 0 1.35

0 !LPE CSG_CYLINDER  c  2 0 -1 0 .7 0 0 0 2 0 0 0 .7
0 !LPE CSG_CYLINDER  d  2 -1 0 0 0 2 0 .7 0 0 0 0 .7
0 !LPE CSG_CYLINDER  e  2 0 0 -1 .7 0 0 0 0 .7 0 2 0

0 // SYNTAX 2 0 !LPE [CSG FUNCTION] [ID] [ID2] [ID3]

0 !LPE CSG_UNION c d d
0 !LPE CSG_UNION d e d
0 !LPE CSG_INTERSECTION a b f
0 !LPE CSG_DIFFERENCE f d f

0 // SYNTAX 3 0 !LPE CSG_COMPILE [ID]
0 // The COMPILE command displays the CSG volume on the screen
0 // Inlining the following line will generate triangles of the CSG volume
0 !LPE CSG_COMPILE f

0 // E.g.
0 // Inlined: !LPE CSG_COMPILE f
3 4 -10 1.5752766 7.3133416 -10 1.5752766 8.313231 -10 3.3930404 7.6749177
3 4 -10 1.5752766 7.3133416 -10 -2.6084895 6.481139 -10 -2.6084895 7.9504156
3 4 -10 1.5752766 7.3133416 -10 -2.6084895 7.9504156 -10 9.094947E-16 8.866396
...

edit: Adjusted transformation matrix syntax to LDraw standard
edit2: changed !LD_PART_EDITOR meta command to !LPE


Attached Files
.dat   inlined_csg.dat (Size: 116.18 KB / Downloads: 0)
Reply
[LDPartEditor] Hide Selection / Show All
#60
Similar to the behaviour of MLCAD, it is now possible to hide and show selected objects.
[Image: ghost_show.png]
[Image: ghost_hide.png]
Reply
[LDPartEditor] Colour Manipulation
#62
It's now possible to manipulate the colours.
[Image: Colour_Manipulation.png]
Reply
[LDPartEditor] Texture Mapping: TEXMAP PLANAR
#65
LDPartEditor will support the full "Language Extension for Texture Mapping".

Here are the first screenshots showing "!TEXMAP PLANAR" doing its magic Smile

..early version of the TEXMAP parser (you can see tiny white edges in the texture)..
[Image: TEXMAP1.png]
..early version with transparency..
[Image: TEXMAP3.png]

..now with improved image quality...
[Image: TEXMAP4.png]
[Image: TEXMAP5.png]
[Image: TEXMAP2.png]
Reply
[LDPartEditor] TEXMAP PLANAR / CYLINDRICAL / SPHERICAL (I need help)
#66
Code:
0 !TEXMAP START PLANAR 0 0 0 10 0 0 0 10 0 checker.png
0 !: 4 16 0 0 0 10 0 0 10 10 0 0 10 0
0 !TEXMAP FALLBACK
4 16 0 0 0 10 0 0 10 10 0 0 10 0
0 !TEXMAP END

0 !TEXMAP START  CYLINDRICAL 15 10 0 15 0 0 15 10 -5 3.14 checker.png
0 !: 1 16 15 0 0 5 0 0 0 10 0 0 0 5 4-4cyli.dat
0 !TEXMAP FALLBACK
1 16 15 0 0 5 0 0 0 10 0 0 0 5 4-4cyli.dat
0 !TEXMAP END

0 !TEXMAP START SPHERICAL 25 5 0 25 5 -5 30 5 0 3.14 3.14 checker.png
0 !: 1 16 25 5 0 5 0 0 0 5 0 0 0 5 8-8sphe.dat
0 !TEXMAP FALLBACK
1 16 25 5 0 5 0 0 0 5 0 0 0 5 8-8sphe.dat
0 !TEXMAP END

I don't know if it is displayed correctly. I need more information for the SPHERICAL and CYLINDRICAL projection methods since they are difficult to understand. I simply don't know what I should expect when I do a "SPHERICAL" or "CYLINDRICAL" mapping with !TEXMAP...

https://lh3.googleusercontent.com/-_lcQ5...AP_ALL.png
Reply
Re: [LDPartEditor] TEXMAP PLANAR / CYLINDRICAL / SPHERICAL (I need help)
#67
Purely from a 'feeling' kind of view, I don't think the cylinder and sphere are correct.

I have yet to implement/study the texmap extention for use in my LDCad but, I would expect the shapes to retain the checker pattern (but curved) in your example.
Reply
Re: [LDPartEditor] TEXMAP PLANAR / CYLINDRICAL / SPHERICAL (I need help)
#68
For cylindrical, definitely if you have the settings right to match the cylinder that you're mapping onto, the checkerboard should indeed wrap around the cylinder and look even. For a unit half-cylinder centered with its bottom at 0, 0, 0, I believe the parameters would be 0 0 0 0 -1 0 0 0 1 180. (I color coded the numbers to make it easier to read.) With those settings, the left edge of the texture would map to left edge of the half-cylinder, the right edge of the texture would map to the right edge of the half-cylinder, and the middle bottom of the texture would be at coordinates 0, 0, 1, which would be the bottom center of the half-cylinder's surface.

For spherical, I'm not completely sure what it's supposed to look like, but if you used the same texture map for all three shapes, I don't think what you have is right. However, I believe for a unit sphere at the origin with texmap params 0 0 0 0 0 1 1 0 1 180 180, the center of the texture would map to the point at 0 0 1, and the texture near that point would look fairly non-warped. The checkerboard would get progressively more warped as you move further from that point. The centers of each of the four edges of the texture would map to the edge of the half-sphere, and everything outside a circle inscribed in the texture's square would be invisible (out of bounds).
Reply
[LDPartEditor] TEXMAP CYLINDRICAL is now working.
#69
Thanks Travis. I finally managed to find a solution for the cylindrical projection.
Code:
0 // btw: I changed the unit to degrees instead of radians
0 !TEXMAP START CYLINDRICAL 15 10 0 15 0 0 15 10 -5 180 checker.png
0 !: 1 16 15 0 0 5 0 0 0 10 0 0 0 5 4-4cyli.dat
0 !TEXMAP FALLBACK
1 16 15 0 0 5 0 0 0 10 0 0 0 5 4-4cyli.dat
0 !TEXMAP END
[Image: TEXMAP_CYLINDRICAL2.png]
Reply
Re: [LDPartEditor] TEXMAP CYLINDRICAL is now working.
#70
Very nice,

I would expect the spherical one to look like the right green/yellow one on this page

https://en.wikipedia.org/wiki/UV_mapping
Reply
Re: [LDPartEditor] TEXMAP CYLINDRICAL is now working.
#71
Two things. First, it appears that the spec doesn't specify the units for the angle. However, since it is designed to be easy to use for part authors, I feel that it should be degrees.

Secondly, Phil's suggestion of what the sphere should look like may be correct, but I'm not sure. I'm not having any luck wrapping my head around the description for the spherical projection.
Reply
[LDPartEditor] TEXMAP SPHERICAL (with imperfect polar caps)
#72
[Image: sphere_problem.png]
A little defect is located at the polar caps (theta: ? phi: .5pi or -.5pi).
edit: This defect can't be solved.
Reply
Re: [LDPartEditor] TEXMAP SPHERICAL (with imperfect polar caps)
#73
'Little thing' Smile

For the outer top and bottom ones all horizontal angles are correct, so the only way to get a perfect textured sphere you have to take into account the other points of the triangle/quad you're working on (creating multiple vertices for the same top/bottom xyz).

The same problem with -180/180 coordinates. Don't you have this problem at the backside of the sphere/cylinder?

On the other hand I'm wondering if the spec was ment to be used on enclosed objects, it being projection orientated and all.

I'm also curious... how does it look when you map a texture on something when the outer edges of the texture don't align with ldraw points? e.g. a -60..60 deg on a 16 facet cylinder (texture should starts and end in the ~middle of a segment?)
Reply
Re: [LDPartEditor] TEXMAP SPHERICAL (with imperfect polar caps)
#74
Roland Melkert Wrote:On the other hand I'm wondering if the spec was ment to be used on enclosed objects, it being projection orientated and all.

One of the few places off the top of my head that I can see a use for spherical mapping would be to put texture onto a LEGO ball (like the Hero Factory mixed color shooter balls).

Roland Melkert Wrote:I'm also curious... how does it look when you map a texture on something when the outer edges of the texture don't align with ldraw points? e.g. a -60..60 deg on a 16 facet cylinder (texture should starts and end in the ~middle of a segment?)

The angle that the part author puts into the file is expected to match the angle covered by the textured geometry, so your question seems moot. Remember, textures are always applied to whole facets in the LDraw !TEXMAP extension. It's up to the author to specify correct !TEXMAP parameters for the geometry the texture is being applied to.
Reply
Re: [LDPartEditor] TEXMAP SPHERICAL (with imperfect polar caps)
#75
Travis Cobbs Wrote:One of the few places off the top of my head that I can see a use for spherical mapping would be to put texture onto a LEGO ball (like the Hero Factory mixed color shooter balls).

Maybe use two texture commands (on two half sphere's) for that (project one on to the top and one on to the bottom) to avoid the whole multiple correct uv coordinates for an LDraw point problem.


Travis Cobbs Wrote:The angle that the part author puts into the file is expected to match the angle covered by the textured geometry, so your question seems moot.

so it's up to the authors to pad the texture sources, I can live with that Smile
Reply
[LDPartEditor] Imperfect polar caps can't be solved.
#76
I took some backup from my university to solve this problem (a physicist and a professor in mathematics). It turns out, that imperfect polar caps are the effect of the mathematical definition of the perfect sphere and the limited resolution of our LDraw spheres. Ray tracers do not have this problem. The image on the wikipedia article, which was mentioned by Roland, was generated by a raytracer. An alternative solution would be to cut off the polar caps and use a planar projection only on the (nearly planar) polar caps.

The problem is not solvable mathematically under this circumstances and I do not intend to find a workaround which might expand the current TEXMAP spec.

This night, I will upload a video and more screenshots with different angle configurations to better visualise the capabilities of the TEXMAP meta command.
Reply
Re: [LDPartEditor] Imperfect polar caps can't be solved.
#77
Would you be willing to share your proof? I'm curious to read it.

Tim
Reply
Re: [LDPartEditor] Imperfect polar caps can't be solved.
#86
I found a "solution" here, but this would extend the current TEXMAP specification and assumes that every geometry placed around the polar caps is a triangle.
On the one hand, there is loss of texture information near the caps, since you can't project every point from the 2D image on the sphere.
On the other hand, it is impossible to find a solution for surfaces which are streched across the caps.

How do we proceed now?
Reply
Re: [LDPartEditor] Imperfect polar caps can't be solved.
#87
Nils Schmidt Wrote:How do we proceed now?

I'm not sure it's even supposed to be perfect, the initial spec (to me) doesn't seem to be targeted at enclosed objects anyway. Maybe it's just a case of the library manager (Chris Dee) setting some authoring ground rules.
Reply
Re: [LDPartEditor] Imperfect polar caps can't be solved.
#78
Hi Nils,

Would you mind posting the test texture (the checkerboard texture) you used? I would like to try an experiment with it to see if I can get spherical UV mapping without a polar artifact.

Thanks!
Ben
Reply
[LDPartEditor] Chequerboard-Texture
#79
http://www.brickshelf.com/gallery/BlackB...sphere.png
Reply
Re: [LDPartEditor] Chequerboard-Texture
#80
Is there a set of (unofficial) parts to use for testing? Preferable ones using all three kinds of mapping and some sort of nesting etc in order to test all texture usages in one go.

This thread made me want to give it a go to in LDCad too Smile, most work will go into setting up the support stuff though (and keeping normal rendering fast), but I'm hoping to get something going this weekend.
Reply
Re: [LDPartEditor] Chequerboard-Texture
#81
I only made planar projection parts, since this is the only projection supported by LDView (and the most useful I think, since to acquire images of real parts, you generally use a photo... planar!).
For examples, see http://forums.ldraw.org/showthread.php?t...58#pid9858 and http://forums.ldraw.org/showthread.php?t...21#pid7921
Reply
Re: [LDPartEditor] Chequerboard-Texture
#82
Thanks,

As for the types: for normal up front pictures planar would be fine indeed, cause the source picture automatically includes the projection stretch needed.

But when working with (official) Lego stickers you probably need to use the cylinder and or sphere to account for projection stretching/shrinking when the target area is (very) curved.
Reply
Re: [LDPartEditor] Chequerboard-Texture
#85
Good point for stickers on cylinder! More doubtful on sphere ;-)
Reply
Re: [LDPartEditor] Chequerboard-Texture
#84
Thanks! The attached pictures are the checker-board texture UV-mapped to a sphere using typical sphere-mapping from a 3-d modeler.

The left sphere is made from a small number of segments, the right a much larger number. Since the UV map is per vertex you can see the 'sphere' lines aren't well-projected on the left.

The 3-d modeler can get the caps right because for each vertex it knows the connectivity to neighboring vertices; a straight vertex->uv function is going to introduce discontinuities or wrap-around and possibly undefined results at the poles.

So theoretically if you have your triangles in advance and you are applying a mapping function to each one to pre-compute UV, you could 'solve' the poles with some analysis. I don't think you can do this in shader without geometry shaders and a ton of work.

I'm not a fan of using projection for part textures at all - the rest of the modeling world uses UV mapping, which makes the projection of parts, management of discontinuities, and other complex issues not the problem of the file format and every client that reads it.


Attached Files Thumbnail(s)
   
Reply
Re: [LDPartEditor] Chequerboard-Texture
#88
Ben Supnik Wrote:I'm not a fan of using projection for part textures at all - the rest of the modeling world uses UV mapping, which makes the projection of parts, management of discontinuities, and other complex issues not the problem of the file format and every client that reads it.

The spec was adapted on a 'as is' basis, mainly because it's (authoring) user friendless and the wishes of the spec author(s). I was not too happy with this but I believe most were happy with it. It's a bit disappointing there no real parts (except the one helmet) made to really test the spec yet though.

On the other hand we probably could extend the extension by adding a special meta line supplying hard coded uv cords for the next type 3 or 4 line in a file, e.g.

!TEXMAP UV NEXT 0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0
0 !: 4 16 ..........

to solve the really complicated authoring needs, but then again I'm not completely sure it was supposed to be used on enclosed objects anyway.
Reply
[LDPartEditor] Texture Mapping: Demo Video
#83
https://www.youtube.com/watch?v=1m3hsKbJ_II
Reply
Re: [LDPartEditor] Texture Mapping: Demo Video
#89
Seems ok to me, very nice.
Reply
[LDPartEditor] Adding Objects to the Model
#90
I am very busy right now.
Here is a new video on youtube which says more than 1000 words.
https://www.youtube.com/watch?v=S_6hx10kwZU
Reply
[LDPartEditor] Colour Picking (LDConfig + Direct Colours)
#91
[Image: colour_picking1.png]

[Image: colour_picking2.png]

[Image: colour_picking3.png]
Reply
Re: [LDPartEditor] Colour Picking (LDConfig + Direct Colours)
#92
Nils Schmidt Wrote:[Image: colour_picking2.png]

I would love to have this also as a table with the color icon and the color name next to it, not just a raster of all the icons (despite the name pops up when I hoover over it).

w.
LEGO ergo sum
Reply
[LDPartEditor] Colour Picking with a Table
#95
Willy Tschager Wrote:I would love to have this also as a table with the color icon and the color name next to it, not just a raster of all the icons (despite the name pops up when I hoover over it).

Search by name:
[Image: Colour%2BTable.png]

Search by number:
[Image: Colour%2BTable%2B2.png]
Reply
Re: [LDPartEditor] Colour Picking with a Table
#96
Hey! Looks nice. Any chance to get also the LDraw color number along with the name?

w.
LEGO ergo sum
Reply
Re: [LDPartEditor] Colour Picking with a Table
#97
[Image: Colour%2BTable%2B3.png]
Reply
Re: [LDPartEditor] Colour Picking with a Table
#98
Would it be possible to get the colours sorted in actual colour order, and not after colourname (alfabetical) or colournumber (numerical) ?

Or in a layout, like a colourwheel, but with only the defined ldraw colours choosable?

Or grouped after their properties: base, brighter shades, darker shades, transparent, chromed, speckled, rubber, common?
Some sort of colour coordinated ldconfig layout.

I would like to be able to compare all the different shades of e.g. yellow.
Reply
[LDPartEditor] Arbitrary-precision arithmetic
#93
LDPartEditor uses arbitrary-precision arithmetic for model transformations, error checking and rounding.
Reply
[LDPartEditor] Colour Scheme for BFC / TEXMAP+BFC NOCLIP
#94
blue = "BFC NOCERTIFY"
red = backface
green = frontface

normal colour = "BFC NOCLIP"

[Image: More%2BBFC%2Bcolours.png]

A combination with TEXMAP and BFC NOCLIP (the textured surface is not clipped).

[Image: BFC%2BNoclip%2Bwith%2BTEXMAP.png]
Reply
[LDPartEditor] Integrated Edger2
#99
https://lh5.googleusercontent.com/-oAcYP...Edger2.png

You can set the scope to the following levels:
  • File, Subfiles and primitives
  • File only
  • Current Selection

Default values:
af = 0.1°
ac = 60°
ae = 60°

The -cx and -cv options are not supported since LDPartEditor has other mechanisms to detect and remove invisible condlines.
Reply
[LDPartEditor] Background Pictures
It is now possible to define background images.

BG images can be created for custom viewing angles and positions.
A BG image is invisible if the viewing angle from the viewport does not match the viewing angle of the image.
You can scale the image on the x and y axis, too.

Code:
0 // SYNTAX:
0 // 0 !LPE PNG [color=#FF0000][pos X] [pos Y] [pos Z][/color] [color=#00CCDD][X axis rotation angle in degree] [Y axis rot.] [Z axis rot.][/color] [color=#FF9933][scale X] [scale Y][/color] [path]
0 !LPE PNG [color=#FF0000]0 0 10[/color] [color=#00CCDD]90 0 0[/color] [color=#FF9933]1 1[/color] \..\image.png


https://lh3.googleusercontent.com/-_zNOY...images.png
Reply
Re: [LDPartEditor] Background Pictures
Quote:You can scale the image on the x and y axis, too.
Something I missed for a long time in LPC (to compensate from photos taken at a slight angle).
Reply
Re: [LDPartEditor] First Alpha Version News
Can't wait for Christmas this year. ;-)

/Max
Reply
[LDPartEditor] Auto-Copy all required or related files to unofficial library
I implemented a feature which copies a selected file from a project (or the official library) to the unofficial library.
You can choose between three options:

1. Copy the selected file and nothing else
2. Copy the selected file and all required parts (if you copy stud.dat, it will copy 4-4edge.dat, 4-4cyli.dat and 4-4disc.dat)
3. Copy the selected file, all required parts and all related parts (if you copy stud.dat, it will copy 10.dat, 10p01.dat, 10p02.dat, ..., 17.dat, 20.dat, ... and all other files which contain a direct reference to stud.dat (type 1 line or !TEXMAP's 0 !: 1 ...)

Whatever you choose: LD Part Editor will warn you if it is going to overwrite a file which is already located in your unofficial lib.

https://lh5.googleusercontent.com/-UrIbj...icial2.png
https://lh4.googleusercontent.com/-9iWVH...ficial.png
Reply
Re: [LDPartEditor] Auto-Copy all required or related files to unofficial library
"Whatever you choose: LD Part Editor will warn you if it is going to overwrite a file which is already located in your unofficial lib."
Will I only be warned, or can I cancel this operation?
If I choose stud.dat with option 3, I am warned for each file and I can/have to decide for each file individually?

I do not understand why this 3. option is present at all?
Reply
Re: [LDPartEditor] Auto-Copy all required or related files to unofficial library
Michael Heidemann Wrote:Will I only be warned, or can I cancel this operation?
I do not understand why this 3. option is present at all?

You can cancel it, decide for each file individually or skip it ("Yes, to all" / "No, to all"). I implemented this, because it can be handy to know which files are affected when someone is going to change a specific (official) file which needs more work.

stud.dat is an exaggerated example, but this function will have its use.
Reply
Re: [LDPartEditor] Auto-Copy all required or related files to unofficial library
Probably, yes!
Nils, maybe you should start a fresh thread, this one takes forever to load with all images...
Reply
Re: [LDPartEditor] Auto-Copy all required or related files to unofficial library
I do not show the images, so its no problem for me. Smile
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 3 Guest(s)
Forum Jump:


Users browsing this thread: 3 Guest(s)