Code Monkey home page Code Monkey logo

Comments (11)

rioforce avatar rioforce commented on August 18, 2024

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.

MinnieTheMoocher avatar MinnieTheMoocher commented on August 18, 2024

this request duplicates mine :) which I filed as #43

from ldr-importer.

virtualrepublic avatar virtualrepublic commented on August 18, 2024

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.

MinnieTheMoocher avatar MinnieTheMoocher commented on August 18, 2024

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.

rioforce avatar rioforce commented on August 18, 2024

@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.

MinnieTheMoocher avatar MinnieTheMoocher commented on August 18, 2024

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.

rioforce avatar rioforce commented on August 18, 2024

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.

virtualrepublic avatar virtualrepublic commented on August 18, 2024

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.

MinnieTheMoocher avatar MinnieTheMoocher commented on August 18, 2024

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.

virtualrepublic avatar virtualrepublic commented on August 18, 2024

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:

http://lego.virtualrepublic.org/render/10179_Millennium_Falcon_UCS/10179_Millennium_Falcon_UCS_Front_8K.jpg

http://lego.virtualrepublic.org/render/10179_Millennium_Falcon_UCS/10179_Millennium_Falcon_UCS_Back_8K.jpg

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.

le717 avatar le717 commented on August 18, 2024

Closing as semi-duplicate of #43 on grounds of tracker cleanup.

from ldr-importer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.