POV-Ray : Newsgroups : povray.unofficial.patches : Calling all uv experts... : Re: Calling all uv experts... Server Time
2 Nov 2024 13:18:11 EDT (-0400)
  Re: Calling all uv experts...  
From: Cliff Bowman
Date: 25 Aug 1999 13:22:58
Message: <37c41de5.11960634@news.povray.org>
On Wed, 25 Aug 1999 01:20:38 GMT, c.b### [at] cwcomnet (Cliff Bowman)
wrote:

[snip]>
>I think I'm probably going to have to switch to the "mesh" syntax
>(instead of mesh2). 

[snip]

Well I HAVE switched to mesh, tidied my code up a bit (including
renaming some variables - drastically - to make the code easier to
read), found a bug or two and now it's working perfectly. At least, as
far as it's got. Aside from the speed (it's interpreted BASIC so it
runs like glue off a cold shovel - plus my coding's a mess) it's a
slight improvement on OBJ2POV (at least - for me). It produces 2 files
for a given .OBJ - one containing the meshes (an .inc) and a "sampe
scene file" with a camera, couple of lights, and texture declarations.

You don't have to pre-process the .OBJ file, the model is
automatically adjusted to POV orientation (assuming Poser was the
source) and I've a ton of features to write yet.

The source of my problems? Well aside from a few bugs (silly things -
mainly typos exacerbated by poor naming of variables) was that neither
uvPOV not Superpatch POV seem to get on well with adjacent triangles
having their U and V co-ordinates (at the same vertex) wildly
different. This happens a lot with .OBJ files and with both mesh2 and
mesh statements I was trying to make 1 big mesh in the hopes that it'd
be faster. Bad move. Keep the original groupings (and cut existing
groups into subgroups where more than 1 material is used, just to be
on the safe side) and it comes together swimmingly.

Still don't know why uv mapping the mesh syntax works better under
uvPOV than SuperPatch POV though :(

I'll post a test render of the female nude (but cleaned up slightly,
this is a family group after all - I think) at the same time as this
post.

Mick - if you want the code at any stage just holler, but there's
plenty more I want to include *if I can* so it might be worth waiting
until I've either reached at least version 0.5a or (better still) have
an executable Visual Basic 5 version (I don't have VB6 which
supposedly produces faster code than VB5).

However - reasons to wait (or "things I'd like to implement but no
idea if I'll succeed).
Mesh2 format (as an option if nothing else)
Batch conversions for animations (my MAIN reason for writing OBJuvPOV
- vying with the ability not to have to pre-edit the .OBJ files and
post-edit the .POV files)
Read image_map names, and possibly colours and ambience (and whatever
else I can decode and get working) from the .mtl file that Poser
exports along with any .OBJ
Oh - some error handling would be nice. At the moment it pretty much
works with files which are structured exactly as it expects them to be
- I need to build in more exceptions-to-the-rule... for example
sometimes Poser doesn't export vertex, UV AND normal data for a given
"face" but only two (for some objects) - and I'm not sure which two.
Clothes and/or hair seem to be the likely candidates, so I need to do
some delving to double-check what Poser's doing.


However - that lot's going to take some work (with my skill level) so
don't be afraid to holler if you want it "as it is" - whenever.




Cheers,

Cliff Bowman
Why not pay my 3D Dr Who site a visit at http://www.who3d.cwc.net/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.