Re: [cgkit-user] On rendering ribs from imported 3ds and obj files ...
Brought to you by:
mbaas
|
From: Matthias B. <mat...@gm...> - 2008-08-26 21:07:41
|
Roberto Brunelli wrote:
> I am trying to render the ribs generated from a 3ds file and an obj
> file by cgkit.2.0.0alpha8.
> I am able to see the untextured surfaces using viewer.py for both formats,
> and I am able to render them from both formats.
>
> However:
>
> - rib from 3DS: the rendering is smooth, but untextured: no directory
> shaders/ is created by render.py
This is odd. Materials from a 3ds file should be taken into account and
translated into a RenderMan shader.
Can you check what material is set on the objects? Just print the result
of calling getMaterial() on the mesh (you may have to pass an index if
the mesh uses a material index other than 0).
Could it be that the mesh has no material assigned in the file?
> - rib from obj: the shaders directory is created, the rendering is
> textured but not smooth (tested with pixie and aqsis, after manually
> adding a light)
cgkit doesn't compute normals itself, it just uses whatever is stored in
the file (if there are any normals at all).
What software did you use to create the file? Maybe the exporter only
wrote the raw mesh without any normals (or there were no smoothed
normals available)? Are there any export options that may control this?
One thing you may try is exporting the mesh as a subdivision surface in
which case it will also be smooth. You can do that by getting hold of
the geometry and setting an attribute "subdiv". Example:
load("head.obj")
head = worldObject("head") # or whatever the name of the mesh is
head.geom.subdiv = 1
(the actual value of the attribute doesn't matter at the moment)
Any mesh geom that has this attribute will actually be exported as a
subdivision surface. The appearance in the viewer tool does not change
though.
- Matthias -
|