2D with 3D on top?

Blitz3D Forums/Blitz3D Programming/2D with 3D on top?

Jon_E_5(Posted 2005) [#1]
hi. I've got a 2D titlescreen/main menu image that I want to display onscreen and then on top of that have a rotating 3D model. Now I've had a look and I just can't seem to find a normal way to do it, does anyone know how? I'm sure theres a realatively easy process (I seem to have read how to do it in the past) but I just can't remember it. :) Any help much appreciated.


John Blackledge(Posted 2005) [#2]
I think you would have to render twice, possibly using two different cameras, to achieve this.


Jon_E_5(Posted 2005) [#3]
really? I'm sure I seem to remember something saying it was quite simple to do. Ah well. You'd think lots of people would use this (or not) ha ha. May be some sort of Positionsprite() function will work instead eek.


D4NM4N(Posted 2005) [#4]
i wrote a positionsprite() function that allows you to position 3d sprites using 2d rules, i find it great for huds, radars etc. but also for printing text on screen by using a sprite based font set.

im not sure what u mean by on 3d model on top, but if you want the HUD behind a model just set the sprites zorder to appear behind it.

Anyway, heres my way of doing it:

www.blitzbasic.com/codearcs/codearcs.php?code=1359

if you need info about how 2 use it with text email me and i will send you my screentext function with a font set.


Jon_E_5(Posted 2005) [#5]
Thanks D-Grafix. :) Its not a HUD I'm drawing. Its a titlescreen with a rotating 3D object on top :) I think I may have found what I need though... :) thanks.


tonyg(Posted 2005) [#6]
Check cameraclsmode.


D4NM4N(Posted 2005) [#7]
sorry, i call it a hud because its printed on the camera like a head up display(missleading a bit =), but i use it for menus, text, loading screens etc. Glad u found something ok though.


BlitzSupport(Posted 2005) [#8]
What Tony said. However, mixing 2D and 3D can cause slowdown on some cards. You could try something like this:

Backdrops in 3D

... or use Jim Brown's Sprite Control


Jon_E_5(Posted 2005) [#9]
Thanks BlitzSupport "Backdrops in 3D" is exactly what I needed!!! :-) Perfect thanks. What a godsend. :)