Some thoughts about h3d

315 views
Skip to first unread message

davy zhang

unread,
Mar 10, 2014, 3:25:26 AM3/10/14
to haxe...@googlegroups.com
Its seems few people talk about hxsl and h3d here, see there's no h3d tag :P, but I personally think h3d is the next big thing could happen to haxe.
here's some thoughts about this.

First, 3D game is the trend in web or mobile. 2D is fun but 3D can be funnier :)

h3d can be one native cross platform 3d engine built on haxe's cross-platform nature.
Cross-platform 3d engine is not so new here, unity3d, flash, Axiom 3D Engine(mono), most of them using vm, but when things comes to native 3d engine, most code base and shaders need to be rewrite, but h3d heres come to help this situation. Native performance and small resource consumption.

h3d don't have to be like unity, unreal and some mature engines. h3d can wrap a very thin layer to compile to shaders and setup the environment. This will open a gate to tons of whatever cross-platform game engines even commercial ones. And at same time limited h3d engine itself's workload. I mean don't bother to write fancy lighting shaders,particle effects, support tons of formats, h3d could be built to friendly talk to other higher level engines. Don't make another away3d bundle :D

I see the driver design in h3d package which is great and exciting.

Best wishes to h3d and hxsl, looking forward to see the next release.

Thanks for reading :P

David Elahee

unread,
Mar 10, 2014, 3:34:17 AM3/10/14
to haxe...@googlegroups.com

You should look at the 'heaps' branch, the new shader design will leverage more cross platform goodness :) gl.

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

davy zhang

unread,
Mar 10, 2014, 3:53:46 AM3/10/14
to haxe...@googlegroups.com
Yeah I saw that branch, somedays ago ncannasse says it currently can compile to glsl, agal might comes later on. Its great. 
I am using h3d for a small project I found hxsl limited matrix class passed to shader classes to only matrix3D(buggy one of flash built in) and h3d.mat.Matrix (with -D h3d ). So I think it could be better define some interfaces/abstract for some standard data types and let others to write their own ones.
Deep in my heart, I am fearing h3d become another away3d, one is enough :D

David Elahee

unread,
Mar 10, 2014, 3:57:52 AM3/10/14
to haxe...@googlegroups.com

H3d.matrix will be the official type, there is no point in delegating it to interfaces since they are sloW, if need be don t hesitate to ask for improvements, they are welcome.

I dont see you point of comparison about away3d, it is à nice library ( never really used it...) albeit à little bit crowded, what exactly is it you fear ?

davy zhang

unread,
Mar 10, 2014, 4:15:19 AM3/10/14
to haxe...@googlegroups.com
Away3d is great, I am using it, well some codes of it :D, But the problem is, away3d is more like a tool box want solve All the problems. This could lead to complex multiple layered design, and the early structure is hard to alter during the evolve of engine. The one thing  I learned in my dev life (in a hard way), is never design a ambiguous structure expecting to meet the uncertain future.

Away3d is nice with a lot of features, but also the performance can be hurt in it's design, not suitable for directly used in commercial games. Currently it's an official 3d engine of Adobe, I can understand the meaning and hard working behind this, Really appreciate that, so I said only one is enough. I am currently write my own 3d games writing my own shaders, I prefer to grab some codes from away3d other than use whole of it:P

in general, my fear is
if h3d keep solely  aim to cross-platform 3d render is great, but if aim to a whole feature rich game engine would be a bad sign of starting.

David Elahee

unread,
Mar 10, 2014, 4:34:01 AM3/10/14
to haxe...@googlegroups.com

H3d aims at fast cross platform rendering, it provides bith low level cross platform and high level helpers.

Aside that it willl just become what Nc and Mt and future contributors will make of it. There is no grand scheme of feature completion nor will to bend to any concision need/peer pressure.

So if I may say it so, it is our production tool open sourced, if you have points to address lets talk about it for heaps :)

In another league, h3d was rebranded heaps because Nicolas has added many thing and it was no longer a 3d Hal but a real game framework.

So in I think your fear will come true in a sense... But if you pay attention, Nicolas has done a lot of work to make the new pipeline more flexible with passes and draw objects. So in another sense he has done what you need to outperform heaps with h3d.

I advise you to stop fearing about the big picture and decide what you need, need not, eventually maintain a slimmed clone because in the end, we dont have same needs and making general discourses wont help you (nor us) :D

davy zhang

