Jump to content

Emitters + Framework


Quan
 Share

Recommended Posts

The Pointlight + Waterplane issue:

 

Simple scene with 1 pointlight, 1 waterplane, terrain, and 1 directional light.

 

Plight.zip

 

Use bmax to load the scene and the program will crash if you try to view the pointlight and water at the same time.

 

Remove one or the other and all is fine.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

SetWorld(fw.transparency.world)
then create the emitter
and set its properties
...
SetWorld(fw.main.world)

 

But there is a bigger issue happening here. Any emitter created and saved in an Editor scene will crash a bmax program. Same thing happens with pointlights and waterplanes. Both emitters and pointlights were worked on during this update. So I am hoping Josh just forgot to upload some new files...

 

Thanks thats got it working. I was so close last night just didn't get the right words in setworld.

 

By doing this I can now have a directional light + a emitter and no crash. I haven't tried doing any tests with pointlights + water yet.

BMax 1.38 * Leadwerks 2.4 * Unity 3.0 Pro * Intel Core 2 Duo 6600 - Win7 64bit - ATI 4870

Link to comment
Share on other sites

Thanks thats got it working. I was so close last night just didn't get the right words in setworld.

 

By doing this I can now have a directional light + a emitter and no crash. I haven't tried doing any tests with pointlights + water yet.

 

 

you have emitters working from LoadScene() on an sbx? odd .. as it will still crash for me when there is NO light of any kind in the scene ... or for that matter anything else, even trying to load a scene that contains only a single emitter causes the crash to.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

you have emitters working from LoadScene() on an sbx? odd .. as it will still crash for me when there is NO light of any kind in the scene ... or for that matter anything else, even trying to load a scene that contains only a single emitter causes the crash to.

 

What I have working is the code above now. The sbx contains the scene + lights but no emitters. The emitter is just the snow effect. I think that I am still using 2.3 the version.txt says 2.3 if I run the updater it doesn't say there is any files that need to be updated.

BMax 1.38 * Leadwerks 2.4 * Unity 3.0 Pro * Intel Core 2 Duo 6600 - Win7 64bit - ATI 4870

Link to comment
Share on other sites

you need to to get the latest version of the downloader from the download section to get 2.31

and it will say 2.31 in the version.txt

 

hope that helps

Asus ROG STRIX B350-F GAMMING

AMD Ryzen 7 1700x

32 gb ddr4

15 TB raid 5 HD

Nvidia EVGA 1060GTX

Win10 64bit

Link to comment
Share on other sites

heck... that explains it! if I was you quan i wouldn't bother with downloading 2.31 until these issues are fixed. right now the version you have doesn't have these issues. What we have been referring to are all issues that belong to 2.31

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Aha .. I'll stop wondering why emitters not loaded with loadscene work in 2.31 then ..

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Ok will do. I'll wait until things have settled down before upgrading. Still I have learned a lot more from this thread even if my problem was a bit of a wild goose chase in the end.

 

Btw, I am making a space game but got obsessed with trying to make snow, but it doesn't snow in space :)

BMax 1.38 * Leadwerks 2.4 * Unity 3.0 Pro * Intel Core 2 Duo 6600 - Win7 64bit - ATI 4870

Link to comment
Share on other sites

Ok will do. I'll wait until things have settled down before upgrading. Still I have learned a lot more from this thread even if my problem was a bit of a wild goose chase in the end.

 

Btw, I am making a space game but got obsessed with trying to make snow, but it doesn't snow in space :)

 

 

no, i wouldnt say a wild goose chase... it made us take a look at emitters and pointlight/waterplanes in 2.31 and find that there was an issue now. the only thing that was confusing was your ability to get something to work when it just failed no matter what when we would try it in 2.31.

 

who says it doesn't snow in space? you are mighty quan, the creator of your game's world. if you want to make it rain guinea pigs that shoot lasers out their eyes that is your decision.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Have you tried it with:

 

SetWorld(fw.transparency.world)

 

Before the emitter and

 

SetWorld(fw.Main.world)

 

After it ?

 

