Comments (11)
This is going to be introduced in the new re-written LDraw Importer. I am currently working on the script. It is not production-quality yet, but it is at least in there. :P Unfortunately, we are unable to add it to the original (current) script, because of lots of errors in the importing process.
from ldr-importer.
this request duplicates mine :) which I filed as #43
from ldr-importer.
Also important: each brick must have a center. It would be very useful to keep this center and don't reset the position and rotation to zero.
from ldr-importer.
LDRAW has already solved that problem.
The brick files have a carefully chosen origin (not necessarily in the center),
and the instances using that brick
explicitly rotate around that brick's origin and then translate it to place it into the model.
The implementation to use here therefore can be very simple:
(a) simply read the brick file without rotation and translation when encountering it the first time.
(b) all places referring to that brick have the information how to rotate/translate it.
from ldr-importer.
@virtualrepublic I think we have that taken care of. In the "cleanup" options in the script, it sets the bricks origin to Center of Mass. I am planning to add an origin option in the 2.0 release of the script (probably not in the current version, because we are trying to get this 2.0 done because it's so much better :P )
from ldr-importer.
No, PLEASE don't modify the origin of bricks.
This is a wrong approach. The origin is chosen explicitly by LDRAW.
It needs to be kept there without modification, otherwise you will create utter confusion.
All LDRAW files refer to THAT origin by their matrices!
You should modify your algorithm to simply load a brick and NOT modify its origin or rotation at all.
When an instance refers to a brick, the LDRAW matrices explicity require
that the brick is at its original LDRAW origin.
You can very simply take over the LDRAw matrices for rotation/translation.
There is NO additional logic required.
Fiddling with the brick's origin is a Bad Idea (TM)!
from ldr-importer.
I said we would add an option. It is very difficult to work with bricks with the origin on the corner of each brick. And instead of setting the origins myself from within Blender, we added an option to make it center of mass. And we will keep this option, and allow people to choose between center of mass and original LDraw origin in the import functions. Which one will be default, however, is not decided yet.
from ldr-importer.
I can set in my 3d software the center centered to the bounding box. Important is: keep the orginal SRT of each brick. Actually I get a scene where the center and rotation of all objects is set to 0,0,0.
from ldr-importer.
Well, regardless if it is an option or not,
if you modify the origin, ALL rotation and translation matrices which you load
from an LDRAW file will BREAK unless you adjust them for the modified origin.
That will be a BIG hassle.
My strong, strong suggestion is PLEASE, PLEASE, PLEASE do not modify the origin
of any imported file.
from ldr-importer.
The ultimate renderstresstest with over 5.000 bricks what will take full 32 GB of RAM and patience. Check out the 8K version with impressive details:
This definitely needs instances. It was extremely hard and time consuming to convert and setup. The Millennium Falcon might be the fastest ship of the galaxy but not in 3d. *:-)
from ldr-importer.
Closing as semi-duplicate of #43 on grounds of tracker cleanup.
from ldr-importer.
Related Issues (20)
- Install errors on OS X with version 1, 3, 0 HOT 5
- Missing LDraw Search Path on Linux HOT 2
- problem: 'cannot find c:/Ldraw' HOT 3
- ldr-importer does not import all lego blocks HOT 19
- Can't install 1.3.1 HOT 3
- Incorrect Normals / Broken Normals with some random parts/bricks HOT 2
- Unexpected normals when cleanup disabled HOT 1
- Model file contents too short to extract header HOT 7
- 1.3.2 doesn't work - back to 1.2.0 HOT 4
- Using LDR-Importer from python API HOT 2
- "Basic Cleanup" function corrupts LEGO logo in open studs HOT 3
- FBX export is not supporting Cycles nodes HOT 1
- Problem: cannot find Ldraw installation at c:\ HOT 1
- Path's reset of LDraw Parts Library
- Cannot Find LDraw Installation at C:/Ldraw HOT 4
- Doesn't load model
- LDD to LDR, missing pieces, moved pieces HOT 1
- LDD-Importer-Exporter for the future HOT 1
- I can't use this addon
- Traceback call issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldr-importer.