Giter Site home page Giter Site logo

obj2png's People

Contributors

mikljohansson avatar pclausen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obj2png's Issues

Clipping

Hi,
Not an issue but a question/request.

I searched the web and can't find the solution so I was hoping you could help.

I am transforming my obj to png but would like to have the possibility to clip/cut the object. Not sure what the right word for it is but here is an example:

My object .obj file looks like this:
image

and comes out like this:
image

Another way of seeing this would be:
I would want to move the camera in space, to get very close to the object, or better go through the object, and halfway in in it, where the other half is out of picture and clipped, i would want to create a .png of the current view.

Any idea how i could achieve that?

Still have a bug in ObjFile.py

Thanks for your work. And I still have met this problem after I download the latest version code. Could you fix it again?
PS D:\obj2png-master\src> python obj2png.py -i 2.obj
Namespace(animate=False, azim=None, elevation=None, objfiles=['2.obj'], outfile=None, quality=None, scale=None, view=False)
Converting 2.obj to 2.png
Traceback (most recent call last):
File "obj2png.py", line 122, in
ob.Plot(outfile,elevation=elevation,azim=azim,dpi=dpi,scale=scale,animate=animate)
File "D:\obj2png-master\src\ObjFile.py", line 178, in Plot
ax.plot_trisurf(self.nodes[:,0],self.nodes[:,1],self.nodes[:,2], triangles=tri)
IndexError: too many indices for array
2.zip

AttributeError: 'Axes3DSubplot' object has no attribute 'set_box_aspect'

Running the script gave me throws this error. I suspect it is because of a version mismatch.
I think you should specify version numbers in your requirements.txt

Traceback (most recent call last):
File "obj2png/src/obj2png.py", line 122, in
ob.Plot(outfile,elevation=elevation,azim=azim,dpi=dpi,scale=scale,animate=animate)
File "/content/obj2png/src/ObjFile.py", line 184, in Plot
ax.set_box_aspect(np.ptp(limits, axis = 1))
AttributeError: 'Axes3DSubplot' object has no attribute 'set_box_aspect'`

Obj file loaded with incorrect apsects and scale

Hello,

First of all, this is a fantastic script, thank you.

I am noticing that the plotting of the obj is not the correct proportion. loading the attached file, I get
image
while opening it in windows gives me:
image

I would also like to change the color from blue to something else, and I haven't figured out how to do that yet.
Any help?

car2.zip

there is bug when I use my own obj file

thanks for your great work!!!
it is working well when I use the obj. file that you give, but when I use my obj file, there comes bugs as below:

python obj2png.py -i /home/wutao/SMPL-master/obj2png-master/src/rp_janna_posed_004_30k.obj -v
Namespace(animate=False, azim=None, elevation=None, objfiles=['/home/wutao/SMPL-master/obj2png-master/src/rp_janna_posed_004_30k.obj'], outfile=None, quality=None, scale=None, view=True)
Traceback (most recent call last):
File "obj2png.py", line 122, in
ob.Plot(outfile,elevation=elevation,azim=azim,dpi=dpi,scale=scale,animate=animate)
File "/home/wutao/SMPL-master/obj2png-master/src/ObjFile.py", line 178, in Plot
ax.plot_trisurf(self.nodes[:,0],self.nodes[:,1],self.nodes[:,2], triangles=tri)
IndexError: too many indices for array

Do you know how to solve this?
thank you so much!
rp_janna_posed_004_30k.zip

Error when executing on Max OSX

Hi,

I am trying to use your tool on my Mac.

I installed python3.

Now I do:

python3 obj2png.py -i bunny.obj -v

I get the following errors:

Traceback (most recent call last):
  File "/Users/xxx/obj2png/obj2png-main/src/obj2png.py", line 32, in <module>
    import ObjFile
  File "/Users/xxx/obj2png/obj2png-main/src/ObjFile.py", line 32, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

In line 32 of your code in obj2png.py, there is:
import ObjFile

How can I solve this problem?

Thanks.

ValueError: invalid literal for int() with base 10: '1/'

Hello dear pclausen,

first things first: thank you so much for this script, it is exactly what I need!

But when running the script as you propose, I am facing the following issue:

Traceback (most recent call last):
  File "obj2png.py", line 121, in <module>
    ob = ObjFile.ObjFile(objfile)
  File "/Users/obj2png/src/ObjFile.py", line 59, in __init__
    self.ObjParse(obj_file)
  File "/Users/obj2png/src/ObjFile.py", line 97, in ObjParse
    faces.append(ObjFile.ToInts(f[1:]))
  File "/Users/obj2png/src/ObjFile.py", line 133, in ToInts
    v.append(int(nn))
ValueError: invalid literal for int() with base 10: '1/'

Apparently, I am not able to fix this issue.
Can you help?

Cheers :)

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.