That is what I did in the end to get it to work but I am still running 2.3 and haven't upgraded yet.

BMax 1.38 * Leadwerks 2.4 * Unity 3.0 Pro * Intel Core 2 Duo 6600 - Win7 64bit - ATI 4870

Link to comment
Share on other sites

i tried all your examples .)

 

 

 

In Bmax or C++ ?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

c++ of course

 

And you can't load the example emitter scene?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

odd, I had no issues with C++ and emitters and the test scene above loads fine.

 

post-12-12667437055447_thumb.jpg

 

It would crash an app in Bmax, but thats fixed now. The only issue is the waterplane one as outlined by Mack.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

everything crashes with zero messagebox.

In editor, emitter is ok.

 

 

hmm, well I am using a basic scene loader in both Bmax and C++ and can't get Bmax or C++ to crash :) I even went as far as adding 3 Directional lights, 4 emitters of varying type and threw in a spotlight and a point light oh, and an ambient light just for chuckles sake ..

 

post-12-12668621348081_thumb.jpg

 

no errors.

 

I should add, also enabled in each app was: SSAO, AA, HDR, Grays and Bloom.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

post EXE :)

 

 

Why an exe ?

 

or sample code please

 

Sure:

 

#include "engine.h"

int main(int argc, char** argv)
{
Initialize();
RegisterAbstractPath("PATH TO YOUR SDK FOLDER");
Graphics(800,600);

AFilter() ;
TFilter() ;

TWorld world = CreateWorld() ;
if (!world) {
MessageBoxA(0,"Error","Failed to create world.",0);
return Terminate();
}

TFramework framework=CreateFramework();
TLayer layer = GetFrameworkLayer(0);
TCamera cam=GetLayerCamera(layer);
PositionEntity(cam,Vec3(0,0,0));

//Set Lua variable
BP L=GetLuaState();
lua_pushobject(L,framework);
lua_setglobal(L,"fw");
lua_pop(L,1);

// Setup Initial Post Processing FX
SetGodRays(1);
SetHDR(1);
SetSSAO(1);
SetBloom(1);
SetAntialias(1);
SetStats(2);

LoadScene("abstract::LE_BMAX_Emitter_Test.sbx");

// Setup spectator
TBody spectator=CreateBodySphere();
SetBodyMass(spectator,1);
SetBodyGravityMode(spectator,0);
SetBodyDamping(spectator,1.0);
EntityType(spectator,3);
SetBodyBuoyancyMode(spectator,0);
//PositionEntity(spectator,Vec3(0,350,0));

PositionEntity(spectator, Vec3(11.9758406,0.934108377,-24.0441971));

TVec3 camrotation=Vec3(0);
float mx=0;
float my=0;
float move=0;
float strafe=0;

HideMouse();
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);

// MAIN LOOP
while (!KeyHit(KEY_ESCAPE))
{

mx=Curve(MouseX()-GraphicsWidth()/2,mx,6);
my=Curve(MouseY()-GraphicsHeight()/2,my,6);
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);

camrotation.X=camrotation.X+my/10.0;
camrotation.Y=camrotation.Y-mx/10.0;
RotateEntity(cam,camrotation);

move=KeyDown(KEY_W)-KeyDown(KEY_S);
strafe=KeyDown(KEY_D)-KeyDown(KEY_A);
TVec3 force = Vec3(strafe*10.0,0,move*10.0);
force=TFormVector(force,cam,0);
AddBodyForce(spectator,force);

//UpdateAppTime();
//UpdateWorld(AppSpeed()) ; 

PositionEntity(cam,EntityPosition(spectator));

// Update timing and world
UpdateFramework();

// Render
RenderFramework();

// Send to screen
Flip(0) ;
}

return Terminate();
}

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

It works for me in C++, now as i use

 

SetWorld(transparency)

CreateEmitter (...)

SetWorld(main)

 

Creating the Emitter in the main world results in a crash and the "0" message.

 

 

I only have so far used loadscene.

 

The Code I have used for testing:

 

Bmax

 

C++

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I think carlb's using an ATI card .. maybe he can confirm an ATI issue?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...