Balloon 3D

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Balloon 3D

Dominic Letz
Hello everyone,

1. i'm searching for information or/and documentation about balloon3d its  
implemention details
2. and the problems it was designed to solve.
3. what details of hardware acceleration does it abstract,
4. and why does croquet does need an extra opengl ffi interface
5. (why ffi isn't that the slowest way to go compared to a plugin ?)

any hints and every information is welcome
faithfully
dominic letz

Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Bert Freudenberg

On May 27, 2007, at 22:59 , Dominic Letz wrote:

> Hello everyone,
>
> 1. i'm searching for information or/and documentation about  
> balloon3d its implemention details

Not much there beyond the code and examples.

> 2. and the problems it was designed to solve.

As I understand it, providing a cross-platform 3D graphics framework  
for Squeak. It has a decent software-only renderer but was designed  
to allow use of hardware acceleration using both OpenGL and Direct3D.

> 3. what details of hardware acceleration does it abstract,

Not sure what you mean - everything?

> 4. and why does croquet does need an extra opengl ffi interface

It gives full access to all OpenGL functionality from Smalltalk  
without having to deal with C code, allowing rapid experimentation.  
Croquet's renderer is very much different from Balloon3D, it just  
uses the B3DAccelerator plugin to create a window (rather than having  
to deal with GLX/WGL/AGL).

> 5. (why ffi isn't that the slowest way to go compared to a plugin ?)

It's deemed fast enough and much simpler than a plugin.

I wouldn't be surprised if Croquet's ffi-based rendering using VBOs  
turned out to be faster than Balloon3D rendering.

OTOH, the abstraction that B3D provides is still valuable - I for one  
wouldn't mind if someone would bring it up to date and add features,  
in particular because it works on both GL and D3D.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Cesare Marilungo
Bert Freudenberg wrote:
> OTOH, the abstraction that B3D provides is still valuable - I for one
> wouldn't mind if someone would bring it up to date and add features,
> in particular because it works on both GL and D3D.
>
> - Bert -
I second that.

Not only for the abstraction layer it provides but also because it would
be good to have something more versatile than Croquet, too. Croquet is a
really interesting projects (and probably it is the future), but it is
designed around the virtual reality paradigm, which is overkill sometimes.

What would be needed to make Balloon3D up to date?

c.

--
http://www.cesaremarilungo.com


Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Bert Freudenberg
On May 28, 2007, at 16:02 , Cesare Marilungo wrote:

> Bert Freudenberg wrote:
>> OTOH, the abstraction that B3D provides is still valuable - I for  
>> one wouldn't mind if someone would bring it up to date and add  
>> features, in particular because it works on both GL and D3D.
>>
>> - Bert -
> I second that.
>
> Not only for the abstraction layer it provides but also because it  
> would be good to have something more versatile than Croquet, too.  
> Croquet is a really interesting projects (and probably it is the  
> future), but it is designed around the virtual reality paradigm,  
> which is overkill sometimes.
>
> What would be needed to make Balloon3D up to date?

Well, first one would have to check if it still works in 3.9 and  
3.10, and adapt it if needed - should not be too hard.

After that it's optimizing (like using newer APIs than DX7) and  
adding features that someone may need - currently B3D only supports  
single-textured Gouraud-shaded triangle meshes with Phong lighting  
and fog, and I think stenciling. This is enough for many eductional  
and scientific tasks, but for game-engine quality you would have to  
add at least multi-texturing and texture combining (to allow dot3  
bump mapping for example), allowing rendering quality as was standard  
in about 2004. Vertex shader support would be next on my wish list,  
which is a bit harder as there is no cross-API standard (except for  
Cg ... maybe a Cg plugin would be an option). And finally pixel  
shaders, which require relatively modern graphics boards (whereas  
vertex shaders can be emulated in the driver).

The bad thing is that all of this requires hacking C code (twice, for  
OpenGL and Direct3D), inventing new plugin interfaces etc. This is  
*so* much nicer in Croquet where you do everything from Smalltalk,  
and for OpenGL only ... But once the low-level work is done it should  
be relatively simple to use.

Even the software renderer would be interesting if someone would try  
giving it a bit of assembly-love to make it efficient enough on the  
OLPC (which has no 3D hardware support at all).

As for higher-level optimizations, I believe B3D does only simple  
frustum culling if at all. Efficient picking and collision detection  
would be nice, etc.

And at an even higher level, Wonderland is still interesting but has  
not seen much improvement since its initial release.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Brad Fuller-3
Bert Freudenberg wrote:
>
>
> The bad thing is that all of this requires hacking C code (twice, for
> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
> *so* much nicer in Croquet where you do everything from Smalltalk, and
> for OpenGL only ... But once the low-level work is done it should be
> relatively simple to use.
Why not dump Direct3D support? That'll make it more attractive to update
now and in the future and less platform specific.

--
brad fuller



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Cesare Marilungo
Brad Fuller wrote:

> Bert Freudenberg wrote:
>  
>> The bad thing is that all of this requires hacking C code (twice, for
>> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>> *so* much nicer in Croquet where you do everything from Smalltalk, and
>> for OpenGL only ... But once the low-level work is done it should be
>> relatively simple to use.
>>    
> Why not dump Direct3D support? That'll make it more attractive to update
> now and in the future and less platform specific.
>
>  
Right.

There's no need to support Direct3D unless you want to give access to
Direct3D specific functionalities, which doesn't make much sense if
you're going to abstract the low level layer.

OpenGL is crossplaform and supported on all 3D accelerated cards.

Regarding the OLPC, there's Mesa3D (http://www.mesa3d.org/).

c.

--
http://www.cesaremarilungo.com


Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Bert Freudenberg
In reply to this post by Brad Fuller-3

On May 28, 2007, at 17:22 , Brad Fuller wrote:

> Bert Freudenberg wrote:
>>
>>
>> The bad thing is that all of this requires hacking C code (twice, for
>> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>> *so* much nicer in Croquet where you do everything from Smalltalk,  
>> and
>> for OpenGL only ... But once the low-level work is done it should be
>> relatively simple to use.
> Why not dump Direct3D support? That'll make it more attractive to  
> update
> now and in the future and less platform specific.

Because OpenGL support on Windows is consistently inferior to  
Direct3D support on consumer-level hardware. I prefer OpenGL over D3D  
any day, but reality is that as long as you want to ship to a non-
technical audience on Windows you absolutely need to support D3D.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Martin Kuball
In reply to this post by Brad Fuller-3
Am Monday 28 May 2007 schrieb Brad Fuller:
> Bert Freudenberg wrote:
> > The bad thing is that all of this requires hacking C code (twice, for
> > OpenGL and Direct3D), inventing new plugin interfaces etc. This is
> > *so* much nicer in Croquet where you do everything from Smalltalk, and
> > for OpenGL only ... But once the low-level work is done it should be
> > relatively simple to use.
>
> Why not dump Direct3D support? That'll make it more attractive to update
> now and in the future and less platform specific.

Dropping Direct3D support is worth thinking about.

What I would like to have is a comparison between Ballon3D and Croquet.
About the features, the programing model, pros and cons.

Martin

Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Bert Freudenberg
In reply to this post by Cesare Marilungo
On May 28, 2007, at 19:35 , Cesare Marilungo wrote:

> Regarding the OLPC, there's Mesa3D (http://www.mesa3d.org/).

I'd bet that Balloon3D's software renderer is at least as fast as  
Mesa's. Both are currently too slow for the OLPC (which runs at  
1200x900x16 on a performance-challenged 400 Mhz CPU). That's why Mesa  
is not shipped on the OLPC system.

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Tim Johnson-6

On May 28, 2007, at 10:53 AM, Bert Freudenberg wrote:

I'd bet that Balloon3D's software renderer is at least as fast as Mesa's. Both are currently too slow for the OLPC (which runs at 1200x900x16 on a performance-challenged 400 Mhz CPU). That's why Mesa is not shipped on the OLPC system.


I just happened to have played with Alice and the Bunny in Squeak 3.4 on a Pentium 166 laptop running Windows 98 SE *yesterday*.  In that little postage-stamp sized window of the "Play With Me" demo, performance was surprisingly snappy.  I got about five frames per operation (bunny turn: left, etc.).  Almost seemed faster than Morphic on the poor thing...

Cheers,
Tim



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Nicolas Cellier-3
In reply to this post by Brad Fuller-3
Brad Fuller a écrit :

> Bert Freudenberg wrote:
>>
>> The bad thing is that all of this requires hacking C code (twice, for
>> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>> *so* much nicer in Croquet where you do everything from Smalltalk, and
>> for OpenGL only ... But once the low-level work is done it should be
>> relatively simple to use.
> Why not dump Direct3D support? That'll make it more attractive to update
> now and in the future and less platform specific.
>

If i reverse your argument, what about having both
- OpenGL rendering via FFI (the croquet way)
- Direct3D rendering via FFI

Then, you put the logic in the VI instead of the VM (or plugin).

Still, you try to have a common behaviour (public interface/method
dictionary).

But you don't have to limit the plugin to the intersection of
capabilities. You rather program the union (emulate parts which are not
native in underlying library, which is much easier in plain smalltalk).

This would have advantages for rapid prototyping/development.
There is a great discussion taking place in vwnc list just about things
like this (Graphics) and another on comp.lang.Smalltalk (about
Sport/File & Socket IO via FFI).

Nicolas


Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

J J-6
In reply to this post by Bert Freudenberg

And if you are making a game, the directX 10 or 15 or 2000, what ever comes
with Vista is the most advanced graphics API you can have on a desktop as
far as I know.  Some people may let that go by just because it isn't
"freedom 0" or whatever.  But probably not people want to make money selling
3D games. :)

>From: Bert Freudenberg <[hidden email]>
>Reply-To: The general-purpose Squeak developers
>list<[hidden email]>
>To: The general-purpose Squeak developers
>list<[hidden email]>
>Subject: Re: Balloon 3D
>Date: Mon, 28 May 2007 17:49:19 +0200
>
>
>On May 28, 2007, at 17:22 , Brad Fuller wrote:
>
>>Bert Freudenberg wrote:
>>>
>>>
>>>The bad thing is that all of this requires hacking C code (twice, for
>>>OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>>>*so* much nicer in Croquet where you do everything from Smalltalk,  and
>>>for OpenGL only ... But once the low-level work is done it should be
>>>relatively simple to use.
>>Why not dump Direct3D support? That'll make it more attractive to  update
>>now and in the future and less platform specific.
>
>Because OpenGL support on Windows is consistently inferior to  Direct3D
>support on consumer-level hardware. I prefer OpenGL over D3D  any day, but
>reality is that as long as you want to ship to a non- technical audience on
>Windows you absolutely need to support D3D.
>
>- Bert -
>
>
>

_________________________________________________________________
Make every IM count. Download Messenger and join the i’m Initiative now.
It’s free. http://im.live.com/messenger/im/home/?source=TAGHM_MAY07


Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Brad Fuller-3
J J wrote:
>
> And if you are making a game, the directX 10 or 15 or 2000, what ever
> comes with Vista is the most advanced graphics API you can have on a
> desktop as far as I know.  Some people may let that go by just because
> it isn't "freedom 0" or whatever.  But probably not people want to
> make money selling 3D games. :)
Ah... but now you are stepping into a different vortex ;-) than
providing a platform-agnostic development platform. Professional game
development comes in many flavors, of course, but the tools used are
pretty much universal. Squeak has a long way to go to even providing the
tools to create casual games in any serious way. I'm not saying it can't
be done, or that it hasn't been done or that I wouldn't _love_ to see
it. It's just not on the game developer's radar.

Bert's comment:
"Because OpenGL support on Windows is consistently inferior to  Direct3D
support on consumer-level hardware."
brings up the question "how much inferior?" So much that it's a
no-brainer? Or will OpenGL get there. (I don't know the answer - I
didn't know that there was any difference between the different platform
implementations.)

HOWEVER, if updated D3D could attract game developers to Squeak, that is
well worth considering.

brad

Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Andreas.Raab
In reply to this post by Brad Fuller-3
Brad Fuller wrote:
> Bert Freudenberg wrote:
>>
>> The bad thing is that all of this requires hacking C code (twice, for
>> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>> *so* much nicer in Croquet where you do everything from Smalltalk, and
>> for OpenGL only ... But once the low-level work is done it should be
>> relatively simple to use.
> Why not dump Direct3D support? That'll make it more attractive to update
> now and in the future and less platform specific.

But if all you need is OpenGL, why bother with B3D? The whole point of
B3D is to abstract away differences in the underlying APIs; if you are
only planning to use a single API there is really no point in the
abstraction - might as well go straight for OpenGL instead of via
another indirection.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Andreas.Raab
In reply to this post by Bert Freudenberg
Bert Freudenberg wrote:
> On May 28, 2007, at 19:35 , Cesare Marilungo wrote:
>
>> Regarding the OLPC, there's Mesa3D (http://www.mesa3d.org/).
>
> I'd bet that Balloon3D's software renderer is at least as fast as
> Mesa's. Both are currently too slow for the OLPC (which runs at
> 1200x900x16 on a performance-challenged 400 Mhz CPU). That's why Mesa is
> not shipped on the OLPC system.

Unless the Mesa software renderer has seen *significant* work in the
last years I would expect the B3D software renderer to beat the hell out
of it. I wrote it because back in the days (with 200MHz computers) Mesa
was too slow for running the software simulation. Nowadays on my measly
1GHz notebook I can run Wonderland from 3.6 in approx. 600@400 with 25fps.

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Bert Freudenberg
In reply to this post by J J-6
Well, seems MS marketing was successful on you. The opposite is true  
- with OpenGL you can access the full range of hardware features that  
a specific vendor puts in their cards, not only the ones that MS  
deems worthy of supporting. Using OpenGL you can program with DX10-
like features even in XP (for example, NVIDIA's demos usually use  
OpenGL).

- Bert -

On May 28, 2007, at 19:36 , J J wrote:

>
> And if you are making a game, the directX 10 or 15 or 2000, what  
> ever comes with Vista is the most advanced graphics API you can  
> have on a desktop as far as I know.  Some people may let that go by  
> just because it isn't "freedom 0" or whatever.  But probably not  
> people want to make money selling 3D games. :)
>
>> From: Bert Freudenberg <[hidden email]>
>> Reply-To: The general-purpose Squeak developers list<squeak-
>> [hidden email]>
>> To: The general-purpose Squeak developers list<squeak-
>> [hidden email]>
>> Subject: Re: Balloon 3D
>> Date: Mon, 28 May 2007 17:49:19 +0200
>>
>>
>> On May 28, 2007, at 17:22 , Brad Fuller wrote:
>>
>>> Bert Freudenberg wrote:
>>>>
>>>>
>>>> The bad thing is that all of this requires hacking C code  
>>>> (twice, for
>>>> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>>>> *so* much nicer in Croquet where you do everything from  
>>>> Smalltalk,  and
>>>> for OpenGL only ... But once the low-level work is done it  
>>>> should be
>>>> relatively simple to use.
>>> Why not dump Direct3D support? That'll make it more attractive  
>>> to  update
>>> now and in the future and less platform specific.
>>
>> Because OpenGL support on Windows is consistently inferior to  
>> Direct3D support on consumer-level hardware. I prefer OpenGL over  
>> D3D  any day, but reality is that as long as you want to ship to a  
>> non- technical audience on Windows you absolutely need to support  
>> D3D.
>>
>> - Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Bert Freudenberg
In reply to this post by Andreas.Raab

On May 28, 2007, at 20:43 , Andreas Raab wrote:

> Bert Freudenberg wrote:
>> On May 28, 2007, at 19:35 , Cesare Marilungo wrote:
>>> Regarding the OLPC, there's Mesa3D (http://www.mesa3d.org/).
>> I'd bet that Balloon3D's software renderer is at least as fast as  
>> Mesa's. Both are currently too slow for the OLPC (which runs at  
>> 1200x900x16 on a performance-challenged 400 Mhz CPU). That's why  
>> Mesa is not shipped on the OLPC system.
>
> Unless the Mesa software renderer has seen *significant* work in  
> the last years I would expect the B3D software renderer to beat the  
> hell out of it. I wrote it because back in the days (with 200MHz  
> computers) Mesa was too slow for running the software simulation.  
> Nowadays on my measly 1GHz notebook I can run Wonderland from 3.6  
> in approx. 600@400 with 25fps.

That was my hunch too, but without measuring I didn't want to loose a  
bet that easily ;)

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

J J-6
In reply to this post by Bert Freudenberg
>From: Bert Freudenberg <[hidden email]>
>Reply-To: The general-purpose Squeak developers
>list<[hidden email]>
>To: The general-purpose Squeak developers
>list<[hidden email]>
>Subject: Re: Balloon 3D
>Date: Mon, 28 May 2007 20:45:28 +0200
>
>Well, seems MS marketing was successful on you. The opposite is true  -
>with OpenGL you can access the full range of hardware features that  a
>specific vendor puts in their cards, not only the ones that MS  deems
>worthy of supporting. Using OpenGL you can program with DX10- like features
>even in XP (for example, NVIDIA's demos usually use  OpenGL).
>
>- Bert -

For some definition of "successful" (i.e. I haven't bought Vista nor even
installed it on a PC that could have had a free upgrade).  I am just
repeating what I read in some tech magazine which I thought would be
neutral.  I would, of course, love for it to be wrong.  For the most part
Vista looks to me like what Mac had at least 5 years ago, at a fraction of
the speed.

But the article they had on the DX10 (or whatever it is) showed quite a
difference.

_________________________________________________________________
PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows
Live Hotmail.
http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507


Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Joshua Gargus-2
In reply to this post by Brad Fuller-3

On May 28, 2007, at 11:08 AM, Brad Fuller wrote:

>
> Bert's comment:
> "Because OpenGL support on Windows is consistently inferior to  
> Direct3D
> support on consumer-level hardware."
> brings up the question "how much inferior?" So much that it's a
> no-brainer? Or will OpenGL get there. (I don't know the answer - I
> didn't know that there was any difference between the different  
> platform
> implementations.)

It's not that OpenGL is inferior to Direct3D per se (in fact, it not  
uncommon for the most advanced GPU features to be exposed via OpenGL  
extensions before they are supported by Direct3D).  The problem is  
that Direct X comes installed by default on every Windows machine,  
whereas Microsoft's default OpenGL implementation is a joke; for  
proper OpenGL support, you need to download the latest drivers from  
from the vendors site (for laptops, you sometimes have to get  
unofficial drivers from enthusiast sites).  While this is not a big  
hurdle for hardcore gamers, it is for the casual computer user.

Josh


>
> HOWEVER, if updated D3D could attract game developers to Squeak,  
> that is
> well worth considering.
>
> brad
>


Reply | Threaded
Open this post in threaded view
|

Re: Balloon 3D

Dominic Letz
In reply to this post by Bert Freudenberg
Well,

i think another point is that at least with Windows Vista, Microsoft is  
not shipping OpenGL with their drivers anymore [only software emulation].  
This means that every user who wants to use OpenGL has to download and  
install a OpenGL supporting driver from his GPU manufacturers home page.

So one could argue supporting only OpenGL would not be real platform  
independent since Windows users won't be able to use it without updating  
their system.


Am 28.05.2007, 17:49 Uhr, schrieb Bert Freudenberg <[hidden email]>:

>
> On May 28, 2007, at 17:22 , Brad Fuller wrote:
>
>> Bert Freudenberg wrote:
>>>
>>>
>>> The bad thing is that all of this requires hacking C code (twice, for
>>> OpenGL and Direct3D), inventing new plugin interfaces etc. This is
>>> *so* much nicer in Croquet where you do everything from Smalltalk, and
>>> for OpenGL only ... But once the low-level work is done it should be
>>> relatively simple to use.
>> Why not dump Direct3D support? That'll make it more attractive to update
>> now and in the future and less platform specific.
>
> Because OpenGL support on Windows is consistently inferior to Direct3D  
> support on consumer-level hardware. I prefer OpenGL over D3D any day,  
> but reality is that as long as you want to ship to a non-technical  
> audience on Windows you absolutely need to support D3D.
>
> - Bert -
>
>
>



12