![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
As you maybe remember, I'm programming ssRay, a Monte Carlo path tracer.
Next I'd like to add mesh support for more interesting shapes. What
would be the most common mesh file format? Or at least common enough AND
simple?
Regards,
Severi
ssRay:
http://www.saunalahti.fi/~sevesalm/ssRay/ssRay.php
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I'd suggest the Wavefront OBJ file format...
http://en.wikipedia.org/wiki/Obj
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Kyle" <no### [at] spam ok> wrote in message news:497dbbf7$1@news.povray.org...
> I'd suggest the Wavefront OBJ file format...
>
> http://en.wikipedia.org/wiki/Obj
OBJ is a decent format, but I'd say 3DS is still unfortunately the most
common one.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kyle <no### [at] spam ok> wrote:
> I'd suggest the Wavefront OBJ file format...
>
> http://en.wikipedia.org/wiki/Obj
OBJ is extremely simple, too. Just ASCII text, so I was able to
reverse-engineer it and make a shell script to convert it to mesh2 format. 3DS
appears to be binary formatted which, while not difficult to work with, is that
much more complex for debugging.
- Ricky
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
I found that aspect of OBJ extremely useful in testing my exporter for Hash
AM. I could just open the file and see if everything was being written
correctly.
Another advantage of OBJ is that it support quads. I think 3DS only supports
triangles?
"triple_r" <nomail@nomail> wrote in message
news:web.497dc5c7c930bdbfef2b9ba40@news.povray.org...
> Kyle <no### [at] spam ok> wrote:
>> I'd suggest the Wavefront OBJ file format...
>>
>> http://en.wikipedia.org/wiki/Obj
>
> OBJ is extremely simple, too. Just ASCII text, so I was able to
> reverse-engineer it and make a shell script to convert it to mesh2 format.
> 3DS
> appears to be binary formatted which, while not difficult to work with, is
> that
> much more complex for debugging.
>
> - Ricky
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Kyle wrote:
> I'd suggest the Wavefront OBJ file format...
>
> http://en.wikipedia.org/wiki/Obj
Thanks. OBJ seems fine. Any idea where I could find very simple .obj
files which contain (say) less than 100 triangles?
ssRay still lacks kd-trees so I don't want to wait millions of years
rendering that cool dragon model...
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
On 26-Jan-09 23:15, Severi Salminen wrote:
> Kyle wrote:
>> I'd suggest the Wavefront OBJ file format...
>>
>> http://en.wikipedia.org/wiki/Obj
>
> Thanks. OBJ seems fine. Any idea where I could find very simple .obj
> files which contain (say) less than 100 triangles?
>
> ssRay still lacks kd-trees so I don't want to wait millions of years
> rendering that cool dragon model...
use blender, wings3d or something like that and export a few basic
shapes as obj
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mike Hough <nos### [at] nospam com> wrote:
> Another advantage of OBJ is that it support quads. I think 3DS only supports
> triangles?
Rendering a (non-rectangular) textured quad is not an unambiguous process.
How do you do that? Dividing it into two triangles will get you a texturing
artifact.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp <war### [at] tag povray org> wrote:
> Rendering a (non-rectangular) textured quad is not an unambiguous process.
> How do you do that? Dividing it into two triangles will get you a texturing
> artifact.
Should be not too difficult: Just triangulate the nasty things.
As long as we're "only" talking about quads and not generic N-gons that should
not be a big deal. Find the shortest diagonal and cut it in two.
For users wanting more control over the results, advise them to triangulate
their models in a proper mesh editor.
At least it's one of those things I wouldn't bother too much about in the
beginning if I'd write such a program. For starters, a warning to the user and
a totally braindead automatic tesselation (or even total refusal to import the
file) should be an acceptable enough way to deal with the problem. It can
always be fleshed out in the future with more sophisticated algorithms.
It wouldn't be the first program to place certain restrictions on the data in
the .obj file to be imported. (How much software do you know, for example, that
accepts bezier patches in .obj files? Or was it nurbs? Even the number of
programs that can do arbitrary N-gons is probably quite limited; e.g. Poser
only accepts triangles and quads.)
BTW, there's another issue with 3DS files: As far as I see, there seems to be a
"hard deck" at 32k triangles. At least that's where various programs start
messing up their 3DS export (not only seen in freeware stuff like Wings 3D, but
also in commercial software like Poser 7).
Never seen such problems with .obj files.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
As clipka said, they usually get triangulated at render time. I have only
written exporters, not renderers, so I don't know how it is actually
handeled by the program after they are imported. However quads imported into
all programs I have tried using OBJ format do not appear to suffer any
texturing problems. This is an advantage in blender because subdivision
surfaces work much better on quads than on triangles.
"Warp" <war### [at] tag povray org> wrote in message
news:497e4b51@news.povray.org...
> Mike Hough <nos### [at] nospam com> wrote:
>> Another advantage of OBJ is that it support quads. I think 3DS only
>> supports
>> triangles?
>
> Rendering a (non-rectangular) textured quad is not an unambiguous
> process.
> How do you do that? Dividing it into two triangles will get you a
> texturing
> artifact.
>
> --
> - Warp
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |