Sign in to follow this  
___

[LDRAW] 3947a wrong logo-on-stud rotation

Recommended Posts

Today I have noticed that the crater baseplate from LDRAW has wrongly rotated logo-on-stud (as I am playimg with it in my LDD renders I took the original real LEGO 3947a baseplate - as I have them quantum here :grin: - for comparison): it should be parallel to the dune, that is the direction of the word should be from the smaller crater to the bigger one, now it is 90° to the dune which is wrong of course, so the word LEGO directing from the dune to the edge of the baseplate....it needs to be rotated +90°.

QUESTION: is here anyone who could say if it is achievable by .pov code manipulation or should we wait for the LDRAW developers/designers to make it right (and if so where to post it so they know?)?

Edited by bublible

Share this post


Link to post
Share on other sites

LDraw files don't include a Lego logo on the studs. The LDraw files just include studs, without anything on top of it. Some editors or viewers (for example LDview) have the ability to add the logo on the studs.

This can be done relatively easily, because studs are added as "submodels" in the LDraw part. So a editor or viewer can just replace all studs with a modified stud.

I have no idea how the software decides what orientation to use, but I think it just uses the same orientation as the studs.

But, a part author doesn't really care about the orientation of the studs, because studs are round (so it doesn't matter how you place them).

You could try to rotate all studs in 3947.dat and see if the logo also changes direction in LDview (I suppose you used LDview?).

At least, that's what I think what's the "problem" here. :grin:

Share this post


Link to post
Share on other sites

Yes, one possibilty is to rotate the knobs by 90°:

Try to identify the following codelines and insert either option 1 or option 2.

Option 1 may lead to a global rotation of all knobs in the povfile. For option 2 you have to include the rotate transformation for each knob!

I recommend option 2 !!!! :grin: Have fun!

povray_knob_rotation_1.jpg

That's the result after rendering the above code:

povray_knob_rotation_2.jpg

Share this post


Link to post
Share on other sites

Yes, one possibilty is to rotate the knobs by 90°:

Try to identify the following codelines and insert either option 1 or option 2.

Option 1 may lead to a global rotation of all knobs in the povfile. For option 2 you have to include the rotate transformation for each knob!

I recommend option 2 !!!! :grin: Have fun!

Thanx, I used option 1 cos from coder's point-of-view its much better, faster and less possibilities for errors (think about like 600+ times writing your option 2, nooooo waaaaay :laugh::grin: )...thanx a lot for the solution, papacharly :thumbup:

In fact I knew what to do (rotate<>), just did not know what variable stands there for the stud, silly me :blush:

Edited by bublible

Share this post


Link to post
Share on other sites

You're welcome!

BTW: And welcome to the LDraw community too! Wise decision. :wink:

In fact I knew what to do (rotate<>), just did not know what variable stands there for the stud

I was aware of that. But let me please add on more hint regarding this topic, especially for users which are no experts in Povray.

If you add

#declare lg_knob = object {lg_knob rotate <0,0,90>}

to the pov-file all subsequent knobs which are listed in the pov-file will be rotated.

To switch of this rotation you have to add

#declare lg_knob = object {lg_knob rotate <0,0,-90>}

after the last knob which has to be rotated.

For example:

#declare lg_knob = object {lg_knob rotate <0,0,90>} // So rotation is enabled

#if (LDXStuds)

object {

lg_knob // first knob to be rotated

matrix <0,0,-25,-25,0,0,0,-25,0,0,0,0>

matrix <1,0,0,0,1,0,0,0,1,310,0,310>

}

.....

.....

.....

object {

lg_knob // last knob to be rotated

matrix <0,0,-25,-25,0,0,0,-25,0,0,0,0>

matrix <1,0,0,0,1,0,0,0,1,-310,0,-310>

}

#end // LDXStuds

#declare lg_knob = object {lg_knob rotate <0,0,-90>} // Rotation is disabled and all following knobs are not affected any more

Sorry, I forgot to add this to my first post.

Share this post


Link to post
Share on other sites

The orientation of the stud logo is determined by the orientation of the "stud.dat" primitive itself, usually attention is paid to the orientation.

The below LDraw code shows the studs oriented in all directions:

1 4 10 0 30 1 0 0 0 1 0 0 0 1 stud.dat

1 4 10 0 -10 0 0 1 0 1 0 -1 0 0 stud.dat

1 4 -10 0 10 -1 0 0 0 1 0 0 0 -1 stud.dat

1 4 30 0 10 0 0 -1 0 1 0 1 0 0 stud.dat

Put it into a file and look at it in LDView, set it to "Primitive Substitution", Check "Texture Studs" and watch :-)

To have parts corrected, post your request in the LDraw Forum, Parts Request

Share this post


Link to post
Share on other sites

The orientation of the stud logo is determined by the orientation of the "stud.dat" primitive itself, usually attention is paid to the orientation.

The below LDraw code shows the studs oriented in all directions:

1 4 10 0 30 1 0 0 0 1 0 0 0 1 stud.dat

1 4 10 0 -10 0 0 1 0 1 0 -1 0 0 stud.dat

1 4 -10 0 10 -1 0 0 0 1 0 0 0 -1 stud.dat

1 4 30 0 10 0 0 -1 0 1 0 1 0 0 stud.dat

Put it into a file and look at it in LDView, set it to "Primitive Substitution", Check "Texture Studs" and watch :-)

To have parts corrected, post your request in the LDraw Forum, Parts Request

Thanx for the link :wink:

You're welcome!

BTW: And welcome to the LDraw community too! Wise decision. :wink:

Thanx, but basically I am still designing only with LDD till roland make new alpha version of his LDcad so I can test it and to know if I will change it for LDD, cos I all I needed from LDRAW was just this crater baseplate, nothing else for now... :laugh:

Anyway stuff like pneumatic hose and ability actually make things behave like in real life (roland's scripting) is something that will probably make memusing LDRAW as well or maybe LDRAW only, we'll see :grin:

Edited by bublible

Share this post


Link to post
Share on other sites

I've just noticed/realised another problem: with real 3947a that dune with those two craters has grainy surface like that on slopes, but the one in LDRAW has silky surface. I thought I could do it by simply adding some normal{} values to the mesh in .pov file but it seems to me like the dune with those craters creates one big mesh stretching across whole plate, not just thru dune itself - does anyone know how to add that grain surface to the dune? :sceptic::look:

EDIT:

Hm, strangely enough it seems like I made it BUT to my surprise it acts a bit differently as I was afraid that when I apply the normal{} on complete baseplate that grain will also be visible on flat surfase of the bp and studs but it looks like it is applied only to the dune so...I do not know why but it seems it does what I wanted, strange... :laugh::grin:

Share this post


Link to post
Share on other sites

Ldraw doesn't define surface roughness, it can only be done in LGEO. You will have to split the inc file in two and only apply the grain on the craters.

Share this post


Link to post
Share on other sites

Ldraw doesn't define surface roughness, it can only be done in LGEO. You will have to split the inc file in two and only apply the grain on the craters.

See my edited post above yours - I made it in .pov quite easily (to my big surprise tho :grin: )

grainonduneandcraters.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.