Author Topic: RBC Mjolnir Mk2 SCP Revision  (Read 11846 times)

0 Members and 1 Guest are viewing this topic.

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
RBC Mjolnir Mk2 SCP Revision
Looking cool :)
SCREW CANON!

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
RBC Mjolnir Mk2 SCP Revision
btw, will HT&L work fine even with non convex faces and faces with co-linear verts? and I suppose that faces should be also flat, right?

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
RBC Mjolnir Mk2 SCP Revision
the engine will interpret them as triangles since

1: they are always convex
2: they are always coplanar

the only disadvantage to trangulating such a mesh would be to increase file size.  loading time is pretty fast as it is and we still have a limit of 25000 polies per subobject.  even though you can make a 20000 poly ship thats untriangulated, once it is triangluated it can exceed that limit and bad stuff will happen

on the other hand, this is an extremely nice model and i'm looking forward to it toasting ships in style ;7
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

  

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
RBC Mjolnir Mk2 SCP Revision
Quote
Originally posted by PhReAk
the engine will interpret them as triangles since

1: they are always convex
2: they are always coplanar

the only disadvantage to trangulating such a mesh would be to increase file size.  loading time is pretty fast as it is and we still have a limit of 25000 polies per subobject.  even though you can make a 20000 poly ship thats untriangulated, once it is triangluated it can exceed that limit and bad stuff will happen



then what's the difference with retail fs2, except the polylimits?? :confused:

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
RBC Mjolnir Mk2 SCP Revision
The conversion process, most likely.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
RBC Mjolnir Mk2 SCP Revision
I think Phreak was talking about HT&L. Non HT&L has always had a problem with linear verts etc.

HT&L automatically triangulates the model so you should always leave as many quads and higher order polys in as possible as this will speed up loading time. Before you do make the model you should triangulate it and check that non of the subobjects have more than 25,000 polys though. Then convert the untriangulated version.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
RBC Mjolnir Mk2 SCP Revision
With HT&L, you're passing your geometry to the card and letting it determine how to convert it to triangles for rendering. With non HTT&L, you'd have to triangulate the model in the conversion or modelling processes.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
RBC Mjolnir Mk2 SCP Revision
mikhael, I may be wrong, but I think this was already happening before.
The gpus work with triangles, and they always triangulate the nontriangulated faces.
In fs2 retail, you don't have necessarily to triangulate your model at the end of the modelling process, nor I think was happening during conversion (elseway you should see a pof triangulated in modelview).
I made many untriangulated models for fs2 retail, in order to  go over the polylimits x subobject, you just had to don't go over 20 vertices for face, don't use convex faces, don't use colinear verts, don't use nonflat faces.
If I correctly understood, those limits are already present, except obviously the new huge polylimit ....then again, what's the difference?
I mean, you still have to stabilize the mesh if you don't want to triangulate
stabilize= manually subdivide non flat faces -if present-, convex faces, faces with colinear verts, faces with more than 20 verts..and let me say that this was bothering on 1000 polys ships, with 10000 polys ships it will be.....painful, to say the less

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
RBC Mjolnir Mk2 SCP Revision
Good to know.
Freelance Modeler | Amateur Artist

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
RBC Mjolnir Mk2 SCP Revision
Quote
Originally posted by KARMA
I made many untriangulated models for fs2 retail, in order to  go over the polylimits x subobject, you just had to don't go over 20 vertices for face, don't use convex faces, don't use colinear verts, don't use nonflat faces.
If I correctly understood, those limits are already present, except obviously the new huge polylimit ....then again, what's the difference?  


With HT&L you only need to worry about the first of those problems. The way I understand it you don't have to worry about stabilsing the model at all because the way the HT&L build triangulates the model takes care of them for you.

