Please explain what a surface is ?

Blitz3D Forums/Blitz3D Beginners Area/Please explain what a surface is ?

Nexus6(Posted 2004) [#1]
This may sound like a very basic question, but unfortunately, I have been unable to find out exactly what it is. I have heard people comment that surface's affect frame rate and that you should keep the amount of surfaces to a minimum.
Is a surface an individual mesh ?
Can you have several seperate mesh's (that can be controlled independantly) but still be one surface ?

awaiting any help.


_PJ_(Posted 2004) [#2]
As I understand them:


What is a surface?



A surface is the name given to the area of a vertex or vertices that are able to be 'painted' with a texture or light etc.


Is a surface an individual mesh ?


No


Can you have several seperate mesh's (that can be controlled independantly) but still be one surface ?


Believe so!


Nexus6(Posted 2004) [#3]
Thanks for clearing that up, but now, how do you create single surface or multiple surface mesh's


_PJ_(Posted 2004) [#4]
Primitives created with CreateCube etc. are 'Single-Surface' meshes.

I would recommend using a 3D- Modelling prog to generate meshes.

This may be helpful too


Nexus6(Posted 2004) [#5]
But how do you create several objects that can all be moved/rotated/scaled etc independantly, yet still be single surface. Thats the bit I just dont get. I have seen in the forum, talk of single surface particle systems, yet each particle is independant of each other, how is this acomplished?


Warren(Posted 2004) [#6]
An entity can be a mesh and a mesh can have a single surface. So create multiple entities with one surface a piece and there you go.

The particle systems are done by creating a single surface and add triangles into it. A surface is not the same as a polygon - that's probably where you're getting confused.

A surface is a collection of vertices (forming triangles) which share a single texture.


Nexus6(Posted 2004) [#7]
If I create 2 mesh's in a 3D Modeller, a mtorbike and a car for eg) then save them as one mesh, I presume this would be classed as single surface, but I would not be able to move them independantly.

I must be thick, because im just not getting this.


_PJ_(Posted 2004) [#8]
A surface is just the name applied to an AREA SET ASIDE for 'painting'.

It is not necessarily AN actual 3D surface.

Imagine having a metal model. This is your mesh. To paint your mesh, you first stick some special paper over the parts you wish to paint because the paint wont stick to the metal. This 'special paper' is your Surface.

The paper can be cut, and applied to a separate model. If one colour of paint is used for the same types of paper, you have multiple meshes with a single surface.

(did that make it better or worse?)


Warren(Posted 2004) [#9]
Smith

When starting out think, think about it like this : a surface = a texture. Every texture you want to apply to your mesh is a seperate surface. If you skin your models with a single texture, then they will be a single surface.

If you add a new texture for the windshield, then you will have 2 textures. Hence, 2 surfaces.

Once you have that under control, start worrying about effects and vertices and such as they relate to surfaces.


sswift(Posted 2004) [#10]
"A surface is the name given to the area of a vertex or vertices that are able to be 'painted' with a texture or light etc."

You're waaaaay off base there. :-)


A surface is an imaginary container that contains vertices and triangles that all share the same visual properties.

Those properties are all the things you can set with a brush.

It's changing those properties that causes the 3d card to stall. So the surfaces group all the triangles that have the same visual properties so Blitz can send them all to the card at once without telling it it needs to change the visual properties.


_PJ_(Posted 2004) [#11]
Thanks Sswift - made it clearer for me too :)


jhocking(Posted 2004) [#12]
"Can you have several seperate mesh's (that can be controlled independantly) but still be one surface ?"

No. You can have multiple surfaces in a mesh, but every mesh is at least one surface.

Single surface particle systems make it look like multiple meshes in a single surface, but they are in fact a single mesh whose polygons are not connected and whose vertices are being deformed in real-time.


skidracer(Posted 2004) [#13]
In Blitz3D a surface is an area of a mesh that can be painted with a brush.

You can use the same brush to paint multiple surfaces belonging to multiple entities so in effect surfaces can span entities if you paint them with the same brush.


jhocking(Posted 2004) [#14]
Multiple surfaces can use the same brush (ie. have the same material properties) but they are still multiple surfaces, and thus still impact performance negatively.


skidracer(Posted 2004) [#15]
heh, a negative impact on performance sounds like a good thing to me.

In regards to single surface topics the negative impact to the standard Blitz3D learning curve seems considerable so my advice would be to not worry about it until you need it and then tackle it in your art pipeline instead of messing up your code with hack optimizations.


Nexus6(Posted 2004) [#16]
Thanx Guys, I feel I understand surfaces a lot better now, but I will be taking Skidracer's advice, and stop worrying about these things until I've at least mastered the language a bit more.

Thanx again.