Blitz Hardwired - DirectX 9 Userlib (Part III)

Community Forums/Showcase/Blitz Hardwired - DirectX 9 Userlib (Part III)

Ploppy(Posted 2013) [#1]
Thread2 is dead; long live thread3



New commands for tonight...

dxTFormPoint(x#,y#,z#,source_entity,dest_entity) - fully functional, just like b3d command
dxTFormedX#() - fully functional, just like b3d command
dxTFormedY#() - fully functional, just like b3d command
dxTFormedZ#() - fully functional, just like b3d command
dxEntityDistance#(src_entity%,dest_entity%) - fully functional, just like b3d command
dxVectorYaw#(x#,y#,z#)- ignore this for the moment, doesn't work
dxVectorPitch#(x#,y#,z#)- ditto

Zip file version

A HAPPY NEW YEAR TO ALL - HOPE YOU ENJOY YOURSELVES - SEE YOU SOON


Yue(Posted 2013) [#2]
Perfect!!
DxCreateCamera(0) fhater optional...


Ploppy(Posted 2014) [#3]
New stuff...

dxVectorYaw#(x#,y#,z#) - now works
dxVectorPitch#(x#,y#,z#) - now works
dxCameraProject(camera%,x#,y#,z#) - fully functional, just like b3d command
dxProjectedX#() - fully functional, just like b3d command
dxProjectedY#() - fully functional, just like b3d command
dxProjectedZ#() - fully functional, just like b3d command
dxDeltaPitch#(src_entity,dest_entity) - ignore this, doesn't work quite yet
dxDeltaYaw#(src_entity,dest_entity) - see above, will fix soon...

I won't be releasing anything for the next few days, entertaining at home. Next installment probably tuesday.... until then, enjoy...


Kryzon(Posted 2014) [#4]
Perfect!!
DxCreateCamera(0) fhater optional...

You cannot use optional parameters with userlib functions.

What you can do is wrap each function with Blitz3D code:
Function CreateCamera%( parent = 0 )

	Return DxCreateCamera( parent )

End Function
For the programs that use this declaration above, the native Blitz3D function will be overwritten by the library one, and you will have a true optional parameter.
You can do this for the other functions as well, so you can code with the original function names - the cost would be the small overhead of calling an extra function.


Rick Nasher(Posted 2014) [#5]
Great stuff, Happy New Year indeed. Same to you and fam.


zeek(Posted 2014) [#6]
This is really awesome. I just tried it today and I'm impressed. I wish I had the skills to help.


Rick Nasher(Posted 2014) [#7]
H


Rick Nasher(Posted 2014) [#8]
Hi Ploppy this for when you´re return:
I wanted to do a simple 1-on-1 conversion of a simple planetary test model I once did many years ago. However it seems that the DX9 parenting is responding quite different. Minimized code examples below for comparisment.

DX7


DX9


I've setup the code to make use of textures from the examples so it's easier to see the movement, or lack off rather.


Rick Nasher(Posted 2014) [#9]
woops it posted before I was finished and spellchecked lol. clumsy.
bits missing from cam control function:


This doesn't work in the DX9 version though.


Wolf1870(Posted 2014) [#10]
Happy New Year!! If you change <pivot4 = dxCreateSphere(32,0)> then its working. The error is in <dxCreatePivot>, can`t move or turn the Pivot. Testing with adding <dxMoveEntity pivot4,0,Sin(MilliSecs())/100,0>


Rick Nasher(Posted 2014) [#11]
@Wolf1870:
Yeah, I know it can be fixed using workarounds, however I believe it's Ploppy's goal to do (sort of) a direct conversion of the original Blitz commands to DX9 equivalents so it can be used instead of them relatively easy. Thus upgrading existing programs would be a briese. Of course with a bit of added functionality to some(quite a few already I believe) and some new additional commands, but for most original syntax/functionality should almost the same where possible.

Hence my direct 1-on-1 conversion.

Now for your code: when put all in place instead of partially, then it gives it a very interesting bouncing, spinning, rotating earth effect. Quite funny. :-)


Rick Nasher(Posted 2014) [#12]
Same goes of course for camera pivot: not working yet.
But I'm pretty sure Ploppy can fix these minor issues, but even if he doesn't then the commandset is quite impressive as is already and we'll be able to use workarounds if needed.

For now I'll enjoy watching the bouncy earth as if it's partying.


Ploppy(Posted 2014) [#13]
Hi rick, your code had a little bug, this is why your pivots weren't working...

pivot1 = dxCreatePivot ; for handling sun
pivot4 = dxCreatePivot ; for spinning earth round sun

pivot1 and pivot4 will return 0, as it would with even the blitz3d's CreatePivot.

Why?? Because you need to follow the command with its parameters, if you wish to have a return result.

If you try

pivot1 = dxCreatePivot(0) ; for handling sun
pivot4 = dxCreatePivot(0) ; for spinning earth round sun

it should work (does for me).

I haven't yet tried parenting with cam, but same principal should apply.

Please note that to get a result back from any blitz function, whether hardwired or not, you must ALWAYS include parameters after the function. Even if the function in question has no parameters (such as MilliSecs() for example), you must still include the brackets. Failure to do so will return every time a 0 or an empty string for strings.


Ploppy(Posted 2014) [#14]
Hello again,
Some good news, more interactivity in hardwired, and I guess in some respects I can say I have now released my first (slightly disturbing - please excuse my wacky humour) game for it. Please see new version of test8.bb, this will clearly demonstrate hardwire's new commands.

Entity picking partially works, for the moment it will only work on polygon picking (entity pick mode 2) using the camera picking function, the sphere and box picking methods should shortly follow in the next few days, along with the line and entity functions.

But what it does do already is huge - the hardest picking detection routine is the polygon pick detection, and I'm proud to day it has been sorted. So now you can for example detect which object the mouse is pointing to.

A few bug corrections included too, such as a correction for rotating parented objects, they rescaled themselves before for no reason - this does not happen any more...

dxCameraPick%(camera%,viewport_x,viewport_y) - fully functional
dxPickedX#() - working on it, don't use for the moment, give weird results
dxPickedY#() - working on it, don't use for the moment, give weird results
dxPickedZ#() - working on it, don't use for the moment, give weird results
dxPickedNX#() - returns 0 for the moment
dxPickedNY#() - returns 0 for the moment
dxPickedNZ#() - returns 0 for the moment
dxPickedTime%()- fully functional
dxPickedEntity%()- fully functional
dxPickedSurface%()- fully functional
dxPickedTriangle%()- fully functional
dxEntityPick%(entity,range#)- doesn't do anything for the moment, don't use
dxLinePick%(x#,y#,z#,dx#,dy#,dz#,radius#)- doesn't do anything for the moment, don't use
dxHideWindow(enable) - will hide window as name suggests, to bring it back use dxHideWindow(false)
dxIsWindowMinimized%() - very useful, will return true if window is minimized/not displayed
dxRotateMesh(entity%,pitch#,yaw#,roll#) - fully functional, just like b3d command

Collision detection between objects should shortly follow, for it has similar maths, stay tuned...


Wolf1870(Posted 2014) [#15]
My cat has taken refuge after the first scream under the sofa (my wife also..) Thanks Ploppy ;-))


Rick Nasher(Posted 2014) [#16]
Heyyy Ploppy you're back! Very funny man. Sorry to disturb you though, but I read your comments from before and began to doubt myself.

But it *does* work ok in the DX7(standard Blitz3d) version. In the DX9 version however it doesn't do the same even with the silly bug removed.

Appears there's a difference in approach at some place(s) like parenting, scaling, rotating, movement? I've cleaned and alligned the code a bit for both DX7 and DX9 making it easier to compare side by side and shows more clearly what I had to change to get similar results. If you're interested the here's a download link for both pieces of code(also added a suntexture).


Ploppy(Posted 2014) [#17]
Please add link - I do need to pinpoint as many bugs as I can, I'll check out you comparison program. These things are very useful to demonstrate bugs/ weird activity. Thanks for your help rick...


Rick Nasher(Posted 2014) [#18]
Link was already there in text above, see "download link" in yellow/orange(I'm a little color blind).
At least, when I click on it then it goes to: http://www.mediafire.com/download/k7xwdq232kdxwvs/Simplenatary.rar

No need to thank me.. Thank YOU for doing what you're doing, cos I could never ever. (well perhaps in 20 years time.. :-)


Ploppy(Posted 2014) [#19]
Whoops, you're totally right, should have hovered my mouse about a bit on your post, since I have a custom skin on this forum, links do not show up so well. Will cast an eye on your bbcode later -at the moment at work... can't really do much...


Ploppy(Posted 2014) [#20]
Santa game updated, they will flee if they see you approach them too close, creep up behind so they don't see you coming and then blast them with the mouse....

This makes use of these two functions, which now work...

dxDeltaPitch#(src_entity,dest_entity)
dxDeltaYaw#(src_entity,dest_entity)


Rick, your planet demo is included too, should work now as I have changed a few things in the rendering engine. Let me know how you get on...

Zip file version


Ploppy(Posted 2014) [#21]
Okay, I have improved the sprite handler, should now correctly follow the sprite type rules (see new version of test8.bb, example below).

Lighting has also been greatly improved, much more realistic, not yet perfected specular highlights, but should come soonish.

These following commands now function, gives results similar to b3d commands...

dxPickedX#()
dxPickedY#()
dxPickedZ#()
dxPickedNX#()
dxPickedNY#()
dxPickedNZ#()




Iowalien(Posted 2014) [#22]
this looks great. is this work with blitzplus or just blitz3d?


Ploppy(Posted 2014) [#23]
both!! there is even an already compiled version of test8.bb in the attached zip file to see what's new without having to compile oneself...

Zip file version


Rick Nasher(Posted 2014) [#24]
@Iowan: should work on both(last time I checked).


Guy Fawkes(Posted 2014) [#25]
*Pokes Ploppy*, Great work so far, @Ploppy! Keep it up! When can you add B3D / 3DS / X save support? (Or at least B3D)?

Thank You once again for saving Blitz3D! LONG LIVE BLITZ3D!


Ploppy(Posted 2014) [#26]
Relasing a new version tonight. Not much as new commands are concerned for the moment though. For the last week I have yet again been streamlining the existing commands and renderer, eliminating certain bugs in the process.

The renderer is now faster than before, more efficient, and will now send objects to the gfx adapter that will appear in the camera's viewport, nothing more. I have also improved the render order so that the renderer will sort all rendered objects by their distance from the camera and draw the furthest first (this however will not override dxEntityOrder; if you have chosen an order index the renderer will sort each order index and render each set in turn). The reason I have incorporated a distance sorter is mainly for the benefit of transparent objects (alpha value below 1 in either object's alpha attribute or using a alphaed texture), these type of objects cannot use the z-buffer as is their nature.

I have also corrected several bugs existant in dxEntityMove, dxPositionEntity, dxRotateEntity and dxTurnEntity. These should now behave correctly. Rick, I have checked out your two versions of the planet demo, and now play identically in every way I can see. I have even corrected the camera view so it is the same.

It's all taking shape little by little. (yay)

I have included a command I am still working on but a bit incomplete...

dxLoadMesh3ds%(filename$,parent%)

This will load up a 3ds mesh into a valid entity, but will not quite yet set the colours or correctly position it. Otherwize, works fine...

Two other new commands are
dxGetWinVersion$() - will return a string containing the windows version used on the host machine - will be useful for compatibility later
dxCameraZoom(camera%,zoom#) - functions just like the b3d command

Zip file version


Yue(Posted 2014) [#27]
Perfect work here.


Guy Fawkes(Posted 2014) [#28]
Awesome, Ploppy! :D Keep up the good work! We only need 2 more formats, and the ability to save, and I think we'll FINALLY have the ability to create TONS of great DX9 games & programs thanks to you!

Kudos, bro


Ploppy(Posted 2014) [#29]
You kidding me, right? I reckon I have another few months on this project to get it to a standard which I would consider complete. Although I'm not too far from covering the majority of the B3D's standard functions, I plan to apply to following additions...

Bone animations
Video in texture (avi, mpg, mkv...)
Webcam in texture
Touchscreen input
Lod landscapes (for the moment dxterrain is not lod)
Csg manipulation (a big personal wish)
DX11 version
Perhaps a basic physics engine thrown in too...
upnp Multimedia client/server support

Not to mention all the docs I have to create

I am very motivated to bring Blitz up to date as much as I can with today's techniques and hardware. Whether I manage to accomplish all this is another thing, but I'll give it a shot...


Yue(Posted 2014) [#30]
In this case, yours with this excellent work, Blitz3D refuses to die. I can tell he road you have traveled is very big way, and what is lacking desire in personal motivation for you and you can give us a little happiness, who are not programmers, but rather game designers to computers.




Rick Nasher(Posted 2014) [#31]
Yes, Yes, YES!! Thank you very much Ploppy, you pulled it off: compatibility reached another milestone. Code works OK by just adding the dx prefix!

I'll see if I can manage to upload my very first little B3D testprogram this weekend(busy painting/redecorating the bedroom here pfff.. and have also been working on my game stuff a bit).

Your plans sound really really great, they actually would put Blitz3D way back up there where it belongs!

As said before, when you're done working on DX9 and the stuff mentioned above, then I'm pretty sure the lot of us are willing to pay for the DX11 version(I know I would), especially if you also manage to throw in a physics engine.

So you could be well on your way of making a small fortune and as a side effect: keeping the wife happy, cos a happy shopper is a happy woman ;-)


Xilvan(Posted 2014) [#32]
I everyone,

Maybe I'll try it in some weeks. I'm presently
working on a Blitz3D project. The game
is bound to appear somewhere
around Sprint 2014.

Maybe our next project will
be made with your engine.

Does it can animate boned
3D models made in b3d ?

Friendly,


Dakkaron(Posted 2014) [#33]
This looks really great!

Would it be possible to add different shader models / allow the programmer to add shader code?


Ploppy(Posted 2014) [#34]
New version out,

dxEntityShiness and dxSurfaceShininess now work...

Point lights and spot lights now work equally. Have fun with it...

Few corrections made on camera movements, should work fine now....

Dakkaron, in answer to your question - I will perhaps add a few more shader examples later but not much more. I have already begun shader coverage, and I have yet to finish these commands so that a shader access will be fully available; already have figured out how - just need the time to code it (amongst many other things, it's all a bit messy but coming together). I will release more info on how to use my shader commands as for all other commands, and perhaps a tutorial on how to get the important data from a shader in order to communicate effectively with your blitz project. But the rest will be up to you, either you scour the internet for shaders already made and incorporate this into your code (what I have already done), or you write your own. For the latter option you will need to know HLSL though....

These are the shader commands currently usable in hardwired...

dxPixelShaderVersion%()
dxVertexShaderVersion%()
dxCreatePixelShader%(operation$,file$,entry_point$,version$)
dxFreePixelShader(pixel_shader%)
dxCreateVertexShader%(operation$,file$,entry_point$,version$)
dxFreeVertexShader(vertex_shader%)
dxEntityPixelShader(entity%,pixel_shader%)
dxGetLastShaderError$()
dxEntityVertexShader(entity%,vertex_shader%)
dxSurfacePixelShader(surface%,pixel_shader%)
dxSurfaceVertexShader(surface%,vertex_shader%)
dxGetConstantTableSize%(shader%)
dxConstantCount%(shader%)
dxDeclareVertexShaderWorldConstant(shader%,constant_name$)
dxDeclareVertexShaderViewConstant(shader%,constant_name$)
dxDeclareVertexShaderProjConstant(shader%,constant_name$)
dxDeclareVertexShaderWorldViewProjConstant(shader%,constant_name$)

Xylvan, for the moment boned models do nothing in my engine, will work on that though. It'll come...

I'll keep you all posted in any case for new stuff as usual....

Zip file version


Ploppy(Posted 2014) [#35]
Think I'll need to get a resumé out in the next few days of what commands are already available - some latecomers to the forum may not be aware of what is already present in hardwired - already more than 300 commands and going strong!!!

Read the BlitzDX9.decls file, and that'll give you an idea in any case ;although some of the commands listed in there are either empty or half done. 80%-90% of the functions listed are complete though...


Ploppy(Posted 2014) [#36]
Uh, does anyone have a b3d file they could lend me to do some tests?? Can't seem to find any... thanks in advance...


Guy Fawkes(Posted 2014) [#37]
Yea, Ploppy, here's one:

http://dl.dropbox.com/u/27334324/dwarf.zip

It's Psionic's Animated Dwarves. Although I would find something HUGE to test it on because for some strange reason, CameraPick() has a glitch that doesn't work on gigantic models :/


Iamhere(Posted 2014) [#38]
nice work.
You can try the animated 3D Models from Psionic's side.
http://www.psionicgames.com/free-stuff/free-3d-models/


Rick Nasher(Posted 2014) [#39]
The Ninja from there also is a nice one. Has lots of differnt animations I believe..


N_Gnom(Posted 2014) [#40]
Ploppy...great work.
But i have found a little problem.
I compile test6.bb and if i don´t move the mouse the frames per second grow constant up.In another cam view the frames per second slow down.So if i could wait maybe 20 minutes frames could be 0! without moving the mouse and do nothing.
On first i thought its a memory leak but after 15 minutes i moved the mouse the fps grow up and up and up.
Maybe is you fps function not fully working.

Sorry for my bad english.


Ploppy(Posted 2014) [#41]
Hi n_gnom, sorry this was only because I have kind of abandoned test6.bb and didn't really update. The dll is fine, but the test6.bb program is probably missing somthing. Pay test6.bb no attention, test7.bb and test8.bb work fine though, and I keep these updated (for the moment at least!!!)

Thanks to all for your help, I have had a look at the models and tested them out using blitz's commands. Some good models and love the anims - all this has lead me to a new discovery dx9-wize so I am going to spend the next few days putting it all together (by the way almost finished saving .x meshes). You may not hear from me again until the weekend, busy coding and all....


Yue(Posted 2014) [#42]
waiting :)

By the way, I would love if you can do the documentation for Shaders would be a good start for me I have no idea which is a shader.

A greeting.


Ploppy(Posted 2014) [#43]
I will do some docs on my shader commands, giving enough info so that people can easily communicate with the shaders.

Shaders are independant programs that can do a wide variety of things. For graphics, vertex and pixel shaders are used, but other type of shaders exist.

A vertex shader is called for each and every vertex rendered. The info that a shader has at it's disposal is the vertice's x,y,z and it's normal x,y,z. It also can recieve info on the camera's position/scale/rotation, the viewport, and the object's position/scale/rotation. A shader can use all of this information the manipulate the vertex to any way the author wishes.

A pixel shader program is called for each and every pixel of an object rendered. The pixel's attributes can be manipulated in the same manner as the with the vertex shader.

Shaders are most commonly written in HLSL language (or GLSL for opengl), but they can be written also in assembly language (very user-unfriendly). HLSL is very similar to c++ or pascal in form. It has many functions to perfom a wide variety of calcuations. Here is an example of a very simple pixel shader, used in my test7.bb...


sampler2D input : register(s0);
float4 main(float2 uv : TEXCOORD) : COLOR
{
float4 Color;

uv.x = uv.x / 0.5;
Color = tex2D( input , uv.xy);

return Color;
}


This pixel shader will take the pixel's planned texture uv coordinate and change it so the u coordinate will be divided by 0.5.

Shaders are very very powerful tools and can be used to create amazing and fast effects.

See this site to see a few examples of pixel shaders - if you have webcam you can really see what's going on

This looks like a nice shader demo site also...

I will go into much more detail later, but yasha gives a good viewpoint on shaders in the old thread here- worth reading...

Shader post


Ploppy(Posted 2014) [#44]
New version out...

dxLoadMesh%(file$,parent%) - loads only .x and .3ds file for the moment
dxSaveMesh%(file$,entity) - save meshes in .x format (other formats to come..)

Zip file version


Yue(Posted 2014) [#45]
Thanks for the info, I must say I feel like an explorer in front of a jungle waiting to acquire knowledge with reference to the Shaders.

Sure if my native language was English, everything would be much easier for me.


Xilvan(Posted 2014) [#46]
ok, i'll keep waiting !


N_Gnom(Posted 2014) [#47]
@ploppy: okay.I´m just wondering....another question btw. did you handle all entities in your engine per sorted lists?


Ploppy(Posted 2014) [#48]
Yes, before going onto the rendering stage, the dxrenderworld makes itself a list of all entities that are not set as hidden. These objects are sorted by entity order, and each entity order is sorted by distance from the camera for each camera rendered - from the furthest to the closest. If the entity is not within the camera's viewport, it will be eliminated from the list. Making a first pass though all objects helps to improve performance so that the rendering part renders ONLY what it need to render, no unecessary stuff. This method is very similar, I would think, to blitz3d's rendering system and to most other engines at a guess...

The list is then passed on to the next stage, where it will send entity info onto directx...


N_Gnom(Posted 2014) [#49]
Thank you for answering.
A friend and me would try something with dx11 and i would find the best way to handle the entities.
I´m wondering how fast your engine grows up.


Ploppy(Posted 2014) [#50]
Fast-ish. I began writing this in mid-october from nothing. I think have have got good foundations going on it, is pretty stable, and it's getting closer and closer to completion.


N_Gnom(Posted 2014) [#51]
Your engine is great and so small bytesize.
I hope we can create on first a simple engine with primitives.
It´s a hard way and we start with nothing too.


Yue(Posted 2014) [#52]
Ploppy, I would like to work on your project and I would like it if you like the idea of making a website for the project that you would be the manager, I get a domain and hosting and I take care of custom web design, something like this.

http://www.torque3d.tk/


Ploppy(Posted 2014) [#53]
That's a kind offer Yue, but I already have a site and I wish to continue publishing there. For the moment, I do not wish to bog myself down with a welcome page and links and all for my project it still very much in developement - things will change very often. Sometimes I will even delete certain things if I find they do not work or if I discover better methods. For the moment I prefer simply releasing a zip file on my own ftp and posting on this forum about updates. When I get to a stage where hardwired becomes something worth it's salt then I will work on documentation and eventually a web site.

Again, thanx for the offer - I did have a look at your work, and I have to say for me it is very professionally done - ¡muy claro, bravo!


Ploppy(Posted 2014) [#54]
dxLoadMesh now works with .b3d models (see test10.bb)

Zip file version


Ploppy(Posted 2014) [#55]
New version out again... here are a few new commands...

dxAllocateVertices(surface%,number_of_vertices%) - will reserve a chosen amount of vertices in a surface
dxAutoUpdateMeshBuffers(enable%) - enable/disable auto update feature of mesh functions
dxUpdateSurfaceBuffers(surface%) - manually update mesh buffers

New demo, maze.bb

Each time a surface is modified in any way, the buffers that are sent to directx are updated at the end of the routine of any mesh manip function. A time consuming thing processor wize, but essential to keep the mesh up-to-date. If, however, you have many modifs/additions to do to a mesh before making render-ready there is no-point in updating it's buffer each and every time. With dxAutoUpdateMeshBuffers set to false you can now change it's default behaviour from 'update every time' to 'do not update'. At the end of your manipulations, do not forget to re-enable the autoupdating system with dxAutoUpdateMeshBuffers(true), otherwize directx will display the mesh in it's state the last time the buffers were updated. You can also manually update mesh buffers with the dxUpdateSurfaceBuffers(surface%) command.

You can see a very good example of how this works in maze.bb, where I have deliberately set up a mesh with many vertices and triangles. See the difference when meshes are set to autoupdate by changing it in the code. Much slower, as you can see.

dxAllocateVertices(surface%,number_of_vertices%) will create a given number of 'empty' vertices in a surface that you can after modify with dxVertexCoords, dxVertexNormal, dxVertexTexCoords and dxVertexColor. This method of mesh creation is much faster than the usual dxAddVertex method because the memory used for the vertices is allocated just once with the dxAllocateVertices function; with dxAddVertex memory has to be re-allocated for each new vertex which is time consuming.

Again, the maze.bb demo hold's a good example of this...


I have also included a maze creation algorith for demo purposes, just for fun, as you will see. It has limited uses outside of the demo though, for I haven't made it very versatile for the moment.


Yue(Posted 2014) [#56]
Ok, no problem :D

New zip, perfect here.


N_Gnom(Posted 2014) [#57]
@ploppy: is there fully .b3d support?texture per surface and several texture layer each surface?and animation...?


Ploppy(Posted 2014) [#58]
not yet, yes, yes and not yet (but it'll come)...


N_Gnom(Posted 2014) [#59]
okay...thank you for answering....
you wrote that you will adding physic in future.did you know the way?external dll(physx) or newton inside?
did you plan Deferred Shading/Rendering anytime?
More than 8 lights are so possible.and a better handling be dynamic lights on terrains.
Similar to a per pixel lightning shader.


Ploppy(Posted 2014) [#60]
Am thinking about using physx, but that will be for later. May not include physics engine, am mulling that one over....


Steve Elliott(Posted 2014) [#61]
Very nice work :)


Yue(Posted 2014) [#62]
Do you think functions for prefabricated effects like shadows, glow, dof etc?

Another winged'd like is for a way later to keep the assets in encrypted form. All these things would make us much more productive in our work.


Yue(Posted 2014) [#63]
Model Zombi animation format.b3d.

https://www.dropbox.com/home/Public/Zombi/Zombi


Ploppy(Posted 2014) [#64]
In answer to your question, yes I think that a LoadBankMesh and SaveMeshBank command would be a good idea. That way, if you wished to encrypt it or do whatever you like with it you could by loading it to a blitz bank as usual, encrypt/decrypt using your own routines and then load it in/save it to as a mesh directly from/to the bank. I will look into it, but not right away. This method could be used on texture files also.

I'm not to hot on the shadow idea, these can be 'pre-baked' by the blitz-programs. Maybe I will try something, but I think that you will have all the tools necessary (including dxRenderToTexture) to be able to generate your own shadows. Shaders can help also in texture generation.

Glow is an effect that can be done with a shader.

What is dof?


Yue(Posted 2014) [#65]
Here: http://en.wikipedia.org/wiki/Depth_of_field

Always on the lookout for new developments: D

I'm not aware of what the shadows with Shaders, provided I have in my mind what are volumetric shadows and shadow maps from the perspective of a camera, but I think the shaders could create much more realistic shadows but do not understand the whole process.


Guy Fawkes(Posted 2014) [#66]
I have to agree with Ploppy, we DEFINITELY need an animated B3D/X & possibly 3DS model saver / encryptor / decryptor.


Yue(Posted 2014) [#67]
Another question among many, Ploppy you thought about a particle system?


Ploppy(Posted 2014) [#68]
I have already begun on a particle system, but just a little bit. There are already the commands

dxCreateEmitter%(elements%,base_entity%,parent%)
dxEmitterCountElements%(emitter%)
dxEmitterSetElementCount(emitter%,count%)
dxEmitterDeleteElement(emitter%,element%)

I haven't told you about them because they are not integrated into the renderer for the moment, and need more commands to complete the experience.

New release out for this evening..
Zip file version

The following functions no longer exist

dxAllocateVertices(surface%,number_of_vertices%)
dxAutoUpdateMeshBuffers(enable%)
dxUpdateSurfaceBuffers(surface%)

I have changed the way hardwired manages it's buffers. It will update its buffer ONLY once between two dxRenderworld commands if a mesh has been modified. As for vertices, a large memory allocation is automatically created for mesh modifiers, and is trimmed down to the vertex/triangle count at the next dxRenderworld command. This method is fast (see newly updated maze.bb)...

Not done anything else today, busy day at work, stuff at home to do as well like cooking. Ill, tired and wanna watch a bit of telly (have no beer though, apalling thought really). See you perhaps tomorrow for more forum fun...


Yue(Posted 2014) [#69]
Ho such great news, really what worries me more is how to keep their motivation especially when your goal is not profit.

It's always good to pick a nice break something with a fresh mind


Ploppy(Posted 2014) [#70]
I know what you are saying, I have a lot of great ideas for my project, but it is hard keeping focus when my goal is not profit. My hope is that with this project I will get recognition and reputation with which I could profit. It is a gamble, but I hope it bears fruit. If I charge for hardwired, I think it will lose interest, understandably. If I keep it free which is still very much my intent, hardwired will gain a good interest (as long as it is bug-free of course) and this is all good for a prolonged life for blitz.

I am, like many others I am sure, a frustrated programmer. I would definately like a job in programming, especially for blitz research for example I'd feel right at home for obvious reasons, but for this I need to prove myself. I do not have any certificates to show off as I did not study this at school/college, but if I managed to complete hardwired I could use this to show off a good example of my abilities. Could help, and if it doesn't at least I will be able to say to myself that I have managed to create and publish something that people use.

I have big plans for hardwired, but I promise nothing though. I am discovering new things every day - programming methods, techniques, functions. I am learning and able to apply much of what I absorb into my code. But up to what limit I do not know. All I can say is that I will try my best, and hope you are all patient enough to wait a while until it is complete enough to use for game creation.

So, thanks for your concern Yue, but I'm okay. Still motivated and all four cylinders firing!! Most of my free time is spent of hardwired, and of course, the bigger it gets the slower I become in releasing new stuff because bug-hunting becomes needle in an even bigger haystack. But I am getting there ;D


Rick Nasher(Posted 2014) [#71]
My-oh-my.. You are not even a programmer by profession??? I must say I'm stun, cos the shear speed and brilliance at which you go at this massive task is just incredible. I am in a almost constant awe watching your work.

I am pretty sure that if you manage to pull this off Silicon Valey welcomes you with wide open arms(and IMHO Mark would be silly if he wouldn't hire you, but perhaps.. he won't be able to afford you cos you probably will get better paid offers). Like Yue, I only hope that you wont run off to them before you finished the job and keep this marvelous tool and work of art from being used by the world cos this will really enable us to bring our wildest fantasies to life. Cos lets face it: there just was/is nothing better for the task then Blitz3d. It's great, fast and easy to program in.

I just don't know how you do it, I even didn't manage to clean up that simple little planetary program, cos I was too busy with my foliage system and you seem to be doing all these great things at once(and drinking beer too lol)? I don't get it.. You must really be under rating yourself waaaayyyy too much.

I myself am a Tech Support Agent for Dell, which I would love to run away from, cos the workload/pay ratio is just totaly beserk and would much rather be doing something fun/creative/productive.


Yue(Posted 2014) [#72]
What I can say is Blitz3D as a user, over time I've realized I'm not a programmer, and many users you give us great hope, that hope has long frames by you and your great job to many that happiness will give us to do things and learn other terms in this great world of development.


Ploppy(Posted 2014) [#73]
A few new commands...

dxLoadMeshXFromBank%(bank%,parent%) - load an x mesh from a bank, instead of a file
dxLoadTextureFromBank%(bank%,flags%) - load a texture from a bank

Maze.bb updated


Zip file version
more to come....


Yue(Posted 2014) [#74]
Ok, Perfect here.




Ploppy(Posted 2014) [#75]
Oh my, where have the textures gone??? Is that me or Yue??


Yue(Posted 2014) [#76]
mmm, I think I misread your previous messages, the problem is that not speak English and use the google translator.

The textures do not load on my pc, I thought that you gave no releases textures, but looking at the code again the textures are loaded here not me.

A greeting.


Yue(Posted 2014) [#77]
Confirmed, I do not charge any texture from any demo ...
Posts ago you said you thought that demos did not work, but at any moment I do not load the textures.

will test in another pc and I'll tell you.


Yue(Posted 2014) [#78]
I tried on another computer with windows xp and I do not load the textures.

I repeat I thought that this was normal in a previous post I thought you told me that the textures in the releases were not included or something. Now I see that the textures do not load any of the examples.


Yue(Posted 2014) [#79]
Test7.bb



Press the keys but I see different textures changes, just changes color.


Iowalien(Posted 2014) [#80]
I am having trouble getting this to work. I have placed the dlls and decls in the userlibs folder in both blitz3d and blitz+ but when I run the examples it opens a blank windows cmd shaped window and doesn't do show anything.

EDIT:
when I run the prebuilt examples test7 and test7 they exit with the error "userlib function not found".

Macbook 2,1 13" mid 2007 osx 10.6.8 sl
Boot Camp 3.0 + Windows XP Pro x86 with all drivers installed
Intel Core 2 Duo 2.16ghz
3gb RAM DDR2
Intel GMA 950 256mb clocked to 400mhz

DirectX 9.0c redistributable from june 2010 and the sdk from august 2007 installed.

:(


Ploppy(Posted 2014) [#81]
Iowan, it is possible you do not have directx9 up to date, a problem I have already come across with xp machines. Try downloading dx9_43.dll from the internet (easy to find) and copy it to the same dossier as one of the example bb (not in the userlibs folder). Run the example, if it works (and it might well do), you directx 9 is not completely up do date.

Reinstall dx9 using this link here, it should install all, including dx9_43.dll...
Direct x9 installer

Yue, try adding the following code at the end of one of the test.bb programs, just before the End command. Also, can you reduce the size of the images you post to the thread, for they are huge.



If the program returns 0 for these lines, it is just that the images folder and/or its contents are not installed in the folder where the test.bb are kept. I hope it is just that simple, or else I have a problem in my code somewhere (perhaps a memory pool issue for textures).

Can you let me know of the result, please. If you have 1 returned for all on these lines, I will have to check things out here.


Iowalien(Posted 2014) [#82]
@Ploppy:
Isn't that dll included with the dx9.0c web installer? is this the same as d3dx9_43.dll?

got the files from dll dump and dll files websites.

EDIT:
Tried both versions and still a no go. gives me the error "userlib function not found" though it now works when I compile and run within IDEal.


Yue(Posted 2014) [#83]
Hello, with filetype to end the program returns me to file a 1 value, but continued without seeing the textures and not what the problem may be.


Yue(Posted 2014) [#84]
Do not have one of the first test? if you looked at those textures.


Ploppy(Posted 2014) [#85]
Hi Yue, I have just updated my dxLoadTexture routine, because I think the problem must come from there. It now has a little debug routine, if the textureload fails, it will display an error message, one of five messages are possible...

"Texture error -invalid call"
"Texture error - dx returned 'not available'"
"Texture error - out of video memory"
"Texture error -invalid data"
"Texture error - out of memory"

If you see one of these messages, please tell me which one, so I have an idea in what direction to go to solve your texture problem.


Ploppy(Posted 2014) [#86]
As for you, Iowan - if it works with IDEal and not for blitz3d/blitz+ it sounds like a compiler/IDE problem. Are you sure you copied the dll/decls to the right userlib folder relative to the compiler you were first using??

Yes, I did mean d3dx9_43.dll, by the way. Sorry about the confusion earlier, that was a typo...


Wolf1870(Posted 2014) [#87]
@ Yue:
Please, can you resize your pictures? The many scrolling down is not beautiful. Look at the picture of ploppy. much better... Thank you very much!


Rick Nasher(Posted 2014) [#88]
Dunno what's going on, but here all textures loading OK.

test 6: "Not enough parameters".
test 7: Noticed the astronauts suit is now looking metallic, probably intentionally.
test 7b: Missing the Halloween music theme to support the pumpkin.. ;-)
test 8: Noticed Santa is no longer running across terrain. Intentional?
test 10: Dwarf all fine.
Maze: All fine here.

Tested on Win7 Ultimate x64 SP1(fully updated), Intel DualCore T5550 @1.83Ghz, 3GB RAM,NVIDIA GeForce 8400M GS, DX11.


Ploppy(Posted 2014) [#89]
New version out, have changed a few things for textures and mipmaps. Yue, please check out....

Zip file version

Rick, santas are now on the move again, I had disabled that in the blitz program because they were annoying me, but I have re-set them loose in the wild as they were always meant to roam.


Wolf1870(Posted 2014) [#90]
Hi Ploppy. In the new version the textures are blurry in the distance, last version was sharp. So do not forget the TextureFilter 256: Store texture in vram for sharp textures... (by the way: Texturefilter 4 not working...)


Ploppy(Posted 2014) [#91]
There is no 4, please see

link

The only reason that the textures are blurry further away is because I changed the default settings for the texture filters. You can change them with the dxTextureFilter commands..


OJay(Posted 2014) [#92]
just stumbled across this thread after abonndening this forum (and blitz altogether) for several years. just had to move on to another engine back then because it (DX7) was just not feasible anymore; even with fastext and all kind of memory hacks the limitations where just too big for our intended project. last blitz status was this. not too bad, but performance was suffering badly (something like 30fps on a decent system on that screenshot above; too few buffer for the rest of the game)...

i've seen a lot of approaches to bring a newer DX or OpenGL version to good old blitz; some where promising for a while (e.g. xors) but none was able to sustain for long enough...
seeing those thread(s) here is giving new (and probably last) hope to do one last game with blitz, because i somehow still dig it and the compiler is still solid!

so please note, you have one more subscriber curiously following the progress! :)

rock on!


Wolf1870(Posted 2014) [#93]
Hi Ploppy. In an earlier version of your program it worked (Flag 4) that black surfaces of a texture were presented as invisible. Which flags must be used that the textures are sharp again? I've tried it and did not work.


Ploppy(Posted 2014) [#94]
Try dxTextureFilter 1,1,1, this will alter the global texture filters to sharpen textures. I have, however not yet integrated the flag 4 (masking) for textures. That will come, alpha masking (flag 2) does work though...


Wolf1870(Posted 2014) [#95]
tested with flag 2, yes, that works! Unfortunately, the command >dxtexturefilter< can not be found...


Ploppy(Posted 2014) [#96]
sorry, im mean dxtexturefilters...


Wolf1870(Posted 2014) [#97]
At the moment it's just the way it is. Thank you for your support, Ploppy, and keep up the great work!!! :-))


N_Gnom(Posted 2014) [#98]
Did you use the same vertex lightning like in dx7?
Because in your test9 the light is very smooth.
Or have the terrain many many polys?

And it seems that b3d loading doesn´t work correctly.
I would load my terrain.b3d and its terrible...smile.

But...good work ploppy.


Iowalien(Posted 2014) [#99]
As for you, Iowan - if it works with IDEal and not for blitz3d/blitz+ it sounds like a compiler/IDE problem. Are you sure you copied the dll/decls to the right userlib folder relative to the compiler you were first using??

C:\BlitzPlus\userlibs\
Is it only the decls and dll files that go there?


Rick Nasher(Posted 2014) [#100]
Yup, AFAIK.


Ploppy(Posted 2014) [#101]
So why does it work with IDEal and not the other? Doesn't make sense. If you have blitz3d, I hope you copy the dll/decls to program files\blitz3d\userlibs as well..


Yue(Posted 2014) [#102]
Ploppy, not load the textures here ... It is strange. do a video for you to see


Yue(Posted 2014) [#103]
Ok, vide here.



Rick Nasher(Posted 2014) [#104]
@Yue: Oops. Wasn't thst Protean thing infected? (don't mean to scare you) ;-)

Did you try the default editor, just in case?


Yue(Posted 2014) [#105]
@Rick Nasher

I do not think, with the native editor also goes the problem of textures, hey regalame an executable example Maze to try here.


Steve Elliott(Posted 2014) [#106]
The mouse control gives me dizzyness (too sensitive) but good work here.


N_Gnom(Posted 2014) [#107]
btw.: @steve: is your project "levelup" done?


Steve Elliott(Posted 2014) [#108]
Hi, Level-up for Nuclear BASIC and Nuclear Fusion was completed but I decided to switch to my own language and priorities after thinking Nuclear was sadly going nowhere.


N_Gnom(Posted 2014) [#109]
Yes...matthew was 2 month away...we thinking jail or psychiatric hospital(nut house say the american LoL)

Now back to ploppy and the topic.


Rick Nasher(Posted 2014) [#110]
(@Ploppy: Is it me or is it really getting a LOT more busy on this topic, hehehe..)


Steve Elliott(Posted 2014) [#111]

Yes...matthew was 2 month away...we thinking jail or psychiatric hospital(nut house say the american LoL)



Sorry to hijack thread, but Matthew has not posted in 2 months?! Gotta feel for Matt he works hard, but people he's had work for him let him down...for instance, somebody was being paid to convert the engine to Opengl so other systems could be supported - Android was next. Plus his artist and general shader wizard keeps all the code to himself (even from Matt) while we all waited on promised features.


Ploppy(Posted 2014) [#112]
Yue, I haven't forgotten you. I have made you a special archive for you to test out the texture features. I have written a quick demo giving examples of dxLoadTexture, dxLoadTextureFromBank and dxCreateTexture. It is in .bb and .exe form. I have also included maze.exe compiled as you asked.

Please run the texturetest.exe ([Esc] to quit) and let me know if you see textures on the meshes. Your screen should look somtehing like this...


Yue texture test

Your feedback is important to me as is feedback from all, for this helps me to debug. You are bug-testing for me in some ways (and I'm not even paying for this service so I thank you even more ;) ).

Regards

P.s. If anyone else has not been able to render textures with hardwired please tell me, for the moment Yue is the only one not able to do so. But if textures are not working on his machine it is very possible they will not on many others.


Steve Elliott(Posted 2014) [#113]
Textures are fine here - except the maze example does have some problems. I think it's where maze walls are intersecting - they seem to be coming through the walls at times and flickering. Prob just a coding bug or possibly your culling routine. And the mouse movement in that demo is very sensitive, it jumps about like crazy. But no probs with textures in all the examples :)


Yue(Posted 2014) [#114]
Hi, I greatly appreciate your time and trust in what I show here, but unfortunately not load the textures and have tested on two machines with windows XP.

Watch the video.



In this case I want to show that the only demo that shows the textures is santa, where I play with the mouse and scream and go as superman up. (Picture)




Ploppy(Posted 2014) [#115]
Thanks Yue, I'll think it over and try to figure out why...

The santas are not textured by the way, what you see are colored meshes...

I'll let you know, if anyone has any thoughts please help - for this one is very intriging..


Steve Elliott(Posted 2014) [#116]
Looks like an XP issue.


Ploppy(Posted 2014) [#117]
I don't think it is, I have already tested hardwired on an xp machine, and it works fine. There's something else... but what??


Steve Elliott(Posted 2014) [#118]
When I get time I'll test it on an XP machine too for ya...maybe simply a directory problem? Textures not in the correct directory? :)


Yue(Posted 2014) [#119]
I remember in the first test if it was possible to see the textures ...
so perhaps you have not the first benchmark test ..


Yue(Posted 2014) [#120]
Well I have dropped it or my directX Windows XP, and I've tested Xors3D proof and has hido well.


OJay(Posted 2014) [#121]
maybe its in the files or folders name? as yue is spanish (?) maybe he has some spanish special characters there? we had this issue as well back in the days, but with kyrillic chars...ISO vs UTF8/16 encoding :)


Ploppy(Posted 2014) [#122]
Yue, please change code to the following and complile. Do you see something???




Yue(Posted 2014) [#123]
Hi, I run the code and the textures are not loaded.

There was a problem compiling, regarding where the false dxLoadTextureFromBank was a parameter more.

But remove the false and launched the test, but not by the textures.

turn cubes only.


Ploppy(Posted 2014) [#124]
Not even textures for cube number 3 (the one on the bottom of the screen)? This one is made of a texture created internally using dxRect to create a random texture (see my example in previous post).


Yue(Posted 2014) [#125]
ok, sorry, yes, if the texture of the cube below it is already visible, I was asleep last night, I changed the parameters of color and you can see the texture created in my red case.


Yue(Posted 2014) [#126]


In this case I can not see the rectangles in texture.


Ploppy(Posted 2014) [#127]
Thanks Yue, I'll try my best to sort this out for you. Strange thing is that the textures are created and loaded, or you would have had an error message. But they will not display, somewhere I have a bug in there...


Ploppy(Posted 2014) [#128]
New version for you to test out Yue. Hope this works....

Yue texture test


Yue(Posted 2014) [#129]
Sorry men =(




Rick Nasher(Posted 2014) [#130]
@Ploppy: Can it perhaps be a GPU/card specific issue? What has changed, what is difference between versions in the code, cos version before it still was working OK for Yue too right?

Strangely, I don't have any issue's what so ever.


Ploppy(Posted 2014) [#131]
I am guessing that textures work on blitz3d without a problem for Yue. I also think that textures must display fine in dx9 games he plays on his XP machine. So, for me there is no reason that it shouldn't work on Hardwired.

If my dll is behaving unexpectedly on Yue's machine, I fear there will be similar things happening on other machines. I have to find the cause of this, and I will. But it may take some time.

Yue, lo siento mi amigo pero creo que necessito un poco de tiempo para que veo el problemo en mi codigo del programa. quiero tener éxito con tu maquina. gracias por tu paciencia.

Hope my spanish is ok, I haven't studied that for a while...


Wolf1870(Posted 2014) [#132]
Ploppy, when you buy a game today, it runs on 95% of computers. There will always be a small percentage, where there will be technical problems,
be it harware or software. Yes, the days of DOS were easier to handle ...
(Install and play)


Yue(Posted 2014) [#133]
In the game I'm developing ISON, textures load properly, I tested with Xors3D and likewise, currently operates eight days game Mafia II and everything goes correctly.

The strange thing is that the tests I've done with the dll has been made on two computers with Windows XP, a laptop and desktop and therefore appear continuous without textures.

9800 GTX graphics card nvidia 1 gig.
Intel dual 3.2

3 Gigs of ram.


N_Gnom(Posted 2014) [#134]
btw.: maybe you, ploppy should make some .exe demos that can run with different machines. here is an pc and a netbook available.on both i can test.or you present it on a website there we can download and comment it for you.that could help.the same way i would do in my forum in future if dx11 is done...anytime.


Ploppy(Posted 2014) [#135]
Yue, please try this code



This program will test if hardwired is able to access the textures, to see if the problem is ONLY display oriented or if it goes further than that.

If the window at the end of the program displays 77777777, it means that textures are present but cannot be displayed (for the moment). If you have 00000000, it means that hardwired cannot access the textures at all. Please let me know what result you have, that way I will know what part of my dll I need to concentrate on..

Thanks for your time and dedication...


Yue(Posted 2014) [#136]
Good.




Ploppy(Posted 2014) [#137]
Good news, this means that the textures ARE there, but my routine is not showing them. I will work on it...


Ploppy(Posted 2014) [#138]
Yue, I have released another version for you, please check out texturetest2.bb and tell me if you see a texture or not.. Thanks

Yue texture test

This version contains dxRenderWorld2, a special version of dxRenderWorld I created uniquely usable for this test. It is a strip-down version of dxRenderWorld to help me find the texture problem Yue is facing. Do not use this command as will crash or not display for any other program....


Yue(Posted 2014) [#139]
Hi, here not load texture.




Ploppy(Posted 2014) [#140]
New version out, Yue please download and try again. I have made some changes....

Yue texture test


Yue(Posted 2014) [#141]
I have the same image results from the previous post.

I only see the cube rotating on its own axis.


N_Gnom(Posted 2014) [#142]
Sorry offtopic: is it possible to write pm´here?(@steve: matt is more then 2 month offline...if people askeding about that...dragon banned such member)

@ploppy: have tested Yue´s example.Here runs fine.


Ploppy(Posted 2014) [#143]
Well, yes I guess - but looks as though you done it already anyway, not that it's a problem.


Steve Elliott(Posted 2014) [#144]
@ N_Gnom Aw, yes dragon is cool, but so protective...Whatever happen's I'll always have the utmost respect for Matt and Dragon. No need for more info.

As Ploppy will realize, the engine guys are there to be shot down. Unfair, but true. Doing well mate :)

I decided to lay low until I was a bit further along, but you seem to be making good progress.


MadJack(Posted 2014) [#145]
What's going on here?

This 'Ploppy' appears to be creating the fabled 'Blitz3d DX9'!


Yue(Posted 2014) [#146]
This seriously shows me that many who walk in this community here are not programmers and what this man finds something I've always thought, As long as the Blitz3D userlibs is powerful, confirmed it is not the first time Xors3D is meuestra well that Bltiz3D retractors, if all goes as it goes, our friend will be a war hero. : D


Rick Nasher(Posted 2014) [#147]
He already is as far as I'm concerned, just look at the interest he's raising. More and more each day.


Ploppy(Posted 2014) [#148]
Very pleasant of you all for the compliments. I have to say I appreciate them but I can't let it go to my head and have to remain realistic. I have to realise that if I do not complete it, not matter how promising it seems at the moment, I will have essentailly nothing. This will be the first project in my life that I have such an intention to complete. I have written many programs in the past but have always given up after a while for one reason or another. I will feel even more of a sense of real accomplishment if someone uses my dll in his/her project and manages to get that complete and published.

And Yue, don't forget I can't yet get your textures working (which annoys me, I can't figure it out for the moment). So thanks for the praise, but you have to admit it could be better.

I'm no war hero but I soldier on... ;D

This is written at my work place, so no update for the moment....


col(Posted 2014) [#149]
@Ploppy
Are you using PIX to help debug? It should be in the DX9 SDK. While it can be a little buggy occasionally it's a life saver for debugging anything gpu related for dx9, as far as I know nothing else comes close to its abilities.


Ploppy(Posted 2014) [#150]
Thanks col, I'll have a look...


Ploppy(Posted 2014) [#151]
Yue, hi again, still thinking about getting textures on your machine...


I have uploaded a new test for you, it is a compiled exe of a directx9 tutorial taken from the sdk. Please run 'textures.exe' and tell me if you see a texture please.


col(Posted 2014) [#152]
With PIX you can...

Single step through each dx9 api call.
Record a number of frames and look back at every single dx9 call of every frame.
Easily click on the data parameters of the api calls to view the data either in numerical form or in the case of textures etc you can view it visually.
Zoom in on part rendered buffers / textures and examine individual pixel data values
Examine at any time and in detail all matrices, textures, geometry data, depth buffer, render buffers, render states, vertex buffers, index buffers etc pretty much every resource that youre using.
You can view any geometry in wireframe during any step of the rendering process - this is great to examine when single stepping, if a matrix value is slightly out or a index vertex buffer layout is slightly off which can screw the geometry then you can see exactly what call and parameters are messing up.
You can even single step through shader assembly instructions while viewing the shader registers and outputs.
You can also assign user data names to the resources and they will show up in PIX so you can relate your c/++ api calls to the actual calls happening in the gpu.

Plus tons more.

Once you've used it you'll forever wonder how you got by without it :)
Bug hunting is really easy and it allows you to do some advanced stuff while getting plenty of information of what is going on inside the gpu.


GaryV(Posted 2014) [#153]
Ploppy: I have not followed this thread for some time. I have the exact same issues as Yue. XP SP2 as the OS. GPU is more than capable of handling DX9.


Rick Nasher(Posted 2014) [#154]
Hehehe, I recognize a hint when I see one.. :-)


Ploppy(Posted 2014) [#155]
Yue/GaryV
Hi there, please try textures.exe, and let me know if you see a texture...

Yue texture test


Ploppy(Posted 2014) [#156]
New version out,
This new version may actually work with textures, Yue/GaryV please test out.

Otherwize, a few additions/corrections have been made.

Texture flag 4 (zero masking) now works for loaded textures
dxEntityBlend works fully now for blend 1,2 and 3...!
Corrected dxText that didn't render if no other object was in display
Corrected rotation for camera that wasn't working when parented to a rotating entity
Corrected erratic sprite movement

That's all for now, people...


Zip file version


Yue(Posted 2014) [#157]
Ok I downloaded the file and this Yue.zip looks.
Blitz3D examples but not function.




Ploppy(Posted 2014) [#158]
Ok guys, new test out. I really need to get this found, please help...

Yue texture test


GaryV(Posted 2014) [#159]
Ok guys, new test out. I really need to get this found, please help...

Yue texture test


Just a white cube for me.


Ploppy(Posted 2014) [#160]
Thanks for your very fast response. Okay, I have modified once again, please try this one...

Yue texture test


Yue(Posted 2014) [#161]
here:



Ploppy(Posted 2014) [#162]
New test...

Yue texture test


Ploppy(Posted 2014) [#163]
New test...

Yue texture test


Steve Elliott(Posted 2014) [#164]
@Yue, you might want to really reduce the size of your screen shots...maybe use "image links" instead, because these threads are long without scrolling through huge images too.

http://www.blitzbasic.com/faq/faq_entry.php?id=2


Ploppy(Posted 2014) [#165]
I know what you mean Steve, as soon as I get this texture problem sorted out (which I intend to work on principally today and hopefully solve it), I will start a new thread in the forum. This one is beginning to be too long....


Ploppy(Posted 2014) [#166]
Here a little list of all functions currently available on hardwired, with a note on each functions current state....

Command list


Steve Elliott(Posted 2014) [#167]
Good luck with bug hunting :)


Ploppy(Posted 2014) [#168]
Still waiting for Yue/GaryV...


GaryV(Posted 2014) [#169]

Ploppy (Posted 11 hours ago) #163
New test...

Yue texture test


We have textures!


Ploppy(Posted 2014) [#170]
Yes, yes, yes!!! If I had hardwired t-shirts, I'd definatly send one to each of you for your help. But I don't, so- thanks very much :D

Yue, please confirm that it works for you.

So, now I have some positive, I have to rebuild bit by bit the renderer so that it fully works, without bringing back the texture problem. I haven't exactly found why it bugged, but I know in what area of my code the bug is. So I'm bringing back my code little by little to see if the texture problem comes back or not.

I have therefore release a new texture test. Please try out and tell me if textures are there or not...

If you haven't yet subscribed to this thread (bottom of this page to subscribe), and you have the free time, we can get this done in a few hours and then move on.

Thanks again

New texture test


GaryV(Posted 2014) [#171]
I am on my way out of town for business. Will give a test when I get back. Thank you for all of your hard work on tracking down the issue and fixing it. You da man!


RemiD(Posted 2014) [#172]
Ploppy>>I have tested your 2 latest demos with the texture and it seems to render properly on my computer.
However i have seen weird artifacts in the demo maze (i was sometimes able to see through some walls...)


Ploppy(Posted 2014) [#173]
Cheers GaryV, much obliged..

Hi RemiD, this is nothing do to with my userlib, this is just a result of my lazy quick programming for the test bb - nothing more. I am aware of the clipping 'bug', but couldn't be bothered to make it better. If you look into the bb code, you will notice that if it detects that the camera has moved to a new 'square' whether in x-space or z-space, it will check if there is a wall there. If there is a wall, it will back-track the camera to it's previous position. There is no collision detection here, just wall checking basically. If the camera is back-tracked too close to a wall, or 'on' the wall itself (at an integer), the camera's near clipping will remove that wall, because it's distance is closer.


Yue(Posted 2014) [#174]
:) I see textures in nature, the texture is of the earth.!!


Ploppy(Posted 2014) [#175]
Okay, thanks Yue.

Please try this one, I'm bringing back more...

Please let me know if all is ok...

New texture test


Yue(Posted 2014) [#176]
Something happened, I do not see the texture, just the white cube rotating ...


Ploppy(Posted 2014) [#177]
Ok, new test...

New texture test


Yue(Posted 2014) [#178]
No, here not load texture, onlye cube white.


Ploppy(Posted 2014) [#179]
And now??
New texture test


Yue(Posted 2014) [#180]
Sorry not loadtextures, only cube color white.


Ploppy(Posted 2014) [#181]
New one again...
New texture test


Yue(Posted 2014) [#182]
negative, only the white cube.


Ploppy(Posted 2014) [#183]
Okay, I will try again tomorrow...

I don't understand this... but I will...


Rick Nasher(Posted 2014) [#184]
First of all: thanks for the pretty huge command list. As you can see I still have plenty of textures no mater what you change. :-)

Second: Something I've noticed, while re-programming the Simplanetary thingy I once made: entities appear to be upside down:


Thought it was my code putting textures upside down, but then I checked the Maze.bb and what did I see?

Thought we were supposed to burry our dwarfs feet first, not oops upside their heads.. ;-)

BTW: I thought the dxCreateTorus command would be great for adding an asteroid belt or disk around Saturn, but doesn't it allow for textures (yet)?


Yue(Posted 2014) [#185]
I am suffering with it not loading the textures.




Hotshot2005(Posted 2014) [#186]
I have checked your texture on my Laptop and it work Great!


Yue(Posted 2014) [#187]



Ploppy(Posted 2014) [#188]
lol :D

Rick, to turn the dwarves the right way around remove the line

dxRotateMesh dwarf,180,0,0

...from the bb code. I had adready changed the userlib from showing meshes the wrong way around to the right way up - the fault is now in the bb code. As for upside-down textures, I'll look into that...


Ploppy(Posted 2014) [#189]
Hi Yue, new test out, please try...

New texture test


Ploppy(Posted 2014) [#190]
NOTE TO EVERYONE BUT Yue/GaryV/Anyone having problems with textures...

I have decided to dedicate the rest of this thread to solving this texture problem that some are experiencing. When I have overcome this problem, I will create a new thread (this one becoming very very long). So if you see new posts on this thread, it will only concern the texture bug and nothing else.


N_Gnom(Posted 2014) [#191]
wich release should we test to solve the texture problem?

and maybe you should open now a new thread for the further development.


Ploppy(Posted 2014) [#192]
Hi N_Gnom, these tests are really only for the ones that have already experienced problems showing textures on their machines. It will show textures if my texturetest routine works, for it has a modified version of my renderer. However for people that aleady get textures with my dll, they will obviously see no difference.

Once I find out where in my renderer there is a compatibility problem, I will be able to correct and release a new version to work equally as good on all machines.

As for the new thread, I am working on other things that just the texture problem but am not releasing this for the moment as I would like to have a stable renderer before putting everything back together, so to speak. So, at least for the moment, no new thread. Once we get this texture thing out of the way, we can move onto other things...


N_Gnom(Posted 2014) [#193]
Okay i understand.
Can you change to deffered rendering/lightning?
So there are more than 8 lights possible.

btw:i write you an email but some days after i send that i received a message that you mail not exists....confused mail...contact me please mail: info at nuclear-forum dot de


Yue(Posted 2014) [#194]
Hi, new test, no loading textures, only cube color white.


N_Gnom(Posted 2014) [#195]
Yue, can you upload a compiled exe with your last sample?
Haven´t installed bb3d atm. So i can give you a feedback if textures here loaded correctly.


Yue(Posted 2014) [#196]
Ok one moment please. Problem XP.


Yue(Posted 2014) [#197]
Here Download Exe. https://dl.dropboxusercontent.com/u/39767349/Exe.rar


Hotshot2005(Posted 2014) [#198]
have you really update your graphics card?


Hotshot2005(Posted 2014) [#199]
YUE,

The links you gave me and it work fine no problem :)

Mine is

2GHZ
4GB Ram
ATI 5870

:)


Yue(Posted 2014) [#200]
Hostshot2005, you work on XP??


N_Gnom(Posted 2014) [#201]
Here too.Textured cube.Win7...no XP(its really outdated)


Yue(Posted 2014) [#202]
You are work on windows XP N_Gnom?


Hotshot2005(Posted 2014) [#203]
Mine is Window 7 :)


N_Gnom(Posted 2014) [#204]
@Yue: NO.Her is all okay with textured cube.Maybe you should change to win7.
Or its a driver issue with you graphic card.I use Win7.


Yue(Posted 2014) [#205]
my graphics card 9800gtx nvidia 1 giga, last drivers... GaryV too problem textures


N_Gnom(Posted 2014) [#206]
Post 169 GaryV have textures!


Ploppy(Posted 2014) [#207]
Okay, new test out, please tell me some good news... :)

New texture test


Ploppy(Posted 2014) [#208]
Guys, I really do not think the problem resides with XP or Yue's machine. He has demonstrated this by successfully getting a texture from the microsoft tutorial demo (post#157). I have a copy of the source for this tutorial (available in DirectX SDK), it has almost the same construction as my now simplified texture test renderer. This code and my dll were compiled using my c++ compiler. So for me, the problem is in my code somewhere, not Yue's machine. I just have to find out what it is (and it's probably staring me right in the face too, always the way things are).

N_Gnom, in answer to your question, yes why not do a deferred lighting integration. But I have a lot to add to my engine so we will see in time. This is becoming a big project - I am getting closer and closer to getting level with B3D's capabilities. Then I will continue with the new techniques to boost up my dll even further and give people so much more power. But this will take me time and research, but like I said - why not??


N_Gnom(Posted 2014) [#209]
@ploppy...sounds very good....
(btw.: why do you not make a dx11 engine?win7 have the most users atm....and in a few years dx9 is dead...i say that only because i code in dx11 to support in future.or opengl, something its easier to handle with it)


Yue(Posted 2014) [#210]
@N_Gnom You talk talk seriously?, DirectX 7 still remains alive in windows 8 functions directX 7, 8 and 9 are used, Blitz3D and still runs great.

Ok one moment i am test new zip.


Yue(Posted 2014) [#211]
No, here no loading textures, only cube color white.




N_Gnom(Posted 2014) [#212]
@Yue: but dx7,8 are not really supported....emulated maybe.
Dx9 runs fine...but anytime it ends and when this time comes the developer must change to dx11 or opengl(or dx12/13/14 whatever)
I only would say that it could be good to have a platform wich live a long time.
On April 8th 2014 ends the support for your windows xp...did you understand why i´m think so?


Steve Elliott(Posted 2014) [#213]

why do you not make a dx11 engine?



Because dx9 works really well on most systems, dx11 is shader-based, which means that the required hardware to run it increases quite significantly. Not good if you're trying to sell your game to a wide audience.


Yue(Posted 2014) [#214]
http://blitzbasic.com/Community/post.php?topic=99477&post=1202630


An application in that it does not receive support does not imply that this disused, is that reached its maximum in stability, in this case is the DirectX11 is it reslutado many previous versions these graphics function calls. In this case a Windows 8 Windows 95 evolved.

What I mean is that no matter directX use Blitz3D, it is important that is focused on the masses of people who are not programmers (myself included), and the goal is that we are not scheduled if not rather video game designers .

In this case the work you do is great for Blitz3D Floppy, Windows eight is optimized for DirectX 9. And by testing, Blitz3D works correctly in Windows 8.


N_Gnom(Posted 2014) [#215]
Well my graphiccard is a noname card.cost 40 euros.DX11 based and so i think its no problem for the most user.I think the most user have more hardware features as they use.And if they have win8 dx11 is included and the hardware should work with it correctly.
What i mean is...what is in a few years...?

btw.: I don´t talk about bb3d because ploppy´s engine works with other languages too.
And what if anybody posts a thread for a new dx11 engine like bb3d?

Well i think ploppy make a great job.
And now back to topic....


GaryV(Posted 2014) [#216]
Ploppy (Posted 1 hour ago) #207
Okay, new test out, please tell me some good news... :)

New texture test
Back to a white box


GaryV(Posted 2014) [#217]
Guys, I really do not think the problem resides with XP or Yue's machine. He has demonstrated this by successfully getting a texture from the microsoft tutorial demo (post#157). I have a copy of the source for this tutorial (available in DirectX SDK), it has almost the same construction as my now simplified texture test renderer. This code and my dll were compiled using my c++ compiler. So for me, the problem is in my code somewhere, not Yue's machine. I just have to find out what it is (and it's probably staring me right in the face too, always the way things are).
Given Yue's posts in general and his skill level, I was personally ready to declare this issue 100% user error, but I had the same issue. So, it is not just Yue having the problem. Although I do NOT think the issues Yue and I have are the same.


Wolf1870(Posted 2014) [#218]
Ploppy if you have time: if I put the following in your program test10: tex = dxLoadTexture ("images \ dwarf.jpg", 4) > Texture flag 4 (zero masking from your last update) < the mesh is no longer displayed correctly. Can you please take a look...


Rick Nasher(Posted 2014) [#219]
@N_Gnom: If you read back in the threads(2 and 1) you'll find the answer:
Ploppy will do DX9 (+ additions to the normal command set) first for free to create a userbase, to secure Blitz3D's future and (re)gain interest by a wider audience, which makes sense(is happening already).

Then, when finished, he'll do built on this a DX11 version, with even more whistles and bells, which I believe and think he will and should charge for(he deserves it). You can bet a lot of people are willing to pay for that. I know I would.

But now let's focus on what Ploppy requested and for the moment stick to the texture issue for the rest of this thread(really getting big indeed).


Ploppy(Posted 2014) [#220]
Oh yes Wolf, I see what you mean. Ooops, I'll sort that out...

About that Dx9/Dx11 thing, I have started a little coding in dx11 already, but I haven't enabled it yet in my userlib. I wish to complete the dx9 version before going any further. Dx9 is the base with which I wish to begin - it is the version most used and available on all pc systems. Dx11 is not usable on Xp machines, so this is why I will want incorporate it into my userlib WITH the dx9 version. That way, if the dll detects you're using an operating system that doesn't support dx11, it will simply switch to dx9. Xp may be old but there are still a lot of pc's running it. The computer I use at work, for example, uses XP. And it works fine, it may be old but runs fast and is stable. I prefer it much more than Vista, which was just awful. I have Win7 at home, which works fine for me.

I know that for blitz a dx9 userlib is long overdue, and once released will in some respects be out of date already. But one step at a time, I think. We have already waited long enough for a dx9 version of blitz, and now that it may be coming, lets take it step by step. If I manage to get this done, a dx11 version will be easier and quicker for me to release, because I will use the same code structure as for the dx9 code already written, but will make calls to the dx11 functions instead of the dx9 ones, making conversions between variables when necessary.


Xilvan(Posted 2014) [#221]
Oh ! It is
compatible
with .x.

All that I need is
a .x exporter.

Maybe I'll try
it soon !

Friendly,


GaryV(Posted 2014) [#222]
You did have it working for me, but as noted above, it s broken again.


Ploppy(Posted 2014) [#223]
Yep, I know, and the worst thing is I forgot to note down my code when it had gone right. Sorry.. I messed up there, so I'm being more careful and less hasteful with my bug hunting this time...

Xylvain, you can already save in .x format, but not with anims for the moment...


Ian Thompson(Posted 2014) [#224]
Nice work Ploppy.

Probably a little to late in the game to request this but if this was using OpenGL it could have the possibility of going multi platform and multi-language.

Well done, none-the-less! :)


Yue(Posted 2014) [#225]
It can not be, as you have lost the code where did it display the texture ... : S




Ploppy(Posted 2014) [#226]
Well, I haven't lost the compiled exe, I still have it, but not the source. Anyway, I don't know if you had the same luck as GaryV with that....

Anyway, here is a new one for you to test mi amigo...

New texture test


Yue(Posted 2014) [#227]
:( only cube color white.


GaryV(Posted 2014) [#228]
White cube for me, too


Ploppy(Posted 2014) [#229]
Another new texture test for Yue - good luck


GaryV(Posted 2014) [#230]
Absolutely beautiful stunning white cube in the new test


Ploppy(Posted 2014) [#231]
lol

Sorry, try again with this new one

Another new texture test for Yue - even more good luck


Yue(Posted 2014) [#232]
:(




Ploppy(Posted 2014) [#233]
Okay, I will try again tomorrow, I have an idea.

I really really do not want to give up on this, I just hope you both have the patience to stick with me. I really am trying to sort this out.

I will start a new thread, we will continue our adventure there, I think. This thread is just getting tooooo big....

See you tomorrow.