Imported lamp OBJ with calculated normals |
After a lot of help from the boost::python mailing list, I've managed to expose my Scene object to python. Although there isn't a lot of the C++ code exposed, the "infrastructure" for it is there so I can expose classes and individual functions quickly on a need-to-expose basis. Right now I have a python script, which compiles to a Qt resource in the binary and use it to import OBJs. Although it's fairly generic (lacks material support, ignores normals/UVs), it would be plenty trivial to import other geometry types with very little effort.
Fixed Normals
As I mentioned, I'm ignoring the normals provided in the lamp OBJ for now and recompute the normals per face (no smoothing). I've had a bug in the fragment shader for the longest time that I've ignored until I started moving the cube mesh away from the origin. Looking at the GLSL, it looks like I was transforming my incoming normal by my object-to-world. That made the translation factor muck up the vector. I ended up adding a normal object-to-world matrix that right now just consists of the model rotation matrix. It looks a lot better!
Basic Features
Import OBJs
Write python-based mesh importers
Tumble around scene in Maya-like camera
Render "test" to aqsis window
Next Step
Add a face mode and some tools (?in python?)
Send scene to aqsis
Make render settings (resolution at least) adjustable
Download
https://github.com/strattonbrazil/Sunshine
1 comment:
Public Relations Assignment Help
Geography Assignment Help
History Assignment writing Help
Assignment Help
Geography Assignment Writing Help
HR Assignment Help Online
English Dissertation Writing Services
Assignment Writing Services UK
Online Assignment Help UK
Assignment Writing Services
Post a Comment