Page 3 of 10
Posted: Fri Oct 27, 2006 12:44 pm
by tmyke
U/V is Barycentric hit coordinates (not texture coordinate), compared to the selected Face the Entity.
With this parameters, you can find the position Pick in the Entity.
But if you want, I would try to construct a dedicate instruction...
Posted: Fri Oct 27, 2006 5:15 pm
by Shannara
Ref:
http://www.purebasic.fr/english/viewtop ... c&start=45
Someone came over to the above thread and believes that it's easy to use this engine to create sprite3Ds, with color and all that fun stuff.
Since the instructions are in french ...
Is it possible for someone to create a simple (2 layer, for sample) colored tiling example with this engine?
If it is able to tile a whole screen with multiple layers and not go below 30fps, it might be a contender to the other DX9 system.
Posted: Fri Oct 27, 2006 5:54 pm
by tmyke
A little code with 64 Tiles (2 Texture/Tile 256x256):
http://www.dreamotion3d.com/PureBasic/Tiles.zip
PS:And do not be too impatient, English Doc. arrives soon…
Posted: Fri Oct 27, 2006 6:02 pm
by Shannara
Ah ha! thank you very much for your help. Thanks for the example and the news on the english portion

Unfortunately, it doesnt seem like a replacement for sprite3d at all. Way to complicated to do a simple loading of sprite and especially placing and rendering.
Hrm. I guess once I get an interest in creating a 3D product, this would be the way to go. But for 2d, this wouldnt work
Thanks for the help

Posted: Fri Oct 27, 2006 7:47 pm
by djes
I don't see what is complicated?
DM_Graphics3D(800, 600, 32, 0, 1) to initialize our screen (window or fullscreen in ONE command)
*mysprite2d = DM_LoadSprite2D("myfile.png", 10,10) to load a sprite
DM_BeginScene()
DM_DrawSprite2D(*mysprite2d) to draw our sprite
DM_EndScene()
:roll:
Posted: Fri Oct 27, 2006 8:11 pm
by Shannara
Actually, according to the sample its the following:
Code: Select all
*brush = DM_GetBrush(*tile(num) )
DM_BrushAddTextureStage(*brush, 1, #D3DTSS_COLOROP, #D3DTOP_BLENDTEXTUREALPHA )
DM_BrushRestoreTextureStage(*brush, 1, #D3DTSS_COLOROP, #D3DTOP_MODULATE )
*texture = DM_GetTexture(*brush, 1)
DM_LoadTexture(*texture, "road.bmp")
DM_PositionEntity(*tile(num), i*21-40, j*21-20, 0)
Not simple at all with all those magic numbers in there.
:roll:
And don't forget about the weird location numbers, instead of 0 - width or 0 to height, now we have negatives, oh wonderful!
Code: Select all
DM_MoveEntity(*camera, 0,20,-150.0)
Posted: Fri Oct 27, 2006 11:32 pm
by Thalius
Finally getting more to the details .. and twitches i needed with this... hmm looks promising !
Shannara if you liek it simple stick to sprite 3d or use Supersprite 3d =P
Thalius
Posted: Sat Oct 28, 2006 4:23 am
by Cyan
tmyke wrote:U/V is Barycentric hit coordinates (not texture coordinate), compared to the selected Face the Entity.
With this parameters, you can find the position Pick in the Entity.
With U/V i find the position 'Pick' to X and Y coord's and with DM_PickedDistance i find Z coord's?
Ex:
Code: Select all
If DM_CameraPick(Camera, X, Y)
PX = DM_PickedU()
PY = DM_PickedV()
PZ = DM_PickedDistance()
DM_PositionEntity(Decal, PX, PY, PZ)
EndIf
tmyke wrote:
But if you want, I would try to construct a dedicate instruction...
Sorry, I have'nt understood this offer

Posted: Sat Oct 28, 2006 7:01 am
by tmyke
@Cyan:
@Shannara:
Not simple at all with all those magic numbers in there.
Humm, perhaps... One can certainly improve the things.
For sprite3D with alphablending/multitexture, which syntax would wish to be seen?
Do you have an example directly in PB (with OGL) ?

@++ (at Tuesday)
Posted: Sat Oct 28, 2006 6:22 pm
by djes
Shannara wrote:Actually, according to the sample its the following:
Code: Select all
*brush = DM_GetBrush(*tile(num) )
DM_BrushAddTextureStage(*brush, 1, #D3DTSS_COLOROP, #D3DTOP_BLENDTEXTUREALPHA )
DM_BrushRestoreTextureStage(*brush, 1, #D3DTSS_COLOROP, #D3DTOP_MODULATE )
*texture = DM_GetTexture(*brush, 1)
DM_LoadTexture(*texture, "road.bmp")
DM_PositionEntity(*tile(num), i*21-40, j*21-20, 0)
Not simple at all with all those magic numbers in there.
:roll:
And don't forget about the weird location numbers, instead of 0 - width or 0 to height, now we have negatives, oh wonderful!
Code: Select all
DM_MoveEntity(*camera, 0,20,-150.0)
This part of the example is not to render a sprite, but to modify the 3D terrain to add a road. Camera and all the others things are for 3D, not necessary to use 2D.
Posted: Mon Nov 06, 2006 10:46 pm
by Comtois
Posted: Mon Nov 06, 2006 10:49 pm
by Nik
Could you maybe post some screenshots if it's worth, I'm a Mac/Linux User ^^
Posted: Thu Dec 28, 2006 2:58 pm
by Chrono Syndrome
Any progress ?
Posted: Thu Dec 28, 2006 3:49 pm
by tmyke
Beta2 arrives in three or four days...

Posted: Mon Jan 01, 2007 9:19 am
by Chrono Syndrome
And where this beta <_< ?