Jump to content

Further understanding framework


MasteR
 Share

Recommended Posts

I have a program which simply loads "tunnels.sbx" ans enables camera controls.

 

When creating a framework object the scene will adjust the properties of "fixture_hanginglight.gmf" causing the said model to appear to glow.

 

2.jpg

 

When creating the world manually this change does not take place

 

1.jpg

 

I'm here to find out why.

 

I know that the change is not created via the assets accompanying LUA script and that the Leadwerks editor the change is governed via the intensity and colour properties.

 

What specific part of the framework class handles this change?

AMD Athlon 64 X2 Dual Core 6000+ (3.0 GHz)

4 GB DDR2 RAM

2 x NVIDIA GeForce 9500 GT 512 MB (SLI 1.0 GB)

Windows XP Pro

Link to comment
Share on other sites

Framework is basically only doing the rendering correctly with all post-effects, water, refraction, etc... It's very difficult to do that yourself, exactly as difficult as rewriting the whole framework yourself.

It doesn't have anything unnecessary in it, so if you try to rip out parts of it, you'll be missing something which you need later on anyway.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Framework is basically only doing the rendering correctly with all post-effects, water, refraction, etc... It's very difficult to do that yourself, exactly as difficult as rewriting the whole framework yourself.

It doesn't have anything unnecessary in it, so if you try to rip out parts of it, you'll be missing something which you need later on anyway.

 

The more I learn the closer my solution gets to the old Framewerk class which I assume is almost exactly the same as the new Framework class. So I can see your point of view and may one day simply create a Framework object rather than implement it all myself especially if "It doesn't have anything unnecessary in it" as this is my concern. The fact that the old Framewerk class has been permanently incorporated into the Leadwerks engine is a strong indication that this is so.

But right now I'm learning the engine so to speak and creating Framework object is going to get me no where, as creating a Framewerk type class is well within the abilities of many Leadwerks license owners, in my opinion.

 

So like I said I'm after the information as to how the Framework class implements the change where my solution does not.

As I mentioned it is not part of the assets LUA script, nor does the asset use a material file.

 

So get my ball rolling how does the engine knows that particular model needs to have the colours in its texture intensified to become almost white?

It is governed by the colour and intensity properties within the SBX file, values which are used to correctly create a spot light for the model but for me the additional glow effect does not occur.

 

To am I right to say the effect requires a "transparency world"?

 

I’ll continue to make progress myself but I'm sure someone can help speed this up.

AMD Athlon 64 X2 Dual Core 6000+ (3.0 GHz)

4 GB DDR2 RAM

2 x NVIDIA GeForce 9500 GT 512 MB (SLI 1.0 GB)

Windows XP Pro

Link to comment
Share on other sites

The white part of the lamps is using a mat file which has the fullbright=1 setting.

 

I spent some time on this today and managed to solve my problem a short while ago so thank you for your replies Lumooja.

 

My next question is:

 

When creating a framework object the scene "tunnels.sbx" which now includes a spiffy "Firepit.gmf" model, will correctly render the heathaze emitter.

 

But when creating the world manually I get the following results:

 

3.jpg

 

Now it appears that the buffer’s colour component is not being passed correctly to the “texture1” parameter in the "heathaze.mat" file associated with the "Firepit.gmf" model.

 

How does the framework class go about passing this information to the MAT file? As there is no “SetMaterialTexture()” command present in the models associated LUA script.

AMD Athlon 64 X2 Dual Core 6000+ (3.0 GHz)

4 GB DDR2 RAM

2 x NVIDIA GeForce 9500 GT 512 MB (SLI 1.0 GB)

Windows XP Pro

Link to comment
Share on other sites

The firepit model specifically uses the fw.transparency.world inside its lua script. Without seeing your code, one can only guess at how you are handling that. If you are wanting to actually see the framework code, then you need to download an older version of LE (like 2.30) and look at the BMAX framewerk code.

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

Through my learning’s thus far I have come across a difference in the rendered output from 3 different "programs". My findings centre on the “firepit.gmf” model and its associated LUA script and MAT file.

 

Program 1: The Leadwerks Editor (with no post process effects)

 

The heathaze emitter created in the LUA script renders correctly employing an alpha blend even though the MAT file does not.

The fire emitter created in the LUA script is very dull and appears to perhaps to be rendering in the main world and not in the transparent world.

The fluctuating pointlight created in the LUA script renders correctly.

 

Program 2: My framework free program (with no post process effects)

 

The heathaze emitter renders incorrectly causing visible "tears". This is caused by the heathaze MAT file not employing alpha blending.

The fire emitter renders correctly being significantly brighter than in Program 1.

The fluctuating pointlight renders correctly.

 

Program 3: Marleys Ghost's framework example found here (with no post process effects)

 

The heathaze emitter renders incorrectly causing visible "tears". This is caused by the heathaze MAT file not employing alpha blending.

The fire emitter renders significantly brighter than in Program 2, and eclipsing Program 1.

The fluctuating pointlight does not render at all.

 

Any thoughts on the 3 different outputs?

I would have thought Program 1 and Program 3 would render the exact same output, as to my knowledge (though admittedly not great) the Leadwerks Editor also creates a framework object.

I’m aware that I can edit the “heathaze.mat” file to employ alpha blending for my program but I’m really seeking a greater understanding of the engine here.

AMD Athlon 64 X2 Dual Core 6000+ (3.0 GHz)

4 GB DDR2 RAM

2 x NVIDIA GeForce 9500 GT 512 MB (SLI 1.0 GB)

Windows XP Pro

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...