![]() |
【转帖】vectorization Of 3dsolids Not Enough Accurate
vectorization of 3dsolids not enough accurate
vectorization of 3dsolids not enough accurate hi, i am trying to create a 'exporter' to use openscenegraph as a plugin so we can visualize dwg files in a osg window. i used some code from examples so i get in a stage where i use geometrysimplifier and polylineout to process 3dsolids, and stablishing the initial render mode as gouraund (odgsview::rendermode rm = odgsview::rendermode(odgsview::k2doptimized + odgsview::kgouraudshaded) i get all 'triangles' from the simplifer, but even setting 'facetres' to 10, i obtain 'big' triangles so my rendering becames faceted. for me this is a problem as i want to apply lights, so now the scene is not accurate. is there any method to get a higher number of triangles? fyi: i checked that the winopengl.gs library gets a better resolution when using gouraud, any hidden feature? any opengl specific function you use? thanks in advance, israel ps: i have put, in a mistake, this message in the dgn forum. to any administrator, please delete it from that forum. last edited by israel.abascal@dgsproyectos.com; 4th november 2008 at 02:00 amfff">. reason: no news and it is a bit urgent hi again, can anybody help me? how the winopengl.gs get better results? thanks in advance, israel hi, i am not sure that i understand you, but shell methods returns you not only triangles, but normals at vertexes also. you can use this addidtional information to make entity more smoth. hi, thanks in advance... for every xxxproc (shellproc, meshproc, ...) i forward it to odgigeometrysimplifier::xxxproc(...) so, i am not wrong, i get results from odgiconveyorgeometrydumper:olygonout and odgiconveyorgeometrydumper:olylineout (you can see i have adapted, odvectorize example) in those methods, i forward the output to my own renderer: m_pdumper->output(numpoints, vertexlist); and m_pdumper->output(numpoints, vertexlist, pnormal); however, regarding the second one, pnormal is always null. is this pnormal the normal vector at the every vertex? or is this the normal vector of the 'triangle' the three vertexs i receive create? (in the case i mange to not getting null). maybe i have to force my code to extract geometry information from xxxproc instead of redirecting it to the 'simplifier' and get it from polygonout and polylineout? i recognize i am a bit lost with all of this, any help? thanks a lot again, regards, israel hi, you can see how simplifier results used into opengl and windirectx vectorizers. [gsopenglvectorizer.cpp] odgsopenglvectorizeview:olylineout odgsopenglvectorizeview::triangleout [exgidirectxgeometry.cpp] exgidirectxgeometry:olylineout exgidirectxgeometry::triangleout normals is not always present into simplified geometry, but they can be calculated manually in this case. |
所有的时间均为北京时间。 现在的时间是 11:09 PM. |