Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Can I participate in development? #78

Open
ghost opened this issue May 18, 2014 · 24 comments
Open

Can I participate in development? #78

ghost opened this issue May 18, 2014 · 24 comments

Comments

@ghost
Copy link

ghost commented May 18, 2014

I made some stuff as addon for Blender that works in close cooperation with your LDR Importer adding things you didn't add, like automatic seam effect, repairing strange shadowing on sloped computer bricks that happens after your import, replacing nodes of material with nodes of color from external linked file instead of making new material (therefore there is no need to iterate thru all objects searching for a material and then replacing everyone of them, you just replace nodes from the material itself which leads to automatic change in every instance of the material in every object having it that is much quicker and better way), parrenting etc.

So my question is: if you will we can join our efforts and implement my stuff to your LDR Importer...hm?

@rioforce
Copy link
Collaborator

Hi and welcome! If you would like to contribute to our LDR Importer, all you need to do it Fork the repo, put your changes on the fork, and create a Pull Request. Your changes sound good so far (some of them I don't quite understand, but I probably will when I test them out! ;) )!

@ghost
Copy link
Author

ghost commented May 18, 2014

well, I would like to but I never did anything like that and I do not understand what exactly did you write :)
Fork?
repo?
Pull request?
See english is not my native language but if you could be so kind and be more specific...I would appriciate it

@rioforce
Copy link
Collaborator

Here's a little tutorial that may help you. :)

https://guides.github.com/activities/forking/

If you want, you can just paste your updated script in a code box by wrapping it with the <code></code> Tags in this box. Hope I could help!

@ghost
Copy link
Author

ghost commented May 18, 2014

So I made my fork...now where to put my code part as you were saying above,,hm? Is there some kind of "chat/forum" under my fork where I can paste it? Should I now click PULL REQUEST on right and paste my code there?

...or can I click that "+" creating new file, name it bublible.py and paste there bits of my code?

Because as I said my code come in a form of separate Blender addon and not as your updated importer file

@le717
Copy link
Owner

le717 commented May 18, 2014

@bublible Here, I think these will help you out. https://guides.github.com/activities/hello-world/#branch https://github.com/le717/LDR-Importer/wiki/Contributing-to-LDR-Importer#getting-started ;)

Are your changes a separate script or actually a part of the importer? Going on what you said, it sounds like they were made in import_ldraw.py. In that case, simply take your version of the import script and overwrite the one already present.

Hey, it's no problem you are not sure what to do. This project has a tendency to attract new comers to git. 😉 I recommend reading all those GitHub Guides. They will definitely help you. ;)

@ghost
Copy link
Author

ghost commented May 18, 2014

@le717 no, it is separate .py file, addon for Blender that further improves your ldr importer ;)

Ah, I am kind of a super lazy person, so basically all I need to know now is WHERE CAN I PASTED MY CODE TO IT TO YOU GUYS? :) Everything else can wait, just to show you what you should add and how...of course only if you decide to do so...so, please tell me just where can I write it for you (I mean those main parts of my code)?

So if I understand what is written in the link you give me the only way I see is adding a new TEMPORARY FILE, let's name it bublible.py to the project and there I will put my code so you can check it, right?

  • warning: actually I am FLASH ActionScript2 guy who can't stand anylonger all that empty wishes and prayers of eurobricks.com ppl for functions they have not in Blender so I becomes angry and frustrated that no one is going to do it for them so I look at Python syntax, its objects, scripting etc. and after like 2 weeks I was able quite easily...well not easily but anyway...to write all they were asking for and now offering this for your importer cos I thought it would be better to have it all in one addon instead of two :):):)

@le717
Copy link
Owner

le717 commented May 18, 2014

OH! OK, I'm sorry. I was confused. My bad. We can get your fork set up later. 😉

Go to https://gist.github.com/, paste your code, name the file (give it a .py extension), save it (private Gist simply means only people with the link can view it), and paste the link here. We can see it that way.

Hey, that's fine. Python is a easy language to pick up. It's not an issue you are an AS2 scripter already. It doesn't really affect your Python skills (except maybe make it easier to learn since you already know how to "think like a programmer").

@ghost
Copy link
Author

ghost commented May 18, 2014

ok, let's work, ppl... :)

@ghost
Copy link
Author

ghost commented May 18, 2014

just a quick question: so should I save it as "Create Secret Gist", right?

  • also, if you will,,I can post picture of BEFORE and AFTER my addon was applied, just tell me where to post those two pics for ya?

@le717
Copy link
Owner

le717 commented May 18, 2014

It really doesn't matter which you do. Since you are pasting the link here in a public comment, people can technically still see a secret gist, but it will not seen in the All Gists feed.

Sure, why not. Just drag the two images into the comment box and they will be uploaded.


upload-image

(I messed up the GIF 😛)

@ghost
Copy link
Author

ghost commented May 18, 2014

