Wireframe certain objects, other objects shaded...

Blitz3D Forums/Blitz3D Programming/Wireframe certain objects, other objects shaded...

hollifd(Posted April) [#1]
Is it possible to show certain objects in Wireframe and other objects as shaded? If so, can someone tell me how it is done?

Another question...my models show the triangles that make up the surfaces. Is there a way in Blitz to only show the edges and not the triangles?


Rick Nasher(Posted April) [#2]
I think so. I think Krischan used this technique here:
https://www.blitzbasic.com/codearcs/codearcs.php?code=2393


BlitzSupport(Posted April) [#3]
Couple of approaches here...

http://www.blitzbasic.com/codearcs/codearcs.php?code=22
http://www.blitzbasic.com/codearcs/codearcs.php?code=380


hollifd(Posted April) [#4]
Krischan has some impressive code in that link.

I am not really a game programmer and it was not obvious to me how I can show certain things as Wireframe and other things as shaded. I saw where you can use Wireframe True to turn everything Wireframe. I am thinking it may not be possible.


RemiD(Posted April) [#5]
We talked about a similar thing here :
https://www.blitzbasic.com/Community/posts.php?topic=100959 (post#11)

it may help...


Matty(Posted April) [#6]
The wireframe mode that blitz ships with is not very good really - it is not meant really for visualising wireframes in a finished product.

You have a few options.

One of the simplest is the following:

Iterate through each triangle in the surface of the mesh.
You will need to use the countsurfaces, getsurface and other surface vertex and triangle commands.

Get the position of the vertices that make up a triangle in world space.

Use cameraproject to project the 3d positions to 2d screen coordinates. If projectedz() is less than zero it is behind the camera.

Join the dots with 2d line commands.

That is the easiest.


A more complex way would be to create a mesh with thin rectangular strips joining each of the vertices in question and show these. This is more complex but will give a better visual appearance and you have more control over the depth perception of the wireframe lines.


BlitzMan(Posted April) [#7]



BlitzMan(Posted April) [#8]
.