GL: Nurbs surface trimming? Examples of precise mesh generation?

Feb 22, 2009 at 4:50pm

GL: Nurbs surface trimming? Examples of precise mesh generation?

Hi,

I’m on a new architectural design project where audio analysis data morph 3D surfaces. Last year I had a similar project (some posts about it in the forum) where I used nurbs surfaces and modulation of the control points. This time round it has to generate more complex shapes. For example with cut-out’s and splits in the surface.

Question 1:

The openGL red book refers to nurbs surface trimming to make cut-outs: http://fly.srk.fer.hr/~unreal/theredbook/chapter11.html. I don’t find a reference to this in Jitter though. Is it implemented?

Question 2:

Unless I overlook something I don’t think jit.gl.nurbs surfaces will do for this project. I’m looking at jit.gl.mesh instead. My problem is that all the examples I can find use noise or sampled video/audio data as fuzzy input to the mesh object. None illustrate the use of the vertex, texcoord, normal, color, specular, edgeflag, tangent, bitangent, and index data inputs for precise/designed mesh control.

Does anyone know of examples of tutorials demonstrating this?

Question 3:

Can the geometry shaders be of any help here? The resulting shapes need to be exported as obj models.

As always, all help very much appreciated! Tanx Dieter

#42453
Feb 22, 2009 at 7:53pm

i can only answer question 2, and take a long shot at 3…

one way of getting geometry into jit.gl.mesh is to use the matrix output function of 3d jitter objects, which can then be processed via noise or audio modulation (for example).

the matrixoutput flag outputs a matrix of 12 planes, which can subsequently be chopped into relevant bits… the first 3 planes contain the geometry data.

there arent that many detailed examples of this type of processing as it seems to be quite project specific… i assume this is because it would be a lot of work to come up with a generic approach.

shaders are good because they get the gpu to do the donkey work, but writing geometry shaders is not that easy unless you are already well versed in shader languages. check some of vade’s shaders for examples of geometry processing.

finally exporting to OBJ could be tricky, search the forum for a post on this… i only had a brief look at the post, but it’s not that straightforward.

hope that is of some use!

justin

#151945
Feb 27, 2009 at 2:19pm

hi justin, tanx for your reply

ideally i wouldn’t use matrixoutput of jitter GL objects but generate my own geometry matrices algorithmically. at the moment i’m in the dark about how to do that precisely though. i guess i’ll try to reverse engineer the mesh outputs generated by the matrixoutput data of GL objects to deduce how it works exactly.

greets, dieter

#151946
Feb 27, 2009 at 7:04pm

this section of the redbook on vertex arrays might be useful:
http://www.glprogramming.com/red/chapter02.html#name6

gl.mesh is basically a wrapper for drawing vertex arrays (or VBO’s if supported). which means you just provide data per vertex in a matrix, and pass to the correct inlet. probably best to just start with position data, and try and make some precise manipulations using matrices, before worrying about the rest.

pelado’s recent patch comes to mind as a good example.
http://www.cycling74.com/forums/index.php?t=msg&goto=163219

#151947
Feb 28, 2009 at 10:08am

great, you nailed 2 issues for me there. the red book entry is exactly what i need. it s weird coz i read through the red book. seems like i overlooked it, or didn’t know yet that i needed it when i did, or i read the 1.0 specification where vertex weren’t implemented yet: http://fly.srk.fer.hr/~unreal/theredbook/chapter02.html seems the last option is the case…

and about pelado’s example, in another current project i’m creating similar complex gradient patterns. i had to use gradient images drawn in illustrator and used as masks for blending using slabs. next step was going to be working out how to do it all generated in max. guess i ve got my answer right there!

#151948

You must be logged in to reply to this topic.