View Full Version : TBGL-3d-Editor [Announcement]
ReneMiner
12-04-2013, 18:25
Already early Beta-Stage and not far from release - await my 3d-Editor for TBGL.
some snoop-in preview here now
thinBasic source minversion 1.9.6.0 because uses latest features
Minimal OS WinXP SP2, large Screen recommended - should be at least 1024*768
This is property of thinBasic-community now. Personal use or use for free thinBasic-Project ist explicitely allowed.
Commercial use is not allowed without permission and will only be given in exceptional cases.
See page 2 of this thread for conditions...
Charles Pegge
13-04-2013, 14:17
Hi ReneMiner,
Taking on a 3d editor, seems to me, a life-times work. I would not know where to begin. But I have some technology you might be interested in. It is a scrollable edit box, using only OpenGl. For the purposes of editing, all the characters have to be scalable pickable 3d objects. I think it would work well in the thinBasic environment, if this is your chosen platform.
ReneMiner
13-04-2013, 15:28
I'm happy about some mature reply here.
No- it's not a lifetimes work. To be honest, the "real" 3d-stuff currently makes just 60kB because - most of my written program-part is just the GUI ~300kB - but that's all done for users comfort and easy editing, of course there are a few includes, so I have one for Color-Palette, Tools, TBGL-Specifics, File I/O which is in part from a textures handler written by other people - biggest part is FreeImage.dll - so it's maybe 1 MB of mine. Of course not written in one day nor one month...
Yes, I like using TB, so this is my platform. Syntax is clear and easy to understand, it's still improving and alive - I've not found any better yet.
There might be other languages as C/+/++/# that are faster in execution speed - but I don't like all those brackets, commas, semicolons which makes it an unreadable book to me. So I am straight basic user since atari 800xl and I'm stuck to basic.
Now how do I have to imagine an "Edit-Box" - is it like some UI-Control/a window? Or some scene-manager or mesh-composer? what's its purpose?
Charles Pegge
13-04-2013, 16:03
It is part of a looong project to provide OxygenBaic with a platform-independent IDE, with few dependencies other than OpenGl, and something akin to FreeImage/GDI+ for image handling.
OxygenBasic is packaged as a module of ThinBasic, primarily to provide Assembly code and JIt compiler services for computational hot-spots. It can read Petr's TBGL headers and work cooperatively with TBGL.
I am currently testing a long-overdue update.
Petr Schreiber
14-04-2013, 16:02
As the thread as entered direction of personal attacks, I have unapproved the angry & offtopic posts.
Thanks Charles to for keeping on topic :)
Petr
ReneMiner
14-04-2013, 16:19
OK, here just for your pleasure - some test-version to celebrate the day.
Not the source-code though, but a working example - no fear there's nothing bad inside - I would never waste my time into this direction.
I will replace it later with full source code when I have some fast loading routine to use the data in thinBasic.
Currently it just saves to Txt-File which you can copy & paste into your thinBasic-(TBGL)-scripts, saves also to it's own format to work with, loads obj + m15 and saves obj. To save M15 you'll have to save as obj and use Petr's OBJ2M15-Converter (http://www.thinbasic.com/community/showthread.php?8585)
Terrain is undone so I took this part completely out - the GUI I intend to seperate since it's very common and can be used in a lot of other apps. So has it's own windows inside (independend from OS) and a lot of funny features at the controls also. Try out, let me know if something interests you or if strange stuff as crashes happens.
The Bugatti-mesh as in screen at first post is about 90MB so - not included. (anyway would be a violation of copyrights to ship this)
Edit: Attachemant removed. Refer to first post of this thread (http://www.thinbasic.com/community/showthread.php?12060-TBGL-3d-Editor-Announcement) to get the source code.
ErosOlmi
14-04-2013, 19:49
As the thread as entered direction of personal attacks, I have unapproved the angry & offtopic posts.
Thanks Charles to for keeping on topic :)
Petr
Thanks a lot Petr for moderating.
I was in bed for 2 days and I had no opportunity to act.
ErosOlmi
14-04-2013, 20:09
Rene,
your application is astonishing.
Eros
zlatkoAB
14-04-2013, 20:40
Good work Rene...
And don't listen anyone stupid observation :nicethread:
ReneMiner
15-04-2013, 12:02
I'm happy someone likes it. As long as it's incomplete I won't publish sourcecode here open in forum - it's no good example for the masses to study from some unfinished works.
But however- if anyone is interested - I won't keep it a secret, just send me a sign to get the code - I'll pump it over :download:
ReneMiner,
My AVG finds an unknown virus in TBGL3dEd_test.exe. I was hoping
to try your editor. Could you please confirm?
Thanks,
Bill
P.S. I tried again and my computer re-booted. BTW. It was the small
thinbasic.exe file after the breakout that AVG finds the unknown virus.
Anyway, this time it ran. I clicked on "File" and nothing happened, I could
not get it to run. I exited the program. Now I will not run again and will
not let me delete it. I put the program in its own directory; not in thinBasic.
Petr Schreiber
15-04-2013, 18:30
I tested the EXE file using ESET NOD32 and no problem was found.
I think antivirus could be confused by the Bundle nature of the EXE.
I will try using AVAST later this night.
Usually, when in doubt, I send the EXE file to support of my antivirus solution vendor. This way ESET for example stopped the false positive warnings for Oxygen module.
Petr
ErosOlmi
15-04-2013, 18:32
Hi Bill,
can you please indicate the exact virus name AVG reports? Any log?
We had similar problems in the past mainly due to the fact that all thinBasic executable and libraries are compressed using UPX.
Case by case I contacted directly the AV support center and all cases were false positive.
Thanks in advance.
Eros
ReneMiner
15-04-2013, 18:45
Really sorry if you have some trouble- but there can not be any virus inside. A few months ago I had troubles with free Avira & thinBasic too.
Other users of this forum - which I think have real good antivirus-software on their systems - did not have any troubles into this direction - and I think they would have posted here if so.
Edit:Now here it is. Still undone, but I won't keep any suspicions alive here, and I've nothing to hide.
It's almost the same (I added a little bit today at textboxes and commented a little bit for future readers - nothing else changed - ok, the console I disabled in the .exe but that's all what's different) - you might bundle it yourself to test.
This is property of thinBasic-community now. Personal use or use for free thinBasic-Project ist explicitely allowed.
Commercial use is not allowed without permission and will only be given in exceptional cases.,
means you have to bribe Eros with at least 100.000 € :D
Edit: Sorry, there's another bunch of cash needed for Petr who made TBGL, so make it 200.000 €
Attention: You need minimal Version 1.9.5.0 to run this from thinAir. It uses the latest features.
Check out first post of this thread for download
ErosOlmi
15-04-2013, 19:24
Rene,
your generosity to publish source of your project merit a dedicated post and not attached here at page ... whatever.
Better to rewrite the very first initial post in this thread and give great merit to your hard hard work.
All other posts should point to there.
ErosOlmi,
As I indicated in my initial reply, AVG showed "Unknown". No report.
No virus problem on the last attachment.
Bill
Rene,
I created a "Project" directory under thinBasic. Then "TBGL3dEd"
under it and unzipped last attachment into it. I ran the "MAIN" file,
and "No" to full screen. The program runs, but only shows files
with the TBGL3dEd extention when you try to load a file. But, it
does not load anything.
Bill
ReneMiner
15-04-2013, 19:45
What Windows? XP below SP2? Is impossible.
And- as already said- you need thinBaisc-Version 1.9.5.0
Edit: Attachement removed, refer to first post of this thread for latest version
Rene,
I am running 1.9.5.0. On an HP laptop, Windows 7 Home Premium, 64-bit.
BTW. What's the console window in the background showing processes
every time you hit a key?
I downloaded you update and updated mine. It still does not load anything.
Now, I have the "tbasic" extention default to thinBasic on my system. I had
double-clicked on MAIN to run it. Should I run it from within thinBasic?
Bill
ReneMiner
15-04-2013, 20:05
see above or first post for fixed version... I made some comment inside where not should be one- so the line got ignored :oops:
EDIT: I changed first post after posted this. So might be you were faster than I was and downloaded old version from first post...
Console is for Debug. It's still not done- You can disable it and go in MAIN, Sub MAIN_DrawFrame()
Comment lines 266 to 274 but 273 (sDebug ="" leave in to delete debug-messages from memory) - and remove Uses "Console" from top of script.
If you do this also comment line 94( Console_Free), otherwise you'll get a crash if you click cancel on the Fullscreen-Question)
Yes you should run in thinAir. If you experiance some bug you'll receive some message where/which line the code is wrong. I would be interested in line and done actions...
Petr Schreiber
15-04-2013, 20:34
Thanks a lot for sharing the code Rene!
I must admit your TBGL GUI is the most complex one I have seen so far in user (and heck, even mine!) TBGL projects. Job well done :)
Petr
P.S. As promised, I did a test using Avast antivirus. When launching the bundle, Avast rates the behavior as suspicious, although for unknown reason. Avast is developed in Prague, AVG in Brno, which is city where I live.
I will email both companies to explain the bundle behavior and avoid possible "scared user syndrome" in future.
EDIT Emails sent, awaiting reply from Avast/AVG
ReneMiner
15-04-2013, 20:43
Hi Petr,
currently I have more ambitions to create the GUI as independent one.
And wait until Eros has done some magic about the loading codelines from file - so the loading of data to TBGL-apps is really fast.
Maybe someone else has some functions ideas to integrate into the editor.
In the meantime I'll try to create the TBGL-GUI - but as you see in code - there's a problem with localization of keyboard (the program has a very german keyboard-layout. You can change that in the beginning of Unit INPUT to localize your keyboard. Maybe can be done by some ini-file later.
Also the GUI has to take care of reading in Mouse and Keyboard and a whole frame has to be done with same values... there are a few things to think about, but we can create something better than Windows 3.11 in any case ;)
Rene,
I just downloaded and installed your latest update. It now runs fine.
The zoom and panning are so smooth. Awesome. Oh, it ran both
ways for me; double-click MAIN, or execute via thinAir.
Bill
ReneMiner
15-04-2013, 21:14
I hope you like the automatic texturing feature - and my cute little textboxes (as coordinate-boxes) - they have a lot of features - just point a number with the mouse and turn the wheel...don't forget to try right-click them...
(but you've already read the help i guess)
Petr Schreiber
15-04-2013, 21:33
The program is really nice, and what I appreciate most - with documentation :)
Petr
ErosOlmi
15-04-2013, 21:54
I just counted the number of lines you wrote:
MAIN
511
SpecificColour.tBasicU
355
Specific3d.tBasicU
2031
SpecificTools.tBasicU
1768
SpecificTBGL.tBasicU
1554
SpecificFILE.tBasicU
1714
SpecificInput.tBasicU
689
Gadgets.tBasicU
7033
15655
What a f...:shock16:k
Gadgets merit to become a library.
ReneMiner
15-04-2013, 22:03
Yes, I thought about something like making the Gadget-Stuff a TBGL-AddOn - since it runs in TBGL-Window only - but not in Canvas-bound TBGL because OS interferes. So the colour-thing and input are Gadget-Stuff also a little bit. And of course it's a lot of Call_IfExists used so I have my own "events" - just not to call them "callbacks". But I think, Callbacks could, as I mentioned in some other thread, work the same easy way - all it needs is a constant-string-"array" built-into UI and some Tag-String to the Controls, so Callback works that way:
'...
Control Add Button ...
Control Set Tag hWnd, hCtrl, "mySpecialButton"
'...
Callback Function xxcb()
'static lX, lY as Long
'Control Get Loc CBHNDL, CBCTL to lX, lY
CallIf_Exists "Event_" + $sCBMSG(CBMSG) + "_" + $sCBCTLMSG(CBCTLMSG) + "_" + CONTROL(CBCTL).Tag _
(CBCTL[,mouseposX - lX, mouseposY - lY])
'and nothing else is needed in callback
End Function
' other Subs read than as this for example (Userdefined)
Sub Event_Command_ButtonClick_MySpecialButton(Byval CTRL_ID as Dword _
'[, maybe pass mousepos inside control also - saves lot of calculations later] _
)
'So can have 1 or 1000000 MySpecialButton-Controls
' we have CTRL_ID as an Index - so similar controls can have same .Tag and can be proceeded in same sub if desired
End Sub
Edit: maybe "Event_" could be replaced by Dialogs Tag... I forgot that UI has more than one window...
ReneMiner
16-04-2013, 02:17
@Billbo,
I had tonight (late evening) don't laugh - a hilarious problem- I still had Avira on my pc.
The windows 8-built-in pdf reader was not working any more from one day to another, so I contacted Microsoft-Support because I suspected one of their updates...Result was, Avira has messed some remote-procedure-dll or stuff and I had to reset/recover my system to shipping state... oh what a nightmare... all installations screwed! I have to download all the driver stuff, browser, jre, vlc and install again... Also thinBasic. So I installed this - about two hours ago...
Now guess what: the default-preinstalled Antivirus-Software shipped with this computer (Norton) instantly deleted thinBasic and a messagebox that informed me about:
"Norton has successful defeated an attempted attack and eliminated the virus"
...and my fresh installed thinBasic 1.9.5.0 was gone. And in a way that an uninstall was not possible while the re-install asked to uninstall first - and it still was in the installations list.
Next thing that was gone from my system was Norton and I have to live with "Windows Defender" now.
I got really nice night-fight nightmare tonight and still doing a re-installing marathon of all the software, re-arrange all my desktop-settings and also browser, explorer, graphics driver settings - just because some stupid anti-virus-software that screwed my system!
---
and for the new readers: download attached to first post of this thread (http://www.thinbasic.com/community/showthread.php?12060-TBGL-3d-Editor-Announcement)
zlatkoAB
16-04-2013, 07:45
Rene
Try use KinsoftAnttivirus and you will neve not such a stupid and very annoying problems.
Rene,
No, I didn't laugh, and it's hardly "a hilarious problem."
I started out in '77 with a National Semiconductor Scamp 4-bit processor,
256 bytes memory, assembly ROM (I had to program in hex code), a
diode-matrix keyboard, TV typewriter, and a modified 5" portable BW TV.
Out of the countless computers I've had since then, I haven't had to
restore one until last year. The laptop was 2 years old, so you can imagine
what I lost. My problem had been a virus. The only advantage was getting
all that disk space back.
I'm sorry you have to go through all this trouble. Before you get to far,
have you made sure the "windows 8-built-in pdf reader" is working right?
Good luck.
Bill
ReneMiner
16-04-2013, 17:25
Now it's working again, displays pdf as supposed to. But looking back I'd just download Adobe pdf-Reader the next time before following any MS-support-instructions again... :fool:
Back to topic:
Anyone ideas of functions to integrate? Does anyone like to create ini-file-stuff? That's so boring, I don't like to...
ReneMiner
16-04-2013, 21:33
I found some bug because of Typos...
to fix yourself check SpecificTools.tBasicU
in two subs
Sub TOOLS_ActionFace()
Sub TOOLS_ActionTile()
is a line
lThisG = Group(Group_ACTIVE)
This is wrong - after building in the Tabulate-setting I didn't test the other way of the functions
both have to be
lThisG = Group_ACTIVE
find this near lines 578 & 718 (line numbers can differ a little)
Edit: Already fixed in download since April 17th
ReneMiner
17-04-2013, 12:20
I uploaded new version.
(This is same attachement as on first post)
fixed the bug (see above) and added save to M15-Format.
Console disabled - but can easily be enabled in MAIN-Unit again.
A hook to this: Currently M15 only supports BMP/DIB and uncompressed TGA-files as a texture. Also material-data will get lost - but now can save vertex-colors (OBJ does not support these) and have a use of them vertex-colors also now. You have to take care what textures you use for yourself - maybe M15 will support other texture-formats in the future, so I won't limit this here and now. You always can exchange them with some texteditor inside M15-file.
There might be some confusion because of the starting image- it has some transparent texture - if you draw something either start new image first or add a group with another texture - otherwise your first drawn triangle is transparent...
Edit: Attachement removed - refer to first post for latest version
ReneMiner
19-04-2013, 19:18
It'll take a little time until I make a new upload - I've still a few things in mind. But I have no hurry with that.
Let's take a break before we raise the bar again.
Until then - the current file has to serve as a Beta -I think there's already some stuff within that shows that thinBasic is not a-work-in-progress interpreter but one that already offers a whole lot of things you won't believe on the first sight and still improves and is alive. All living things are growing - mostly. Sometimes just in wisdom because we have to stress our brains to find new solutions while resources are limited.
And I'm happy about not knowing how the tb-sources look like. And I think not Eros is just making this to satisfy my feature-requests - Petr has to struggle too ;)
-just kidding - I think it all get's done when someone is in the mood to or has fun doing it. Otherwise the results would not be of interest to anybody.
I'm straight Basic-user for all my life. OK, I tried stuff as java and c+#*whatever... this is not for my brains. I need clear, readable code and overview to get my thoughts realized.
I'm not up to publish some full feature-list before it's all done anyway. There are no hidden features - all is documented within the help.
The code is open - all plain thinBasic-code for everyone to check out how-to. I did my best to keep it as readable as plain text, so in 5 or 10 years I'll still be able to read it and understand what it does. It's supposed to be some tool to users who intend to create stuff for TBGL in an easy way to get 3d-stuff drawn and arranged for whatever they want to write in thinBasic+TBGL. So they have to get familiar with the stuff anyway.
And I get the tool I need for my next project. And there's some "garbage left-over" already grown that's almost better than the intentional purpose of the program was - ok, the Gadget-stuff is not at beginner-level. But I made it that way because I wanted it to be nice for me and to try out new things. If you like it too- fine.
If there are any questions as "How do I...?" - just ask them here - I guess these wonderful forum-thingamagickies are made for that purpose.
ErosOlmi
20-04-2013, 13:03
Here you can find the places where all NOT work-in-progress software lie:
https://www.google.it/search?hl=it&q=cemetery&bav=on.2,or.r_cp.r_qf.&bvm=bv.45512109,d.ZWU&biw=1918&bih=1019&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=J3VyUeHQJMaVtAbarIGgCA#um=1&hl=it&tbm=isch&sa=1&q=cemetery+&oq=cemetery+&gs_l=img.3..0l5j0i24l5.78999.80926.6.81251.5.5.0.0.0.0.112.495.3j2.5.0...0.0...1c.1.9.img.pmOHZlw_W4E&bav=on.2,or.r_cp.r_qf.&bvm=bv.45512109,d.Yms&fp=2b5f48d61f20175&biw=1918&bih=1019
ReneMiner
20-04-2013, 14:58
I think too- a (programming) language is living through the people who use it. And since always new inventions are made there are always new words and phrases needed. Otherwise the language is in an unchangeble state as seen in Eros' link to all those backup-libraries (see post above) or as latin.
I did a few small changes to clipboard, so now you can use CTRL+A to select all at once - without need to use the selection-tool.
And also some more functionality for placing clips. Now can jump to corners of displayed clips too so you can place them very precise now.
I think that's very essential and makes a new upload reasonable. Watch it: If you jump to corners of the clip - the move-clip-with-pointer-setting (F3) will be toggled off -
else that jump to corner of clip would not work :)
Still on my list is some way to fast-load data later to TBGL - and also to load 3d-data by clicking in windows-explorer but first that bug (http://www.thinbasic.com/community/project.php?issueid=396) has to be fixed to get it working.
So to keep you supplied with the latest changes and to make sure this is not considered a death project...
Edit: Attachement removed - refer to first post of this thread for the latest version
Petr Schreiber
20-04-2013, 16:36
Hi Rene,
thanks for the update :) I think your application is good candidate for placing into Application (http://www.thinbasic.com/community/forumdisplay.php?382-Applications) forum.
Petr
ReneMiner
20-04-2013, 17:00
I'll consider this when it's done, sure.
In current stage - there are still a few things (see above) to do - I won't call it some finished program ready to put in a showcase.
And - for the interested audience (3d-game-modding) that looks for some way how to get 3d-game-graphics as from Morrowind, Oblivion, Skyrim, FallOut3, Freedome Force, Civilization 4 and all the others that use Gamebryo/NetImmerseFormat into this TBGL-Editor and back to the game, you'll need NifSkope (http://sourceforge.net/projects/niftools/files/nifskope/1.1.3/nifskope-1.1.3.36ebfdd-windows.exe/download) in addition to this.
Petr Schreiber
21-04-2013, 13:48
Hi Rene,
I was thinking about the file format. The best way to me seems to create small dedicated module for each format. I offer my help, once we have clear idea what is needed.
In case the number of model features in your program is complete, this could be done quite fast. I would then let the source code available, so it could be finetuned in future. I am tempted to use the new thinCORE OOP ability for some project, this could be it.
Petr
ReneMiner
21-04-2013, 15:13
I think obj-format is very common - but has no vertex-color-support - m15 has a lot of already present features to TBGL - but no materials and limited texture-formats and the file-format I used in this editor is some pure editor-format - not for fast graphics but to calculate a lot with related vertices/faces etc. Keep selected faces in mind, camera+pointer-position- so this is just editor-format to work with.
If a model is done - it should be stored to some format that can get loaded as fast as possible to appear on screen. It might use up some more time - when the model gets written from editor to file and that's ok to arrange it all optimized once. Important is the later use.
So the raw gl-list in order would be the fastest way from that point. To avoid any "if/select Case etc." while loading the "header" should start with a vertex-format-information so the loader has to decide just once how to use the data. If no Texels- no texture to await, if VertexColors no Materialcolor to apply etc. Maybe can make some switch to call the loader in a way that it will calculate missing normals if desired. (this editor always supplies normals, but maybe someone else makes another)
And to make this even faster, the file-extension should hold the vertex-format-information, there are only a few possiblities of combinations, a position has every vertex. There can be also normal, texels and colors - and that's about it. Vertex-Weights or -friction we don't have (yet) - but if there will be someday its easier to create new loading-routines instead of branching the existing apart.
The groups (or layers as m15) should be done in order and not by any index. Like one would write a displaylist.
I had already the idea to load displaylist-data in a way that read lines from a file immediately get processed as if they were codelines so there's no more if and sorting/CVx() and stuff needed - Eros says that might be possible, but he has to think about it.
Faster I think will only be loading binary data block directly to entity - in a displaylist-order - but already creating necessary sub-entities from all following groups (return parent-entity of course) - so needs some common order to pass the data for Material/Texture/Appearance/Vertexdata - let's call that "Layers" again - or "Groups" or Sub-Entity. Appearance means like "%GL_Triangles", "%GL_TriangleStrip" etc.
It could work the state-keeping way as displaylist and openGl in general, so pass once a normal or color instead of passing normal, color, texel before each position - but that would need some trailing word to each line as "TBGL_Vertex...", "TBGL_Normal..." and to parse these lines according to trailer - on the other hand can also be a trailer as "TBGL_NewLayer" so the loader "knows" - the current list ends and a new layers list starts here and the next entity is needed to be prepared and data that follows apllies to the next entity (which will always be a child of the very first one). So this kind of Entity (or better Super-Entity as you would call it in java) is only statics or parts that can get attached to bones later.
Also (in thinking of the future) there should be a reserved layer for collision-shapes (has no "visible" faces in Entity, consists of one shape. It's faces have Vertex-Position always and/or Normals only. Positions for simple Inside-Collision, + normals for face-collisions in the future. So we might think of storing Collision-Type, Layer-Center and -Radius too. Maybe the unused material-properties of the collision-layer can hold "global"-Entity-Information as Friction, Bounciness and Weight for simple physics
all my data to work with you'll find in the beginning of unit Specific3d.tBasicU,
the triangles just oversee - they're not necessary, only these
Dim Vec() As t_Vec3d : Dim nVecs As Long
Dim Nml() As t_Vec3d : Dim nNmls As Long
Dim Txl() As t_Texel : Dim nTxls As Long
Dim Col() As TBGL_TRGB : Dim nCols As Long
and partial these
Dim Group() As t_MeshGroup : Dim nGroups As Long
ReDim Group(1) : nGroups = 1 ' lower bound is 1...
partial because the current sessions values from t_MeshGroup are not needed in a mesh
Also think about- I used all Doubles because of calculating - so my types as t_Vec3d/t_Texel are wrong type because not Single-Floats
(the t_Object3dController was just some attempt to bundle all imaginable properties - but I think Entity-System already has all what's needed. I made it because I needed Double-Precise)
so I guess there is some enumeration of vertex-components (as Position(0) - always present, Normals(1), Texels(2), Colors(4)) needed - and a constant $sString-Table that holds the file-extensions for all combinations so "how/what to load" is already decided when the filename is chosen.
Another way would mean using some index-buffer which needs face-data in addition. Might need less memory-resources (does it really - doesn't have the screen to display the same amount of vertices with or without indexed vertices?) I like more the straight pass all in line instead of letting the computer jump from Index to Index - but however you create it, I think I'll get my data inside somehow :)
Edit: Two important things to add here - my script uses thinBasicgl.inc - two switches that I think can be packed into some TBGL-state (or even become Entity-Defaults) so the thinBasicGl.inc is not needed.
glEnable(%GL_CULL_FACE) ' stays enabled forever!
glCullFace(%GL_BACK)
'... and (decides in Function CreateUserEntity() -TBGL-Specific)
If VertexColorsPresent Then
glColorMaterial ( %GL_FRONT, %GL_AMBIENT_AND_DIFFUSE )
glEnable(%GL_COLOR_MATERIAL)
Endif
And btw. I use MATH-Module for one function only (ATAN2) - which could be asides the TBGL_EntityGetAngle- just integrated as TBGL_GetAngle...
One more Edit:
It might be an idea to create besides Light & Camera two additional special Entity-Types, as Terrain (wich does not need seperate collision-layer) and a "Water-Layer-Entity" which has no collision layer either - but has "fog" below surface - "Water" can also be like "Lava" or "Swamp", "Quicksand" etc. So "Water" is actually a box that has only faces on top. Should be possible to enable/disable/detect collision with top surface
ReneMiner
21-04-2013, 16:38
I found some bug (not a real one...but effect is, it does not "Save as..." TBGL3dEd-File if no fileextension is entered)
to fix check
Unit Gadgets.tBasicU
Sub TypeInTextbox()
around line 5104 you find
'...
Case %gFileSaveAs
GADGET_Collapse(Gadget(Index).Parent)
sFile = Gadget(%gExplorerInput).txt
sType = FILE_PathSplit(sFile, %PATH_EXT)
If LCase$(sType) = "obj" Or LCase$(sType) = "m15" Then
' fine...
ElseIf LCase$(sType) <> "tbgl3ded" Then
sFile += ".TBGL3dEd"
EndIf
'...
insert after ElseIf-Line this
sType ="TBGL3dEd"
so looks like this then:
Case %gFileSaveAs
GADGET_Collapse(Gadget(Index).Parent)
sFile = Gadget(%gExplorerInput).txt
sType = FILE_PathSplit(sFile, %PATH_EXT)
If LCase$(sType) = "obj" Or LCase$(sType) = "m15" Then
' fine...
ElseIf LCase$(sType) <> "tbgl3ded" Then
sType ="TBGL3dEd"
sFile += ".TBGL3dEd"
EndIf
I guess I messed that up when I added save to m15, because it was working before...
ReneMiner
22-04-2013, 13:31
V 1.03b out now - as usual download here or from first post (same attachement).
Latest Changes: fixed the bug above of course
new feature (replaces the never published terrain-editing for now and maybe forever): move vertices
How to:
CTRL + leftclick any vertex to activate it, point coordinate-boxes and use CTRL + mousewheel to move the vertex as desired.
new function
create mirror from any existing triangle(s) via Group dialog\rightclick members-list
(mentioning Terrain, @Petr - I edited two posts above to have it all in one here.)
Edit: Attachement removed, check out first post of this thread for latest version
ReneMiner
22-04-2013, 19:34
John,
my goal with this editor is to create a tool which enables me to create the next tool on top of this - let's call it the "THE BONER" - which is not - as someone might think, something dirty- but a tool that attaches the meshgroups that are cretead with this current tool to some bones which allow to create some animation. (I'm getting one by thinking of it :onthequiet: )
And why I use some interpreter? I don't care how it's called -interpreter, language or whatever - the important is: it does what I want it to do and I think it's made to use it.
...it almost does -ok, but since it's not a dead language it can grow to be much more - it has good roots and an incredible amount of possibilities - as you see- I did'nt invent something new: it was all in there already, you just got to call it.
I use tB since last year october, so... think about it. Can it be any easier? It's the perfect language for my kind of.
ReneMiner
22-04-2013, 20:00
Of course 3d!
to add some reason to this post: Here you'll find latest version (http://www.thinbasic.com/community/showthread.php?12060-TBGL-3d-Editor-Announcement)
Petr Schreiber
23-04-2013, 08:34
John,
I know you are manager, but you seem to try managing groups not falling under your command :D
We are human beings, we have brains, and we know why we are doing what we are doing. I understand our tools might not be what you would use, but I see no point stressing it each second post.
Petr
ReneMiner
23-04-2013, 09:52
Why should we? We all have some OS on our pc's. I don't think anybody here is up to create something that already exists - that would be boring - it's more about breaking down limits and finding new ways to realize the impossible.
And I'm not doing any "work" here. At first I do it because it's fun to me. And I am using the language - or "Interpreter" as you'd call it, because I'm not a developer - but a user that uses thinBasic, because all the other languages out there are way too complicated for such small brains as mine.
Did I do something wrong? Is forbidden to use built-in methods without asking before? Is tB only allowed to use for serious projects and not for fun nor to play with?
What I just ask myself: Why would anyone who is not interested in using 3d, TBGL nor in a "work-in-progress-interpreter" post into a thread which is about all that?
I discovered this morning that I obviously can do real magic! :wizard:
I went to bed last night with some itchy behind - and when I woke up I had a smelly stinking finger
Petr Schreiber
23-04-2013, 10:05
John, if your continuous notes about interpreted nature relate somehow to the need of large amount of data to be processed, it would be nice if you checked how program works first. You would see how elegantly Rene managed to handle this possible bottleneck by using display lists technology, which allows rendering at full speed by offloading the iterative workload to GPU.
It should not surprise you even the best compilers do not have enough horse power to perform such a task by brute force, because it would become very soon function call bound. This is why techniques such as vertex arrays or display lists evolved in 3D APIs.
3D graphics of today have a very little to do with raw performance of languages they are used from. It is all about data paralelism of the hardware it runs on.
Petr
ReneMiner
23-04-2013, 19:01
' Minimal Requirements:
' OS Windows XP SP2
' Graphics OpenGL-Hardware-Support
' 64 MB (higher recommended)
' 1024*768*16 (higher recommended)
' Mouse + Keyboard
' uses latest version:
#MINVERSION 1.9.5.0
Petr Schreiber
24-04-2013, 09:17
Hi John,
the minimal requirement for TBGL is OpenGL 1.1 implementation (does not matter if software or hardware).
There is code to use OpenGL 2.x and 3.x internally, but it is dynamically binded. When no support in hardware, TBGL falls back to safer implementation using older technique. It is adaptive.
Each release of TBGL is tested on Windows XP, Vista, 7 and now even the new Windows 8. There is no feature preventing it from being used on older OSes. My grandfather used it on PC with Windows 98, I used it long time on PC with Windows ME (which got upgraded to XP some years ago).
Petr
P.S. Pages of OxygenBASIC are blocked by ESET NOD32 antivirus as dangerous, I have contacted the support for more information about the issue
EDIT ESET confirmed it was false positive and next update will address this issue.
largo_winch
25-04-2013, 19:55
hi rene, where I can download latest version of your tbgl 3d editor? looks like interesting stuff and might be a lot of work. because that was very time intensive beside my job to create similar tbgl work I stopped last year with my creations ;)
second: john why are you not looking for another forum or place where you can nerve people or brown-nosed to user they are really creative and not bother or blame other people? Or have you ever written one example, only one project with thinbasic or tbgl? what's your sensefully task here at the board? to give links to a dead basic language you are supporting (scriptbasic)? in my school and university time there were a lot of place-hunter and it was always funny to see what happened to them all after ending their carreers in jobs or private with family.
bye, largo
ReneMiner
25-04-2013, 20:22
Hi Largo, I suggets refer to first post of this thread (http://www.thinbasic.com/community/showthread.php?12060-TBGL-3d-Editor-Announcement) to get latest (official) version of this Editor. There is not .exe available here - and the next update will take a while - sorry- but we all aren't magicians and have some other obligations also. But if you're really interested or want to participate somehow (might be "just" ideas) post here (or write PM).
Posting here any nonsense does not bother anybody as you see- so no fear- go ahead - all opinions are welcome because we learn to see the world with different eyes:aikido:- harrgh! Just ignore what you don't like...
and John, please do me some favour (who am I to demand that?)
Scroll all the page up, click on "BLOG (http://www.thinbasic.com/community/blog.php)" - there's enough space to type all in you want- and you can discuss anything there but please, please, please - try to keep on topic here and don't always ballyhoo for... you know...
largo_winch
25-04-2013, 22:01
info 1: http://www.thinbasic.com/community/showthread.php?11308-stencil-buffer-question/page2 (http://www.thinbasic.com/community/showthread.php?11308-stencil-buffer-question/page2)
rene, I would recommend to work with Dialog+TBGL combination :-) so you can drag and drop files (all data you can imagine) from one dialog to another. and I personal using sliders for different views, angles and much more. I didn't know why, but the loading times for your examples with primitives are high on my pc.
My idea was to create one dialog only with material previews, cannot find the example but I tried already with success it, using ImageList features. and you can pick up the primitives with an ID list and can move it over openGL scene and more. "simone" (a very good italian programmer) has did a very interesting example for that case and I followed this way for an expanded tbgl/gui example (see the link info2 ) more at a later moment if you like.
planets and gui ;)
info2: http://www.thinbasic.com/community/showthread.php?11130-planets-and-gui-questions
bye, largo
ReneMiner
26-04-2013, 12:47
Yes, loading-times might be a little longer when importing obj-files. Needs some time to sort and arrange data into the right place and also the way the data to work with is organized in memory it needs some time to build the display-lists from. Since it's not an action game but an editor that has no time pressure, I don't bother 1 or 5 seconds here. All shipped examples in .TBGL3dEd-Format (except the triceratops) are on screen at the moment I click them in filelist but also the triceratops needs less than a quarter second here.
Important seems to me that the data later work fast. If you read meshes above 5 MB - ok, it might display them- but the program is not intended to edit such big meshes. It's just supposed to edit mesh-groups which get attached to bones later with some other tool, to create small object as crates, furniture or to edit static interior meshes up to around 5000 faces which get build into scenes with some scene/world-editor later. So this program is only part 1 of the complete project.
Using "UI"? No - not for this project.
I don't like using callback-stuff and always to stumble across some hurdles which seem minor important on the first sight but detain me for hours from desired results. Callbacks need cumbersome ways to store other functions parameters because they're not valid in callback-function - so is like writing a script in two different languages to me. If I would like to use controls that behave as stupid as windows does and if it would be fun to me to deal with unforseen behaviour for countless hours just because windows-developers think it all has to work their ways, then I would use windows-controls probably.
Now, since I've written the gadgets once - I get working controls onto the screen in no time flat. Just have to add one field to my array, set it's properties - done. And the good thing about this is: If I need some control that does not exist yet - I just can create it exactly the way I need it.
So the "real" project hidden behind all this 3d is the Gadget-UI that now grows in background from the needs in different TBGL-situations/applications.
Just as a reminder - I use tB since october last year. Currently I'm still learning the basics which are Core & File-Module mostly. These have real great functions and methods that I don't know from any other language - and I still discover new ones which makes it interesting to use and try out. Sometimes they are entry-point to think different ways and awake weired new ideas. And I use TBGL-module of course - to be honest: TBGL is that easy and straightforward, Petr and his little helpers did a real great job here - and I probably never had tried out thinBasic without it.
I don't like the idea to move around, scale or rotate by scrolling some sliders - that's most indirect and cumbersome way and also scrollbars and sliders have an lower and upper limit. That does not fit for movement in endless worldspace. But probably there's no other possibility of movement when using windows-controls but I know I would not like always have to move the mouse over some slider before I can do the actual movement. If you wan't to move around by changing some control as you would do with sliders or scrollbars - use the textboxes in this program to their full functionality... point there with mouse - if you see some yellow background behind some numeral turn mousewheel... :D
Who needs sliders or scrollbars? that's so 1992...
ReneMiner
29-04-2013, 10:50
A new Version available now - but you'll need either thinBasic 1.9.5.0 + latest TBGL-Version (http://www.thinbasic.com/community/showthread.php?10909-The-latest-TBGL-version) or thinBasic 1.9.6.0 to run it. As usual you'll find the download here and also attached to the first post of this thread.
Latest changes:
Now it's possible to drag any model or texture-file from windows-explorer or desktop into the Editor-window, thanks to Petr for implementing this great feature :D
If you drag in a TBGL3dEd-Model, it will be added at 3d-Pointer-Position to the current mesh.
If you drag in a texture-file, it will get applied to the active group. The fastest way to activate a group is to position the pointer close to some member (triangle) and hit F1 - wich will activate this triangle + it's group.
If you drag in texture-files that are not saved to \Textures-Subfolder, the program will write a copy of the texture-file in own format to \Textures-path to have them available on next sessions load. So this version also "introduces" a new textures-format which I'm gonna use in further apps also...
There's no more option to run fullscreen on start now, because of the new DragIn-functions.
If you create bundle from this with tB 1.9.6.0 , you will be capable of loading associated files as .TBGL3dEd, .Obj or .M15 just righclick them, choose "Open with..." - and select the .exe you've just created to open them.
Snap-To-Grain now stays enabled, even if you jump to some position that does not meet the desired granularity. See a small symbol in up-right corner of top-menubar if Snap-To-Grain is enabled (still F12 to Enable/Disable - or rightclick coordinate-boxes)
Petr,
Rene links to your "latest TBGL version." I go there and the topic is
dated back in 2010. I downloaded the zip file. The files inside the zip
are dated 04/29/2013. Is this correct, and, in fact, is this the latest
version?
P.S. I read the dll and the version is 1.9.6.0. So it must be the latest.
I hope so, because I copied the files to my 1.9.5.0. As below, where's
1.9.6.0?
Rene,
You're doing great!! Where's 1.9.6.0?
Bill
ReneMiner
29-04-2013, 20:10
the link is to the first post where the latest TBGL-Version always gets posted- so this is actual version- to get inofficial 1.9.6.0 you need to check post before last in this (http://www.thinbasic.com/community/project.php?issueid=395) or this (http://www.thinbasic.com/community/project.php?issueid=396) support-thread- but I think Eros will update soon. For run in thinAir the latest TBGL-Version will serve
ReneMiner
04-05-2013, 19:03
After having a few beer I need to push this up :drink:
Why is this not finished yet? As Billbo says - it still loads too slow final data to display-list. Not for this progam itself- this won't get faster as it is I fear...even if there'll be some way to load faster- I'll have to sort the data to work with somehow...
The way I use it currently is just "Save to text" - so data is written & can be copied & pasted to script which is very fast- only thing is to parse the lines to classify if TBGL_Vertex, TBGL_Texcoord2d or whatever - I only wait for some possibility to load complete data from HD to GPU - and however it is done: I'll get the data in there somehow - this program is not an action-game and intended to sort and arrange data in advance for later use anyway...
I fear, there are only two people out there in the whole wide world who can do something about that :cray:
Ah, Thanks !!
seems you put a lot of hours into it , appreciated !
I'll try it out this evening , MeshLab can export to OBJ
vielen Dank Rob
Hi,
What happened with the pages of this topic. Some have changed,
like page 6, and some are missing, like pages 7 and 8?
Bill
ReneMiner
23-03-2014, 22:54
some user removed a lot of his posts - i can not tell his name because he's on my ignore-list now - but I also removed any of my responses to him since they were off-topic...
and a few posts were "moderated away" by Petr long time ago already.
So not to post here without any use, nosy people that have not seen it yet might check out my terrain-editor (http://www.thinbasic.com/community/showthread.php?12071-Terrain-Texturing/page4) which i uploaded once again today.
Not a new version - so a few users might know it already and can skip the 130 MB-download :download: