GLBasic forum

Main forum => GLBasic - en => Topic started by: L.D.M.T. on 2012-Jul-04

Title: World Editor "Modex"
Post by: L.D.M.T. on 2012-Jul-04
I am the author of the editor of the worlds whom I wrote on blitz3d. now I try to write the loader for glbasic,
but there were many problems... I will begin with that the development environment - mistakes very strongly is buggy so many that I wouldn't like at all from here to write, because I think the author and itself about them knows :-)
further there were problems of other plan - there is no similar team as in blitz3d - "scaletexture"
there is no team of rotation of a texture - "rotatetexture"
there is no team of range of distribution of a light source - "lightrange"
well and still there are a lot of small and irritating mistakes :(

http://myblitz3d.narod.ru/modex.html
Title: Re: World Editor "Modex"
Post by: kanonet on 2012-Jul-04
In some cases GLB uses a different approach than Blitz, so porting code 1:1 maybe is not the best idea all the time, a redesign may be the better idea, anyway most of what you asked can be done, but it may be not perfect (like beeing slow etc).

Quotefurther there were problems of other plan - there is no similar team as in blitz3d - "scaletexture"
there is no team of rotation of a texture - "rotatetexture"
Textures are normal sprites, so you can use them like all sprites and manipulate them. So if you want to stretch or rotate a texture i would suggest to use CREATESCREEN. But if you want to do it many times every loop it may be slow.

Quotethere is no team of range of distribution of a light source - "lightrange"
Yeah but it can be done with Inline and native OpenGL calls. If you know how to use them, look for Attenuation.
Title: Re: World Editor "Modex"
Post by: L.D.M.T. on 2012-Jul-05
language very perspective and quite good, but it needs completion.
glBASIC - the name speaks for itself, that is it should be as
it is simple as well as any other BASIC! but isn't present - here I faced such problems,
what wasn't when studying QBasic, PureBasic, Blitz3d...
it is visible that language still "crude" - many mistakes and up to the end it is not thought over.

here the source code with an example is everything that to me managed to achieve at present :(

http://myblitz3d.narod.ru/glmodex.zip
Title: Re: World Editor "Modex"
Post by: Albert on 2012-Jul-05
Oh I like this stuff!
I'm added a shadow to it.

Download modified project from the attachment

(https://dl.dropbox.com/u/292449/glbasic/img/modex.png)

[attachment deleted by admin]
Title: Re: World Editor "Modex"
Post by: Kitty Hello on 2012-Jul-05
Are you on the lastest update? Menü: Web/Internet-Update.
Title: Re: World Editor "Modex"
Post by: L.D.M.T. on 2012-Jul-16
Kitty Hello - yes, the version the last.
Albert - thanks for a source code with shadows!

I have some questions:

1) how to me to make analog of the ScaleTexture team (Blitz3d) in Gl Basic?
it will be necessary to use shaders or there are other options?

2) where I can find a source code of export to a DDA format on GLB?

3) why in GLB lighting doesn't affect the created objects?
look at the picture above - the cylinder completely black...
Title: World Editor "Modex"
Post by: Kitty Hello on 2012-Jul-24
Hi

I have no idea about the cylinder. If you first enable the light, then render it should work. Are the normals OK?
Title: Re: World Editor "Modex"
Post by: Schranz0r on 2012-Jul-24
looks like fliped normals on that...
Title: Re: World Editor "Modex"
Post by: L.D.M.T. on 2012-Jul-25
new demo with shadows - at me they are buggy.
I will repeat - where I can find a source code for export to a DDA format? the specification is written not so clearly.

http://myblitz3d.narod.ru/modexloader.zip
Title: World Editor "Modex"
Post by: Kitty Hello on 2012-Jul-26
I don't have anything but the dda specs. What are your problems in detail?
Title: Re: World Editor "Modex"
Post by: L.D.M.T. on 2012-Jul-28
some more questions:
how to load a texture with a mask as on a screenshot?
how to make translucent model as on a screenshot?
why shadows so are buggy? what do I do incorrectly? it is possible to look at a source code in archive above.
when there will be already a support of DDS of textures and format B3D? when I use textures PNG, objects aren't displayed, but the shadow from them falls.

[attachment deleted by admin]
Title: Re: World Editor "Modex"
Post by: mentalthink on 2012-Jul-28
The mask you can do it whit a simple .png... If I don´t rebember bad...

About the transparency you can use settransparency, but only works whit minus values, and it´s equal ,0.9 or .0.01

And the shadows you can´t make better, they are at this mode...

Another point for make better things... Take a look to OpenGL, in the forum Gernnot explains very well how call to OPENGL functions... and you can do anything in 3D from GLBasic, not it´s complex, I´m not programmer and I did a mini port of OPENGLES 1.0.... take care, OPENGL not it´s OPENGLES 1.0 , and this it´s different to OPENGLES 2.0... stay sure about your target for the 3D Editor...

Regards