Home Products Download Order Contacts


Subject: Re: get triangles more close to viewer


i guess what you want to do is to take all visible triangles and map
lightmap onto them

first - it's not exactly the way it's done, but it's interresting approach
second - you can't find your triangles by firing rays trough your octree,
what you need to do is to have some set of triangles that might be visible
and discard those that actually aren't visible. (google 'potencial
visibility set')
but anyway - you'll be rasterizing the triangles into your lightmap, which
leads to a simple problem - some triangles might overlap, which is wrong.
you need just to 'peel' front layer that is visible to your camera
simple sollution? use open-gl-like z-buffer and poly-d (stencil) buffer, if
you're familiar with shaders, you can even get interpolated normals and
positions. if you're going to do it in software rasterizer, s-buffer could
be better approach, you can check out s-buffer tute at
http://www.luki.webzdarma.cz/eng_07_en.htm (my english sucks and the
contents aren't much better, but it still might be helpful)


"Marco" píse v diskusním príspevku
> Hi, I have implement an octree on a triangulate mesh.
> I would like project a dynamic lightmap on mesh along viewer
> direction.I need to find triangles more close to viewer, and calculate
> new texture coordinates .
> How can I implement this using octree?
> Now I'm casting a ray along the viewer direction and the ray
> intersects an octree cell.
> How can I find the triangle more close to viewer inside to octree
> cell?
> In this method I found a only triangle.Maybe I have to use a sphere to
> get triangles most close to viewer?
> Please help me.
> Marco


View All Messages in comp.graphics.algorithms

get triangles more close to viewer =>

Re: get triangles more close to viewer

Copyright © 2006 WatermarkFactory.com. All Rights Reserved.