PDA

View Full Version : trianglestrip creation



jor1980
02-20-2010, 05:36 PM
Hi i have a problem i need to create trianglestrips from my meshes, i am using visual basic 2008 and i want to know if exists an opengl dll who allows to do it
Thankīs

Dark Photon
02-22-2010, 06:52 PM
Hi i have a problem i need to create trianglestrips from my meshes, i am using visual basic 2008 and i want to know if exists an opengl dll who allows to do it
Yes.

Care to share more of your problem? Somebody around here that does Windows can doubtless help.

First thing though: make sure you've installed the latest graphics drivers from your GPU vendor.

jor1980
02-23-2010, 06:00 AM
Hi i have a problem i need to create trianglestrips from my meshes, i am using visual basic 2008 and i want to know if exists an opengl dll who allows to do it
Yes.

Care to share more of your problem? Somebody around here that does Windows can doubtless help.

First thing though: make sure you've installed the latest graphics drivers from your GPU vendor.


i think that i explained myself wrong, what i tried to mean is that i have created a mesh with their faces defined by a trianglelist and what i want is to transform that trianglelist to convert it into trianglestrip, so i want to know if exists an opengl function for this or another way to do it.

Thankīs

ZbuffeR
02-23-2010, 07:07 AM
Try these :
http://www.opengl.org/wiki/Post_Transform_Cache#Using_the_cache

jor1980
02-23-2010, 08:03 AM
Try these :
http://www.opengl.org/wiki/Post_Transform_Cache#Using_the_cache

Thankīs i already knew nvtristrip, my problem is that i only know visual basic and the soruce code of nvtristrip is in c++, so i need a dll which has nvtristrip to use it with visual basic, Do you know if exists a dll for this?

Thankīs in advance

Dark Photon
02-23-2010, 08:13 AM
Thankīs i already knew nvtristrip, my problem is that i only know visual basic and the soruce code of nvtristrip is in c++, so i need a dll which has nvtristrip to use it with visual basic, Do you know if exists a dll for this?
Doubt it.

Dumb question: using carefully ordered triangles is all about performance. You're using visual basic which is not about performance. Why do you care about strips?

Second, using carefully ordered triangles is much more important than using the TRIANGLE_STRIP primitive. Strips are old school and basically dead except for trivial things such regular grids. You'll get the same performance from indexed TRIANGLEs where the triangle order is the same.

Finally, assuming you don't have to use TRIANGLE_STRIPs, AND you still want to code up a triangle optimizer in visual basic, then coding up Forsyth's algorithm in visual basic should be fun for you. It's pretty easy. There have been past posts here where folks have posted links to Forsyth implementations too in case you get stuck.

jor1980
02-23-2010, 08:42 AM
Thankīs i already knew nvtristrip, my problem is that i only know visual basic and the soruce code of nvtristrip is in c++, so i need a dll which has nvtristrip to use it with visual basic, Do you know if exists a dll for this?
Doubt it.

Dumb question: using carefully ordered triangles is all about performance. You're using visual basic which is not about performance. Why do you care about strips?

Second, using carefully ordered triangles is much more important than using the TRIANGLE_STRIP primitive. Strips are old school and basically dead except for trivial things such regular grids. You'll get the same performance from indexed TRIANGLEs where the triangle order is the same.

Finally, assuming you don't have to use TRIANGLE_STRIPs, AND you still want to code up a triangle optimizer in visual basic, then coding up Forsyth's algorithm in visual basic should be fun for you. It's pretty easy. There have been past posts here where folks have posted links to Forsyth implementations too in case you get stuck.

Hi, i am doing this not for a question of performance it is because i am building a tool to add new files to a game and the game files uses trianglestrips, so that is because i want to create trianglestrip using visual basic

ZbuffeR
02-23-2010, 09:53 AM
Put each triangle to a different triangle strip, done (not caring about performance)
Which game is that ?

jor1980
02-23-2010, 01:03 PM
Put each triangle to a different triangle strip, done (not caring about performance)
Which game is that ?

Is nba 2k10. How can i put each triangle in a different strip?

Imagine that i have two faces:
-first: 1,2,3
-second:4,5,6

Could you put me an example with those faces?

thankīs for all, i am very interested in solve this because i have made a lot of work to understand the stadium files to build new stadiums and if i donīt solve this i am not going to finish my tool

Alfonse Reinheart
02-23-2010, 01:18 PM
He was being facetious.

In any case, if you're serious about writing tools, you're going to have to learn C++ (or at least C++/CLI). Most utility libraries that you might want to use are not written in Visual Basic or a CLI language.

ZbuffeR
02-23-2010, 02:10 PM
two triangles:
-first: 1,2,3
-second:4,5,6

Poor-programmer-on-VB-conversion to tristrips :
-first strip: 1,2,3
-second: 4,5,6

:)

As said Alfonse, using VB will limit you a lot in what libs you can use and what you can do.

jor1980
02-23-2010, 02:41 PM
He was being facetious.

In any case, if you're serious about writing tools, you're going to have to learn C++ (or at least C++/CLI). Most utility libraries that you might want to use are not written in Visual Basic or a CLI language.

Please respect me, I am very serious i have already make some tools for that game that are used by thousandīs of people, To make a tool is not necessary to know a lot about programing, is necessary spend a lot of hours in front of an hexa editor to understand the files, but if you want to check my work here i give you the link of my created tools:


http://downloads.moddingway.com/file/1561.html
http://downloads.moddingway.com/file/602.html
http://downloads.moddingway.com/file/541.html

As you can see there my tools are being used by thousands of people, and are availabe in many other sites, so i am not facetious


I have one year programming and i know that if i want to improve i need to learn c++ but i canīt learn all that i need of c++ in a short time to solve my problem so that is a question that i will do in the near future

Alfonse Reinheart
02-23-2010, 03:52 PM
There are no VB or CLI libraries available for stripping triangles. You therefore have 3 options:

1: Write your own.

2: Make your tool use C++.

3: Make a bridge between VB and the C++ library.

jor1980
02-23-2010, 04:02 PM
if what zbuffer saids is ok maybe i donīt need to build trianglestrips, maybe if i create the meshes into a 3d design program and then extract the faces and i write them into the file like a chain of indices so here an example:
1.- face: 1,2,3
2.-face:4,5,6
3.-face:7,8,9

so if i write into the file in shorts values:

1 2 3 4 5 6 7 8 9 This must works?


if it works problem solved but anyway the 2 and 3 options that alfonse wrote could very interesting for future projects;so could i use c++ from my tool made in visual basic?and also i would like to know how to make a bridge between vb and a c++ library, this things could be very useful for me


Thanksīfor all your time

ZbuffeR
02-24-2010, 02:50 AM
1 2 3 4 5 6 7 8 9 This must works?
Probably not, depends how the file format is specified.
It is not possible (or at least impractical) to specify only one tristrip for a complete 3D model, so there must be a way to say "this is strip 1", "this is strip 2", etc.

For the VB-C++ bridge stuff, you would better search on general VB / C++ programming forums, as this has nothing to do with OpenGL, and few GL people use VB around here.