unread,
Mar 10, 2014, 5:50:33 AM3/10/14
to haxe...@googlegroups.com
Thanks for the reply and kindly let me know the whole picture of h3d currently. I know this kind of thread can easily end up in meaningless debate of framework comparisons and technology religion choices.  But for now, so glad to see there's all good news. Some other days ago, I just finished porting my own 3d engine from as3 to haxe( still using agal). After reading your post, I knew I will have to do similar things again someday in the future :P. But fine, in the name of cross-platform. :D

Your advise is right, nearly every game I was involved, has different needs for rendering, 2d/3d or mixed up. It eventually ends up one game one engine situation :D. As you said, I guess flexible pipeline could be another solution 
I am bold to make general discourses in this thread, because I thought it might be in a very early stage, so few people to talk about it, I wanna know some ideas behind the stage, something like roadmap, future plan, current status etc. Thanks for David feeding me everything I wanna know.  I will keep watching the heaps branch and find a way to adapt it in my future game projects.

Keep up the good work, best wishes to h3d.

just a remind. I won't start a general discourses thread again, it's dangerous and probably wasting everyone's time  

relax2code

unread,
Mar 10, 2014, 6:27:52 AM3/10/14
to haxe...@googlegroups.com
@davy zhang
how bout http://foo3d.developium.net/

davy zhang

unread,
Mar 10, 2014, 10:14:33 AM3/10/14
to haxe...@googlegroups.com
@relax2code
Nice to link me there, looks cool, I'll check it out

Bill Kelly

unread,
Mar 17, 2014, 7:45:53 AM3/17/14
to haxe...@googlegroups.com, david....@gmail.com
Hi,

David Elahee wrote:
>
> So if I may say it so, it is our production tool open sourced, if you
> have points to address lets talk about it for heaps :)

Apologies if I should have begun a new thread (wasn't sure), but I'm
trying out 'heaps' and had some questions:

I'm still new to haxe, but I was able to install heaps via:

$ haxelib git heaps https://github.com/ncannasse/h3d.git heaps heaps

I'm able to get a few of the projects in the 'samples' directory to
run (using the JavaScript target, building with FlashDevelop.)

The other samples build, but show a black screen. I'm seeing the
following error in the browser debug console:

Error: WebGL: A texture is going to be rendered as if it were black,
as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is a 2D
texture, with a minification filter requiring a mipmap, and is not
mipmap complete (as defined in section 3.7.10).

Is this something that might be expected with the current bleeding
edge build of heaps? Or might I have something configured incorrectly
locally?


Also, is it known whether Android builds are currently supported for
heaps? So far I've only ever built for Android via `lime test android`,
but I wasn't sure if that was the correct procedure for heaps projects?
(`lime` complained about no project.xml file; I tried to generate one
by hand based on examples from different projects, but was unsuccessful.)


Thanks for any tips or pointers you may be able to offer. (Sorry for
such beginner questions.)


Thanks,

Bill


Nicolas Cannasse

unread,
Mar 17, 2014, 9:30:34 AM3/17/14
to haxe...@googlegroups.com
> The other samples build, but show a black screen. I'm seeing the
> following error in the browser debug console:
>
> Error: WebGL: A texture is going to be rendered as if it were black,
> as per the OpenGL ES 2.0.24 spec section 3.8.2, because it is a 2D
> texture, with a minification filter requiring a mipmap, and is not
> mipmap complete (as defined in section 3.7.10).
>
> Is this something that might be expected with the current bleeding
> edge build of heaps? Or might I have something configured incorrectly
> locally?

On which browser are you testing ? I never got this error, so I'll look
at fixing it.

Best,
Nicolas

Bill Kelly

unread,
Mar 17, 2014, 2:58:07 PM3/17/14
to haxe...@googlegroups.com, ncan...@gmail.com
Hi,
The errors appear on Firefox 27.0.1 (on a Windows 7 x64 system.)

The error is reported at the gl.bindTexture call:

,uploadTexturePixels: function(t,pixels,mipLevel,side) {
this.gl.bindTexture(3553,t.t.t);
pixels.convert(hxd.PixelFormat.RGBA);
var pixels1 = new Uint8Array(pixels.bytes.b);
this.gl.texImage2D(3553,mipLevel,6408,t.width,t.height,0,6408,5121,pixels1);
this.gl.bindTexture(3553,null);
}


I don't see the errors in the developer console in the Chrome browser on the
same system, however.



Regards,

Bill

Reply all
Reply to author
Forward
0 new messages