@le717 haha, no problem my friend, here the .jpg for comparison for you BEFORE and AFTER my addon

03-comparingbublible py

@le717
Copy link
Owner

le717 commented May 18, 2014

Hey, that looks pretty good (including the render)! I'll let @rioforce comment on everything (he's a 3D artist, I'm a programmer :P), but I will say the brick seems looks to be similar to what was added in 92d510f.

Did you figure out how to create a Gist? I'd like to see how you performed these actions. :)

@ghost
Copy link
Author

ghost commented May 18, 2014

yea, I did, just being working on this pic now, so if you wait a bit more my code is on its way ;)

See, I do not know what was or was not added as I was not member of your "LDR Importer clan" :):):) ...therefor I did what I need tomhave not having it in official v1.1.5 that I downloaded

Also in my contingent is speckle or grain material for skew parts of sloped bricks but as I said rotation bug did not allow me to rotate replaced bricks as they should be so I commented that part of my code for a while now ;)

@rioforce
Copy link
Collaborator

Looks good so far! Can't wait to see the code! :)

@ghost
Copy link
Author

ghost commented May 18, 2014

Thanx, here it is + see my comment, and leave yours there let have it everything in one place, please ;)

  • sorry for REPLACE COLOR commenting, it's in slovak,,my native language (I need tomcomment it that way to be able quickly react and not think twice what did I meant with the words :):):))

https://gist.github.com/bublible/cef2df27a5ff2d0d21c2

@ghost
Copy link
Author

ghost commented May 18, 2014

ad 92d510f: I just see what @rioforce did but it is not enough, you will notice that just by shrinking down some bricks becomes out of line, you deffinitely need to also bevel it, mind you! ;)

@rioforce
Copy link
Collaborator

I just looked at your code, and it has some good stuff in it that I might be able to add into the importer as extra options (like the bevel). I am un-sure what the gold replacement does. Does it take all the materials with the color gold and change them to a glossy node setup that resembles real gold instead of just showing the color?

About the bevel, I'll see if I can add it as an option in the importer. Not sure though, because beveling can cause a lot of slowness when you have a large model imported.

The computer slopes problem has something to do with the original LDraw mesh and how it is importing (something is wrong with the original LDraw brick). I'll look into that as well. :)

@ghost
Copy link
Author

ghost commented May 18, 2014

ad colors: in "classic" technique I saw all around everyone is CHANGING MATERIAL ITSELF, what I did is I DO NOT CHANGE MATERIAL, I instead replace only its nodes which is much quicker cos you make it JUST ONCE compared to classic technique which requires looping thru all objects, looking if that object has that material, then removing that material and setting up new...bah, not good, I simply change material DATA on the higher level ;) That said I only change material nodes and that change automatically applies to all objects having that material... ;)

So as you may think my new material needs to be defined beforehand in another external .blend file, BUT as I commented in my GIT we could make it build fromscratch inside our code just like you did in your importer with other colors as I saw

  • my gold is really golden, your color or LDraw color, I do mot know wherefrom it comes, is simply a color without any anisotropicity in it, and as I have probably the biggest personal collection of LEGO Space here in Slovakia I have no problem check it accuracy with the real stuff ;)
  • having stright look on my render that goldeness is not that visible but still visible compared to oroginal, but if the camera was a bit from angle you would see its metalness grainy golden color as it should be in reality

P.S.: sorry for all those word mistakes, see I am writing from tiny virtual keyboard on my W8.1 tablet which alone is pretty lame :):):)

@rioforce
Copy link
Collaborator

I understand now. I have actually made node setups for the different materials (like gold or rubber for example) and some of them are already in the script, but for some reason the script is not reading those and it uses the default plastic everywhere...

@ghost
Copy link
Author

ghost commented May 18, 2014

@rioforce well,,if you point me to that part in your script where it deals with those colors I can look at it myself trying to repair it, if you don't mind?

...and BTW I think I can implement/integrate my code to you importer myself as well...will do it tomorrow, or better said today afternoon,,gotta go sleep now,,gee :):):)

@rioforce
Copy link
Collaborator

I think it is on line 180-191 where the material gets applied to the mesh (maybe) and on 413-690 is a list of materials. Here's a link

https://github.com/le717/LDR-Importer/blob/master/import_ldraw.py#L413-L690

@ghost
Copy link
Author

ghost commented May 19, 2014

@rioforce OK, will look into it a bit later because today I slept only for 3 hours...but who knows, as I know myself it can be very easily also right now, you know: scorpio sign :)

@ghost
Copy link
Author

ghost commented May 19, 2014

now making further improvements and some errors repairings to my code dealing with the color replacement so for a moment DO NOT USE THAT FEATURE ;)

@ghost
Copy link
Author

ghost commented May 20, 2014

all problems in my code solved, I will actualize my script shortly here in my GIT file

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants