wireframe over render

Blitz3D Forums/Blitz3D Programming/wireframe over render

Picklesworth(Posted 2004) [#1]
Some people seem to want one, so here is a simple, easily controllable, wireframe over render system that can work on multiple entities and looks real nice.

;wireframe over render

;wireframe version of entities
;if you don't want one to be wireframe, don't put it here	
CameraClsMode camera,True,False
For gah.selectedbox = Each selectedbox
	HideEntity gah\mesh
Next
	
For mesh.mesh = Each mesh
	EntityAlpha mesh\model,1
Next	
	
WireFrame True
RenderWorld	

;solid version of entities
;semi-transparent
;if you don't want semi-transparency, move this rendering pass above the other one	

CameraClsMode camera,False,True
For gah.selectedbox = Each selectedbox
	ShowEntity gah\mesh
Next
	
For mesh.mesh = Each mesh
	EntityAlpha mesh\model,0.5
Next
	
WireFrame False
RenderWorld

I hope somebody finds a use for this.


Picklesworth(Posted 2004) [#2]
Anybody got a response, or am I too late to please anyone with this?


Mustang(Posted 2004) [#3]
Patience... I just saw this! If it work like it should, it's useful to me at least. So thanks!


JoshK(Posted 2004) [#4]
You should render wireframes last, so they will appear on top of meshes at the same z-depth.

CameraClsMode 1,1
Hide wire meshes
Show solid meshes
WireFrame 0
RenderWorld
CameraClsMode 0,0
Show wire meshes
Hide solid meshes
WireFrame 1
RenderWorld

Flip


Perturbatio(Posted 2004) [#5]
only problem is that apparently some cards don't support wireframe rendering.


LAB[au](Posted 2004) [#6]
I wonder if this old legend about wireframe support is true! Anyone had once a problem with wireframe?


WolRon(Posted 2004) [#7]
Anyone had once a problem with wireframe?
Yes, lock up.


big10p(Posted 2004) [#8]

You should render wireframes last, so they will appear on top of meshes at the same z-depth.



Doesn't make any difference in my experience, since any point on a 'solid' mesh is going to have the same z-depth as the same point on the wireframe mesh. You just get z fighting.