I'm encountering a problem, as usual I tried to make it smaller and smaller until I would reach a point where it becomes clear what I've done wrong and after repairing that I rebuild.
But now I run into something I actually don't understand well enough. Let me start from the beginning:
I trying to create an object with Blender that is suitable for use on a 3D-printer. At one point I loose the color I've put via the lamp. Attached the Blender-file stripped of all unnecessary things down to the point I think is the core problem.
What I did basically:
- Used Blender v.2.77a, platform Mac OS X;
- Started with the default cube, fresh reload;
- I set the screen layout to scripting (because I use it later on)
- Next I open up a new window, set this to UV/Image-editor;
- In the 3D-View, I selected the default cube, go into edit mode, select all;
- Then I unwrap the default cube, I used the Smart UV Project, this shows a map (unwrap) of the cube;
- In the UV-Editor window I choose image, opened the image (prepared before in Photoshop, a sixfold copy of the same image, saved as Hazel2Cube.png);
- In the 3D-view in Viewport Shading I select the Texture option
- To light the object I've placed six area lamps, each parallel to one of the sides. I used a very small python script for this,
licht-basis.py
, go to the editor window open filelicht-basis.py
and run it via the run script button (once). When I project white light here (RGB colors 1, 1, 1) this shows as a crisp and clear object. I can export this cube to a Wavefront .OBJ file, open it in another program (e.g. MeshLab) and it looks good; - This can be seen in file:
cube-problem-1.blend
; - And I can export it to a wavefront file, see files:
cube-problem-1.obj
andcube-problem-1.mtl
The cube shows with the selected image on all sides, just open the attached .blend file to see this. So far, so good.
Problems:
- Now I change the scene by changing the color of the six area lights, I change the
varycolor
parameter toTrue
(last line in the editor window and immediately I see the result, but exporting this does NOT show these additional colors, the system uses the Blender and built-in Texture rendering by default. This can be seen in file:cube-problem-2.blend
, after exporting to a second set of files and comparing the filescube-problem-1.obj
andcube-problem-2.obj
only differ in the name and referencing to the .mtl-files. It seems that the color of the light is left out when exporting.
So is this an exporting problem or something that goes wrong in the render?
- Trying to use a more explicit render, I tried both the Blender and the Cycles, used viewport shading to rendering, they start, run for a few seconds (7?) and show "Done". In the 3D-view I see the lamp colors (although faintly, but they are there) But no image. Saving it in .obj shows the image again without the lamp colors, identical to the other files.
What am I doing wrong here?
How can I combine an image with other colors like the lamps here?
Files:
cube-problem-1.blend
cube-problem-2.blend
Hazel2Cube.png
licht-basis.py
cube-problem-1.obj
cube-problem-1.mtl
cube-problem-2.obj
cube-problem-2.mtl
PROBLEM.txt - this text
(I tried to attach all files, but failed in doing that...)
Thanks for at least reading this!
Regards, Wim.