Page 16 of 16

Re: Tree Scene Node v2.1

Posted: Tue Oct 09, 2012 10:08 am
by zerochen
are you sure you dont mean

for (int x=0;x<110;x++)

otherwise tree[0] isnt accessable and may cause the problem

Re: Tree Scene Node v2.1

Posted: Tue Oct 09, 2012 1:23 pm
by Abraxas)
Actually it fatal errors at iteration ~107.

Is there a way to use this with the meshcombiner? The trees are fine but I need something a little quicker than just displaying the trees (with a dual 5770 I drop to about 88fps with 100 trees)

Re: Tree Scene Node v2.1

Posted: Tue Oct 09, 2012 3:31 pm
by serengeor
Abraxas) wrote:
Is there a way to use this with the meshcombiner?
If they are static then I'm sure it's possible :)

Re: Tree Scene Node v2.1

Posted: Wed Oct 10, 2012 5:58 pm
by chronologicaldot
Abraxas) wrote: I'm having one problem. I can get the tree to instance and display fine, but the shaders on the leafs aren't loading.

Code: Select all

leafMaterialType = (video::E_MATERIAL_TYPE) driver->getGPUProgrammingServices()->addHighLevelShaderMaterialFromFiles( "../shaders/leaves.vert","main", EVST_VS_2_0, "../shaders/leaves.frag", "main", EPST_PS_2_0, 0,  EMT_TRANSPARENT_ALPHA_CHANNEL,   0);
is the line from the main.cpp causing a problem. It compiles and runs, but this is the error the console window gives me:

"(pathname)\(programfolder)\memory<1,9>: error X3000: Invalid target or usage string"
My first question would be: what is "leaves.vert"? I don't of any .vert file extension, and I don't think irrlicht would recognize it since I believe it uses only the first (or last) three characters after the period to determine the extension when loading. I could be wrong on that, so I'd have to double check. Same thing with the .frag.
Or it could be that neither file exists. If either problem is the case, then the fact that you are using the alpha channel may have something to do with why your leaves aren't showing up: they exist, but they're transparent.

Re: Tree Scene Node v2.1

Posted: Thu Oct 11, 2012 7:11 am
by hybrid
vert and frag are extensions for vertex and fragment shaders (the latter is aka pixel shaders). And it does not need to be recognized (while IRrlicht uses all characters it knows about), as you load the shader code directly into the method where it is used as is.

Re: Tree Scene Node v2.1

Posted: Thu Oct 11, 2012 10:37 am
by ACE247
Be sure you Generate all the Trunk and Leaf Geometry first in the Tree SceneNode and only THEN pass it to the meshcombiner. Also after Mesh combining, In order to change one of the trees you'd have to remove its Geometry, generate a new tree and then recombine. Similar thing goes for the Shaders. But I hope you know all that, else you'd have a hard time :)

Re: Tree Scene Node v2.1

Posted: Mon Mar 17, 2014 8:18 pm
by Christi258
Cold you please reup that?
EDIT: Or anyone else?

Re: Tree Scene Node v2.1

Posted: Thu Apr 03, 2014 12:23 pm
by user-r3
/Sign

Would really like to see this in action and try to use it :)

Re: Tree Scene Node v2.1

Posted: Thu Apr 03, 2014 1:22 pm
by hendu
Download it from irrext svn.

Re: Tree Scene Node v2.1

Posted: Thu Apr 03, 2014 2:12 pm
by user-r3
hendu wrote:Download it from irrext svn.
Wow, I did not know such a svn for irrlicht extensions exists!

Thanks alot!