Jump to content

What's going on with coronas?


VeTaL
 Share

Recommended Posts

I'm trying to make this code works in LE 2.42 just to test it, but can see nothing

TCorona corona = CreateCorona(model);
SetCoronaRadius(corona, 10, 20);
PaintEntity(corona, LoadMaterial("abstract::flare1.mat"));

 

Also, this example also show me nothing

http://leadwerks.com/werkspace/index.php/topic/1158-billboards/page__view__findpost__p__10683

 

log:

Loading material "d:/ik/ikdemo/assets/models/environment/corona/flare1.mat"...
Loading texture "d:/ik/ikdemo/assets/models/environment/corona/flare1.dds"...
Loading shader "zip::/ik/ikdemo/shaders.pak//corona.vert", "zip::/ik/ikdemo/shaders.pak//corona.frag"...
Loading shader "zip::/ik/ikdemo/shaders.pak//guide.vert", "zip::/ik/ikdemo/shaders.pak//editor/guide.frag"...
Loading shader "zip::/ik/ikdemo/shaders.pak//terrain/terrain.vert", "zip::/ik/ikdemo/shaders.pak//terrain/terrain.frag"...
Loading texture "incbin::noise.dds"...

Working on LeaFAQ :)

Link to comment
Share on other sites

Before the data loss, I think Flexman and Paul had voiced concerns over a possible bug with coronas.

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 need a light for the corona, and you need to position the corona where the light is:

TLight lamp = CreatePointLight();
TCorona corona = CreateCorona(lamp);
MoveEntity(lamp, Vec3(0,2,2));
PositionEntity(corona, EntityPosition(lamp));
SetCoronaRadius(corona, 10, 20);
PaintEntity(corona, LoadMaterial("l:/lesdk541/sdk/models/entities/environment/corona/flare1.mat"));

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

Coronas stopped appearing in the background world. The shaders they use haven't changed so it's likely a change in the engine. And culling can be an issue too. I only just noticed that one last night.

 

Avoid parenting them to objects in different worlds (or at all if you can avoid it).

 

Why is it needed to parent them to light sources now? They are handy for other uses.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

I just wanted to see if i can use coronas to debug vertex/bones positions in a model.

 

TLight lamp = CreatePointLight();
TCorona corona = CreateCorona(lamp);
MoveEntity(lamp, EntityPosition(rightToe));
PositionEntity(corona, EntityPosition(lamp));
SetCoronaRadius(corona, 1, 5);
PaintEntity(corona, LoadMaterial("abstract::flare1.mat"));

Now i can see light, but i cant see corona... strange things are happen :blink:

Working on LeaFAQ :)

Link to comment
Share on other sites

Is it possible to disable culling for coronas?

 

I used to have coronas position at or near lights that are often near other entities. For explosions I can't position them at the point of the explosion as the vehicle I'm destroying occludes it, same goes for the emitter in the transparency world. A workaround is to 'lift' the flash over the vehicle, since it only lasts a few frames you don't notice.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

That would mean if you were behind a building or something, you would see the corona right through it.

 

Would it? I thought geometry of the building would mask it if it was? Are they not depth tested if you specify that in the material, it must be because I have a huge corona that acts as a short flash and is correctly masked in the scene by trees, objects etc. unless the exact centre is behind something. As it is, it almost works perfectly for what I needed.

 

Maybe I don't quite fully appreciate how they work, they do have a neat auto-fade so they don't blink, nice touch that. Perhaps what I really need is just a straight billboard with alpha.

 

As a programmer I would like the option of having it show through a house or not via EntityOcclusionMode() but technically Coronas are not true entities.

 

Is it just a bounding box test?

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Coronas work by performing an occlusion query to see whether they are visible or not. This allows them to shine through a masked texture, like a chain link fence, with per-pixel occlusion. No geometry tests are performed.

My job is to make tools you love, with the features you want, and performance you can't live without.

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