Materials instead of textures

Community Forums/Graphic Chat/Materials instead of textures

slenkar(Posted 2005) [#1]
Has anyone experimented with materials instead of textures or experimented with the property of the material to affect the texture?
e.g. specular color,ambient color,emisssive color,shininess


wizzlefish(Posted 2005) [#2]
Doesn't a texture overwrite the material underneath?


slenkar(Posted 2005) [#3]
Not sure, I think the 'shininess' can still be seen,
and when you use 'EntityColor' that affects one of the materials colours(I think)

Actually I think I put this in the wrong forum, it should be in Blitz 3D programming or Beginners area - because I have nothing to showcase!


Rob Farley(Posted 2005) [#4]
It's still using a surface so you may as well use a texture.


Gabriel(Posted 2005) [#5]
e.g. specular color,ambient color,emisssive color,shininess



Well Blitz doesn't have any of those apart from shininess. It just has the standard ( diffuse ) color.

Doesn't a texture overwrite the material underneath?


No, because materials are not "underneath" textures. A texture is part of the material properties.

It's still using a surface so you may as well use a texture.


Indeed. Moreover, I've noticed performance is often *worse* without a texture. I use small ( 8x8 ) textures if I just want a flat color.


Ross C(Posted 2005) [#6]

Indeed. Moreover, I've noticed performance is often *worse* without a texture. I use small ( 8x8 ) textures if I just want a flat color.



That's interesting to know :o)


Mustang(Posted 2005) [#7]
Most cards are designed to draw textured polygon fast because that's the usual case. Polygon without a texture is not, so it might have to create "virtual texture" nased on the color value to be able to draw it at all... this is not a fact but rather gut-feeling or educated guess. But I would stay away from materials/surfaces that don't have texture/UVs.


_PJ_(Posted 2005) [#8]
Well in one of my projects, I use EntityColour to differentiate between Player 1 and Player 2 (one's 200,100,100 the other is 100,100,200 to make a pale blue & pale red mesh for the player crafts' main bodies)These are then Textured with the same, monochrome (well, black, grey and white) texture - kind of bumpmap thingy, really - the colour shows through giving the appearance of two different textures.

--------Actually cant remember if they are coloured/textured first, or if it makes a difference!

-------------------------------------------------------------


Most cards are designed to draw textured polygon fast because that's the usual case. Polygon without a texture is not, so it might have to create "virtual texture" nased on the color value to be able to draw it at all... this is not a fact but rather gut-feeling or educated guess. But I would stay away from materials/surfaces that don't have texture/UVs.



Yeah I downloaded a free mesh that came without UV information. It caused lots of weird effects that even varied from time to time, and killed my PC (BSOD) if I tried wireframe mode. I have a 128M ATI Radeon card.


Matty(Posted 2005) [#9]
In my graverobber game I use bitmapped textures for the level but all the creatures use materials, and I have noticed no problems on the machines I've seen it run on.


RemiD(Posted 2016) [#10]

I use small ( 8x8 ) textures if I just want a flat color


i do the same thing 12 years later ! :) (except i use several 4w4h areas on a 128w4h texture, so that there is only one surface one material/brush one texture per mesh (with different parts with different colors alpha)


Rick Nasher(Posted 2016) [#11]
This is good intel. So actually to speed things up we have to ADD textures, while I was under the impression this would slow things down. Tssk, tssk.
Many thanks, I think the Blitz Help files should have pointed this out to peeps.


RemiD(Posted 2016) [#12]
@Rick>>what is faster to render is to have the minimum number of surfaces possible.
And, as you may have noticed, it is quicker to color a mesh using materials in your modeling tool rather than having to unwrap/texelsfill/uvmap a shape.

So the idea was to color the shape using materials colors/alpha in your modeling tool (i use fragmotion) and then after you have loaded the mesh in Blitz3d, use the properties of each material to color/alpha the different parts of the shape using texels colors/alpha (with a texture) or using vertices colors/alpha.

Unfortunately, using texels (variable) alpha or vertices (variable) alpha produces z-order problems, so it is not a good idea to use them. And it is better to have separate meshes for each small part which use variable alpha.
But the technique mentioned works well if the shape is made of different surfaces with different materials of different colors (without variable alpha)
More infos here : http://www.blitzbasic.com/Community/posts.php?topic=107019

I will probably post examples on how to achieve this (convert a shape with different surfaces with different materials, into one surface with one material (and the different parts colored using texels colors ( with a texture) or vertices colors)


gpete(Posted 2016) [#13]
I notice many 3d models (fbx for example) come with MTL or material files. I suppose we cannot do that in Blitz3d...somebody please update Blitz3d.... ;)

I've already used Cobol, Fortran, Basic,Pascal, C, Visual Basic & VBA (way too much VBA!) ... I cannot handle anymore languages...


RemiD(Posted 2016) [#14]
@gpete>>a "material" is called a "brush" in Blitz3d.
However since Blitz3d uses directx7, you can only have some properties like color, alpha, shininess, fx, blendmode, and not specular or emmissive.

see the commands associated to brush :
http://www.blitzbasic.com/b3ddocs/command_list_3d_a-z.php?show=B