agieocean / Headless3DCapture

Simple script for example capturing a 3D obj to an image file
2 stars 1 forks source link

3d Face object its is not working #1

Open varun-tangoit opened 5 years ago

varun-tangoit commented 5 years ago

Hey Hi,

For 3d Face i didnt have any mtl file with .bmp file also. can you please let me know how to remodify this python script.

Inside 3d object i have coodinates like this; v 1042.6796477673101 4137.4331208322565 1789.0430908203125 0.9764705882352941 0.9803921568627451 0.9607843137254902 v 1164.5546524347042 4158.765838832481 2000.73193359375 0.984313725490196 0.9803921568627451 0.9647058823529412 v 1187.295800811169 4067.3634443096084 2016.03125 0.9882352941176471 0.9921568627450981 0.9725490196078431 v 1069.1794403973745 4043.128099778119 1998.0009765625 0.984313725490196 0.9882352941176471 0.9686274509803922 v 1046.1023680144663 4028.762958915561 2061.73974609375 0.9803921568627451 0.984313725490196 0.9647058823529412


......... ...... ....

f 7529 7284 7283 f 7529 7530 7284 f 7530 7285 7284 f 7530 7531 7285 f 7531 7286 7285 f 7531 7532 7286 f 7532 7287 7286 f 7532 7533 7287

......

Please help me im stuck on this

agieocean commented 5 years ago

I'm sorry to keep having to ask you for details but can you provide me with the files themselves so that I may take a closer look at what is going on and provide with more proper information?

varun-tangoit commented 5 years ago

Hey thanks for the response. Here i have my input obj file, that i cant able to rotate and python doesn't works. pls look at this, pls hele me. Thanks @MaxLFarrell

input_obj_zip.zip

And Im got issue while process that above 3d object in python;

raise ValueError("Vertex format {} not supported by pyglet".format(vertex_format)) ValueError: Vertex format None not supported by pyglet

agieocean commented 5 years ago

The error its raising is odd, but I am experiencing the same issue regarding not being able to see the object itself which I believe has to do with how PyWaveFront deals with no materials being attached to the object. I am looking into that right now but I will have to pick that research back up later today.

As far as the error itself can you provide more details about the system you're running on as well as the version of python you are using so I can try to replicate this issue on my end (additionally please note if you encountered any errors installing the requirements.txt file)

varun-tangoit commented 5 years ago

Thanks @MaxLFarrell. My Python version 3.6.6 and i didn't have any issue on installing pywavefront. Yes i doesn't have any material on this. can you please run the python headlesscapture for my input obj file. Thanks again! Please help me on this issue.

agieocean commented 5 years ago

So I've taking a closer look at it, it seems that the problem was that however the generator you are working with made this the object was very large and also not centered. I've gone ahead and included a copy of the object centered and with a grey texture applied in the attached zip. I've also attached a blender file so you can see how your objs should be oriented to retrieve a screenshot properly. If you do not have blender you can get it here: https://www.blender.org/download/. Keep in mind that you can do this orientation with any 3d program you know how to use, blender is free so I thought that'd be the best thing to represent this in. I would also look into pywavefront's documentation a bit more if you're going to be using this extensively. Anyway, let me know if you experience any more odd behavior.

screenshots3d.zip

varun-tangoit commented 5 years ago

Hey thanks again!. Im generating 3d object from this https://github.com/YadiraF/PRNet github. is there anyway to modify that code to take snapshot? Input object file generation we wont able to change becuase it give good results as compared. But we need handle large vertices in the python and rotate respective angles. Can you please give me suggestion. Pleaseeee

agieocean commented 5 years ago

Oh wow! Yeah I'll look at the source code to figure out a way to programmatically line everything up, I'll have more time to do this tomorrow so I'll let you know what I work out then

varun-tangoit commented 5 years ago

Sure Please let me confirm. I'm waiting for your responses. Thanks And where you created screenshots3d.zip or which tool you are using or is there any python codes avaialble pls let me know.