multiople textures + closed mesh

Blitz3D Forums/Blitz3D Programming/multiople textures + closed mesh

_33(Posted 2007) [#1]
I have this rather intriguing question, that might orient my development for mesh builder / maze builder that I made.

Right now my meshes are built as unsoldered, thus open. They use various textures and surfaces. Since the mesh is open, it breaks ANY stencil shadow system, and it also seems to have an influence on performance in z buffering.

So, I figured, I need to enhance this situation for those 2 reasons. Meaning, I need to generate a closed mesh, that a stencil shadow system will work flawlessly, and to make z buffering work as fast as possible.

Solutions that I found seem straight forward: What I would have to do would be to regroup all the textures that I use for my meshes into one big texture, but fix all the UV coordinates accordingly for the big texture. In essence, this should help me unify all the surfaces into a single and also help me close the generated mesh.

Any other idea welcomed :P


Stevie G(Posted 2007) [#2]
I've never had a major problem with unwelded meshes. I need this to do proper flatshading but on the odd occasion the gap is visible.

I built a 2d level editor earlier this year and found that the mesh gaps were even more visible. I made a function which extrudes each vertex by a tiny amount based on it's vector to the center of the triangle - this got rid of my visible gap issue and may work for stencils.

Have you got a screenie if this is not what you mean?


_33(Posted 2007) [#3]
It's much more serious than gaps, because a stencil shadow usually needs a closed welded meshes to work. I'm talking by experience with AShadow and Devil Shadow Engine. I'm not even counting the 32K triangle limit of the DX7 for this case (or is that a Blitz3D limit?). Anyhow, this is a different issue alltogether.

To solve that gap issue Stevie G that you're talking about for 2D, I use a very high "virtual" resolution, like 32000 by 24000. That way, I can adequately scale for any physical screen resolution and it will never show any gap, antialias or no antialias. But I use FastImage, so that tool does help me do this scaling.


Dreamora(Posted 2007) [#4]
Its neither.
Its 65536 Triangle Limit as well as Vertex Limit (simply: they are short indexed)


32768 is the limit of GF2 / GF4 MX cards as they can not handle larger triangle buffers


Stevie G(Posted 2007) [#5]

To solve that gap issue Stevie G that you're talking about for 2D, I use a very high "virtual" resolution, like 32000 by 24000. That way, I can adequately scale for any physical screen resolution and it will never show any gap, antialias or no antialias. But I use FastImage, so that tool does help me do this scaling.



The editor was actually 3d but using a flat auto tessalated mesh. Interesting idea re fastimage, can you explain the technique in more detail as I could have use for it? Could it be used, for example to render to a texture buffer bigger than the current screen res or be use to blur or antialias a texture? I'm assuming you do not do this scaling in realtime?


_33(Posted 2007) [#6]
I do the whole screen frefresh, scaling etc in realtime on a PER CHARACTER basis, for my terminal sub-project, and I get roughly 150 fps on my X800 generation card, and AMD K8 processor. I'm very picky on my visuals and what I need to achieve, and I found that FastImage gave me what I wanted the easy way.

Here I'll poste my render function ;)


This routine gets executed every frame for every page displayed. When you set the scale in fastImage, actually you define the scaling values for the following FI instructions. Same with setting colors and others. So it's relatively straight forward, and really fast! When I move my code to BlitzMax, I expect much faster framerates.

Look for SetProjScale and SetProjHandle, as well as SetScale. StartDraw and EndDraw is for building a FI mesh .
=-=-=-=-=-=-=

Anyhow, back to topic plz