You don't have to triangulate for either retail or HT&L Mikhael. It's just that many people do because either they are too lazy, inexperienced or use Max and have no other choice.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
RBC Mjolnir Mk2 SCP Revision
You should still avoid faces that are blatently curved (mostly because UV mapping tends to **** itself if it can't resolve a normal) and cases where you've got either polygons inset in other polygons without any connecting edges (max won't let you do this, but TS does it like it was going out of style, especially when you boolean) or having faces which have inner angles greater than 180 degrees are generaly things to be avoided.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
RBC Mjolnir Mk2 SCP Revision
ahhh ok, this changes things a bit
so you have only to get rid of nonflat faces (wich is easy) and of convex faces (wich still remain painful on ships with so many polys)
Well, I think that without a real polylimit to be aware of, I will go for an intermediate solution, just detriangulating the faces that I'm sure don't need to be splitted in triangles, but things may change after I'll try different strategies with the first HT&L ships

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
RBC Mjolnir Mk2 SCP Revision
Quote
Originally posted by KARMA

I made many untriangulated models for fs2 retail, in order to  go over the polylimits x subobject, you just had to don't go over 20 vertices for face, don't use convex faces, don't use colinear verts, don't use nonflat faces.


I think these problems (particularly non-convex polys and degenerate polys) were a consequence of the conversion process, or a just-in-time triangulation process in the game engine. Either way, these things would be solved because the game engine now passes off raw geometry to the GPU (before GPUs the game engine had to pass triangles only. triangle setup was done in software) and lets it figure out the proper triangulation.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
RBC Mjolnir Mk2 SCP Revision
actually the code is very hacked as it is.  in a perfect world we'd do tri-strips and use index arrays (hella fast).  we actually have it kinda go off the old code and just interpret each polygon as a triangle fan.  we then stuff the verts into a giant array and send that off verts are repeated unfortunately.  as long as the number of triangles after triangulation is under 25000 or something you should be ok.  i think bob remembers all the limits

Code: [Select]

opengl_vertex_buffer *vbp=&vertex_buffers[idx];

glEnableClientState(GL_VERTEX_ARRAY);
if (vbp->vbo_vert)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbp->vbo_vert);
glVertexPointer(3,GL_FLOAT,0, (void*)NULL);
}
else
{
glVertexPointer(3,GL_FLOAT,0,vbp->vertex_array);
}

glEnableClientState(GL_NORMAL_ARRAY);
if (vbp->vbo_norm)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbp->vbo_norm);
glNormalPointer(GL_FLOAT,0, (void*)NULL);
}
else
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glNormalPointer(GL_FLOAT,0,vbp->normal_array);
}

glClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (vbp->vbo_tex)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbp->vbo_tex);
glTexCoordPointer(2,GL_FLOAT,0,(void*)NULL);
}
else
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glTexCoordPointer(2,GL_FLOAT,0,vbp->texcoord_array);
}

if (GLOWMAP > -1)
{
glClientActiveTextureARB(GL_TEXTURE1_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (vbp->vbo_tex)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbp->vbo_tex);
glTexCoordPointer(2,GL_FLOAT,0,(void*)NULL);
}
else
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glTexCoordPointer(2,GL_FLOAT,0,vbp->texcoord_array);
}
}

if ((Interp_multitex_cloakmap>0) && (max_multitex > 2))
{
glClientActiveTextureARB(GL_TEXTURE2_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
if (vbp->vbo_tex)
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbp->vbo_tex);
glTexCoordPointer(2,GL_FLOAT,0,(void*)NULL);
}
else
{
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glTexCoordPointer(2,GL_FLOAT,0,vbp->texcoord_array);
}
}


int r,g,b,a,tmap_type;

opengl_setup_render_states(r,g,b,a,tmap_type,TMAP_FLAG_TEXTURED,0);

if (gr_screen.current_bitmap==CLOAKMAP)
{
glBlendFunc(GL_ONE,GL_ONE);
r=g=b=Interp_cloakmap_alpha;
a=255;
}

gr_tcache_set(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale, 0, gr_screen.current_bitmap_sx, gr_screen.current_bitmap_sy, 0);

glLockArraysEXT(0,vbp->n_poly*3);

glDrawArrays(GL_TRIANGLES,0,vbp->n_poly*3);

glUnlockArraysEXT();


this code may interest mik as i think he does some OGL
« Last Edit: November 10, 2003, 04:57:46 pm by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
RBC Mjolnir Mk2 SCP Revision
The only reason to prevent convex faces is that the GPU may decide to triangulate the model by connecting two verts between which the polygon does not exist.  What you then get is a funky squared-off poly on the end and a backfacing (not rendered) poly recovering the now-filled outside of the convex face.  Some ascii art to try to explain:
Code: [Select]

 _______
|\      \
| \      \
| /      /
|/      /
 -------

Ok, that looks right.

Anyway, what you'd get is this:
Code: [Select]

 _______
|       \
|        \
|        /
|       /
 -------

rather than this:
Code: [Select]

 _______
 \      \
  \      \
  /      /
 /      /
 -------


I've run into this rendering bug in Max before, so I know Freespace can't be any smarter about how it triangulates.  It's a computer after all, it has no way of knowing it's done it wrong when it screws up.
« Last Edit: November 10, 2003, 04:59:09 pm by 570 »
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
RBC Mjolnir Mk2 SCP Revision
:D
The last time I looked at OpenGL was months ago, and the last time I looked at C++ was in May. I've been doign Python with SDL and not GL stuff at all of late. I'll take a look later when I'm at home though.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
RBC Mjolnir Mk2 SCP Revision
yes mik, i'm doing some VBO work and that may interest you.  I've seen terrain engines that use that push about 50 million tris/sec using them with a bunch of huge textures and lots of lights. on GF4s of course ;)
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Sandwich

  • Got Screen?
  • 213
    • Skype
    • Steam
    • Twitter
    • Brainzipper
RBC Mjolnir Mk2 SCP Revision
Will someone move half the posts in this thread to the SCP forum? I gotta run. :p
SERIOUSLY...! | {The Sandvich Bar} - Rhino-FS2 Tutorial | CapShip Turret Upgrade | The Complete FS2 Ship List | System Background Package

"...The quintessential quality of our age is that of dreams coming true. Just think of it. For centuries we have dreamt of flying; recently we made that come true: we have always hankered for speed; now we have speeds greater than we can stand: we wanted to speak to far parts of the Earth; we can: we wanted to explore the sea bottom; we have: and so  on, and so on: and, too, we wanted the power to smash our enemies utterly; we have it. If we had truly wanted peace, we should have had that as well. But true peace has never been one of the genuine dreams - we have got little further than preaching against war in order to appease our consciences. The truly wishful dreams, the many-minded dreams are now irresistible - they become facts." - 'The Outward Urge' by John Wyndham

"The very essence of tolerance rests on the fact that we have to be intolerant of intolerance. Stretching right back to Kant, through the Frankfurt School and up to today, liberalism means that we can do anything we like as long as we don't hurt others. This means that if we are tolerant of others' intolerance - especially when that intolerance is a call for genocide - then all we are doing is allowing that intolerance to flourish, and allowing the violence that will spring from that intolerance to continue unabated." - Bren Carlill

 

Offline Turnsky

  • FOXFIRE Artisté
  • 211
  • huh?.. Who?.. hey you kids, git off me lawn!
RBC Mjolnir Mk2 SCP Revision
it's the SCP ART thread :p
   //Warning\\
---------------------------------------------------------------------------------
do not torment the sleep deprived artist, he may be vicious when cornered,
in case of emergency, administer caffeine to the artist,
he will become docile after that,
and less likely to stab you in the eye with a mechanical pencil
-----------------------------------------------------------------------------------

 

Offline Beowulf

  • 27
RBC Mjolnir Mk2 SCP Revision
Woah. :eek2:

Talk about gorgeous!
Never Forget

"It is always better to avenge dear ones than to induldge in mourning. For every one of us, living in this world means waiting for our end. Let whoever can win glory before death. When a warrior is gone, that will be his best and only bulwark."
                               --Beowulf


"... and no, real life sex is not just a myth. You just need to come out of your house once every while..." ~Tiara

YeeeeHoooooh! is the mood of the day. :p