Archived

This topic is now archived and is closed to further replies.

Daivuk

Dessiner le contour d'un modèle (drawing the contour of a model)

Recommended Posts

Salut, comme je sais qu'il y a des gens qui parlent francais sur ce post, j'ai decidé d'en poster un en francais justement Bon, ma question est simple, et je sais que celà ce fait en Ogl. Je veux dessiner seulement le contour d'un modèle. Moi j'ai mon modèle 3d stoké dans un display list. Je veux juste voir le contour. En GL_LINE Comment? En utilisant une fonction ogl là, si celà signifi de faire des calculs mongoles, j'aime mieux laisser faire, pour ne pas tuer mon engine non plus là. Merci [edited by - Yann L on May 4, 2003 11:54:20 PM]

Share this post


Link to post
Share on other sites
ça ne va pas juste dessiner le wireframe ça?
Moi je veux le contour, jvas essayer ça, mais me semble que j''ai déjà essayé pis ça marchais pas. Anyway

Share this post


Link to post
Share on other sites
quote:

Je veux juste voir le contour. En GL_LINE


Pas possible. En tout cas, pas si facilement. Ce qu''il faudrais pour créer le contour en GL_LINE, c''est une opération géométrique complexe et souvent instable (''silhouette extraction''). OpenGL ne vas surement pas faire cette conversion pour toi.

Mais il y a une solution plus simple, le rendu cartoon. En principe, tu peux détecter le contour d''un objet par les normales des ces faces, en relation du vecteur de vue caméra (du point de vue vers le vertex, pour être précis). Ça, c''est un effet qui sera créer sur le GPU (par un shader spécial), et uniquement là: tu ne pourras pas directement accéder au contour, c''est un effet uniquement visible au rendu. L''avantage, c''est que tu n''auras pas de problèmes de stabilité geométriques. Il y a pas mal d''infos sur les sites d''nVidia et d''Ati, par example, sur celui-ci.

Share this post


Link to post
Share on other sites
Je ne parle pas le francais tres bien, mais j''essayerai.

Ce n''est pas tres vite, mais c''est tres facile:

Dessinez votre modele un peux grand (gl_scalef(...)) en noir, avec GL_BACK. Apres, dessinez-le un peux petit en blanche avec GL_FRONT. Vous pouvez utilise GL_STENCIL pour ca si vous voulez voir l''interieur de le contour.

Excusez-moi pour mon francais terrible!

Share this post


Link to post
Share on other sites
Mais de toute facon ce n''était qu''une question comme ça. Je ne suis même pas sur de l''utiliser cet effet là.

Mais tout de même, ça peut toujours être interressant.
le rendu cartoon doit etre la meilleur facon.

Share this post


Link to post
Share on other sites
hmmmm my french is frankly crap, however with the quick add of a web translator which assited me on the words i dont know i worked out what the opening sentance was (hey, gcse was along time ago)

"Hello, as I know that there are people who speak French on this post, I decidé of in poster one in French precisely "

Ok, thats all very well and good, HOWEVER anyone who CANT speak french cant benifit from this thread at all and someone else could well have been intrested in what your question was.

imo its VERY bad manners to post/talk in ones own langague when the primary langauge of a chatroom/msg board/whatever is say English.
No, i dont expect everyone to be able to speak english, or great english, and those who cant and make an effort i make an effort to understand because they are doing better than i could do in their language. (team games are another peeve of mine when you get 3 or 4 of french or germans on your team and start passing orders around in french and german despite it being an english server, but thats another story).

Anyways, thats my view, couldnt let the thread slide without it.
*wonders what would happen is we got alot of japanese speakers here and they all started speaking japanses to each other*

Share this post


Link to post
Share on other sites
Normaly, I post in english. Sorry for that one.
Thats true that people who talk another language can benefit of this post, if it was in english.
This one was just to see

Share this post


Link to post
Share on other sites
quote:

imo its VERY bad manners to post/talk in ones own langague when the primary langauge of a chatroom/msg board/whatever is say English.



[offtopic]
It's always easy to tell people "write in english", if english happens to be your own native tongue. But sometimes it can be hard to express technical questions in english for non native speakers. I personally find it perfectly acceptable to post an occasional question in a different language. If you're seriously interested in the topic, then I'm sure someone will summarize the topic for you in english, if you ask.
[/offtopic]

[edited by - Yann L on May 4, 2003 10:37:20 PM]

Share this post


Link to post
Share on other sites
I agree that the process of communication can be impeded if you are not fluent in the language that you are trying to speak or (even worse) write in... and technical discussions are even more troublesome; but I do think that this goes both ways. In another thread concerning picking objects in 3d (here) the last 3 post are in French.

Maybe, it would be beneficial to have someone that is fluent in the language of the post to additionally summarize the post as a courtesy to us more challenged. I know we could Babblefish the post but sometimes that doesn’t work out so well and the translation comes out hackneyed at best.

What would really be cool is if we had the ability to link a thread or a specific message to a translated message - as I said above this could go both ways... if a post were in English and someone needed the message to be translated to _F_I_L_L_B_L_A_N_K_ they could select the message and then select the language for the message to be translated to and then wait for some nice person to help... once the message is translated there could be an icon or some text showing that the message had been translated. Disk space is cheap right?

Anyway, thanks and Game On!

Dave "Dak Lozar" Loeser

Share this post


Link to post
Share on other sites
OK. To summarize this thread: Daivuk needed a way to draw the contours (the silhouette) of an arbitrary object in OpenGL. I suggested a technique closely related to cartoon rendering (see the nvidia link), because a geometric silhouette extraction can be expensive and is prone to mathematical instabilities. TerranFury proposed a quick and easy way to achieve a similar result, by rendering an object twice, first the backfacing polys in black, and then, while slightly reducing the size of the object, the front faces in white.

There you go. I even added a translation to the thread title

Share this post


Link to post
Share on other sites
lol

When a post begin in english, he finish in french, ans if he begin in french, he finish in english

thanks all. I think i got enough information to make it done.

Share this post


Link to post
Share on other sites