Jump to content

Lamps on Babylon / Open Contest!


Rodrix3
 Share

Recommended Posts

13 hours ago, dbawel said:

@Rodrix3

I use low res duplicates of the mesh I'm texturing, when I run out of  texture channels and / or their attributes to use. Make these duplicates children of the original mesh, and use the alpha channels in the 32 bit textures for transparency. This provides endless possibilities, including animating the meshes and textures on the duolicate low res meshes.

 I hope this explains how we create awesome scenes at Sony.

DB

Thanks again @dbawel for the explanation and for sharing this incredible knowledge. I am following a bit better now but still have some doubts.

When you say "use alpha channels in the 32 bit textures for transparency".. do you mean:

  • use alpha channel on albedo, or emissive textures? 

Is this what you mean:

 image.thumb.png.2ef461467d6142b1d8f1ac60a78614fd.png

If not, we can name GREEN the Lampshade Inner , and BLUE the Lampshade Outer.
What materials would you use for GREEN and BLUE?

Thanks so much in advance!!! :)

...thanks for the patience in helping me understand how this works :).
 

 

Link to comment
Share on other sites

The ceiling light 'X flare' can probably be simulated by adding a "X" sprite picture with alpha mask to it which is on a layer above the 3D object (for example, your GUI). At least this was how it seem to have worked in Perfect Dark N64 ?

Perfect-Dark-64.png

E.g. some GUI picture that is only shown when in view frustrum. This is done for you already automatically in the example on https://doc.babylonjs.com/how_to/gui See the Sphere7 dot pointer that points to the 3D object. Replace the dot image with the image of your "X" flare. The flares need only be shown when there is a Line of Sight between the lamp position and your camera.

Perhaps look into the existing LensFlare system of BabylonJS too...

Let me know if you get it to work. I'll probably be adding these X light flares to my own game as well some time in the future. They really give a nice simulated effect of 'painful bright light to the eyes' ?

Happy coding.

Link to comment
Share on other sites

I can now declare myself the winner of this contest as up to now I'm the only one to prepare a PG (despite it looking nothing like the OP asked for). ?

http://www.babylonjs-playground.com/#S9KCDL#3

UV map templates are here:

Model here:

...and the .blend attached

This may give someone else a head start... the lamp & floor is UV mapped, so if this is of use to anyone to come up with something awesome, then it would be great to see.

Cheers,

 

light.blend

Link to comment
Share on other sites

https://www.babylonjs-playground.com/#MU17PR#32

Why does setting:
glass.linkRefractionWithTransparency = true;
Make the insides invisible, but allow the glow layer to work while:

 

glass.linkRefractionWithTransparency = false;
makes the inside visible, but makes the glow layer stop working?

**UPDATE**
https://www.babylonjs-playground.com/#MU17PR#36
Adding fixtures.
Link to comment
Share on other sites

Why does setting:
glass.linkRefractionWithTransparency = true;
Make the insides invisible, but allow the glow layer to work while:

The meshes in this case are not considered transparent, they only use the refraction texture to display behind.
 

glass.linkRefractionWithTransparency = false;
makes the inside visible, but makes the glow layer stop working?
 
Meshes are transparent then alpha blended and Glow layer does not support transparent meshes.
 
Hope it helps
Link to comment
Share on other sites

https://www.babylonjs-playground.com/#MU17PR#53

Is there a way to mask the emissive color on a PBR?

Otherwise Ill have to shift the fabric to a CustomMaterial.

Also, can anyone suggest the best method to get the PBR not to be lit unless the point light is on, I figured its the environmental factor but there might be a quick flag I can use that will fix it so figured Id ask.  Otherwise Im gonna shift to Custom Standard Materials and script in reflection probe support and emissive masking.

Link to comment
Share on other sites

Is there a way to mask the emissive color on a PBR?

Emissive Texture ???

Also, can anyone suggest the best method to get the PBR not to be lit unless the point light is on, I figured its the environmental factor but there might be a quick flag I can use that will fix it so figured Id ask.  Otherwise Im gonna shift to Custom Standard Materials and script in reflection probe support and emissive masking.

You can use environmentIntensity to reduce the environment impact and disableLighting to stop the analytical lights impact

Link to comment
Share on other sites

and if you wish you could also play with factors instead:

directIntensity;               for light control (diffuse+spec of Point Hemispheric...)
emissiveIntensity;         for the overall intensity of the emissive
environmentIntensity;   for the intensity of the environment
specularIntensity;          for the specular intensity (both lights and environment) 
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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...