2

I have a very specific requirement, which is to : 1. read a obj file created in 3dsMax. 2. apply camera perspective projection on it 3. save the output in jpeg or any other image format

Please if someone could help me find a library or code to do this in python.

I have looked at pyglet, & pywavefront but could not succeed.

I want to build a web service for this use case hence the library has to be robust.

Please help me find the right tools.

1 Answers1

1

The simplest way probably would be to write a script with 3ds max api or maya api.. OBj are simple, You can write an importer by yourself, that is just a file with ASCII text, with position of verticles. As about

You can also use Away3D or simmilar. This may probbalby work in a browser

Kowalski Paweł
  • 594
  • 1
  • 6
  • 27
  • Hi, I need to build a web service for it on Linux Ubuntu. I think scripts would not give me the same efficiency in terms of speed. I am currently exploring PyOpenGL. I would be getting my 3d object files in standard format wavefront OBJ file. I am also looking for a universal library which will convert all 3d objects to PyOpenGL format. – ramit wadhwa Aug 28 '15 at 10:32
  • So the service is that someone uploads an obj model and You render it in "cloud" and output an image? [POVray](http://www.povray.org) can do this, I've never tried it, but was going to :) You can create a scene with lights and settings using [THIS](http://code.activestate.com/recipes/205451/) and then just render it in a povray. Probably :) You'd have to try this. As far as I know it can import obj files. – Kowalski Paweł Aug 28 '15 at 10:48
  • Still, the simplest way to create this would be probably to create a script for Blender which imports a mesh to blender, to previously created scene with lights and proper settings, renders it there and outputs an image. Yes, this may be slow, but maybe it's worth trying. – Kowalski Paweł Aug 28 '15 at 10:48