instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 16, 2018, 10:29:17 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: surface shading  (Read 2381 times)
gregdowning
Newbie
*
Posts: 3


View Profile
« on: November 07, 2013, 01:45:24 am »

I just went through one of the tutorials and was able to quickly get something in a browser. Nice.

How do you make a self illuminating texture? In Maya you can do this by making a surface shader or adding the texture to the incandescent channel. For many applications the lighting is baked into the texture so you don't want any additional shading on top of the image. This is true for panoramas, photogrammetry & lighting bakes. I have seen this done in webgl but haven't come across a simple enough example.
Logged
tfranke
Administrator
Jr. Member
*****
Posts: 89


View Profile
« Reply #1 on: November 07, 2013, 10:22:47 am »

Hey gregdowning!

> How do you make a self illuminating texture?

Do you mean a texture that has an emissive component? Like a glow effect, or an area light?
Logged
gregdowning
Newbie
*
Posts: 3


View Profile
« Reply #2 on: November 07, 2013, 07:45:31 pm »

Hi tfrank,

Neither a glow or an area light. I want the texture to be self lit. It should not receive shadows or light. This is common for panoramas or sky boxes and a few other applications. If you are playing a game you would not want to sky to receive lights or shadows.

If you put a panorama on a sphere and you have a solid white cloud, as you rotate the sphere and the cloud is at the edge of the sphere it should be no brighter or darker than it was when it was facing the camera, it makes the geometry disappear from the viewers perspective.
Logged
tfranke
Administrator
Jr. Member
*****
Posts: 89


View Profile
« Reply #3 on: November 08, 2013, 04:14:43 pm »

Ah yes, I got you! So you've got two options:

1) You can always write a shader yourself. Simply add a ComposedShader to your geometry and output colors only.

2) This is the easy way for you: add lit="FALSE" to any geometry container you have (for instance an IndexedFaceSet), which will turn off any shading behavior except for writing colors.

HTH

Cheers
Logged
gregdowning
Newbie
*
Posts: 3


View Profile
« Reply #4 on: November 08, 2013, 07:27:37 pm »

Awesome, Thanks TFranke! I will be giving the easy method a try!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines