Plasma Lighting?

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Plasma Lighting?

Postby bnewton81 » Sun Feb 06, 2011 1:13 pm

Is there anything special about lighting in Plasma? I am wondering because i added some lights to my age and when i link in the age is not lit as it was in blender. I don't see the falloff i did in blender. The whole age is perfectly lit with no shadows. I did turn off shadowbuff in blender for each of the lights, so that may be the reason, but it still seems that plasma or PyPRP handles lighting differently than blender. Am i wrong? I just added one spot at the end of a tunnel with .2 energy and it lit the entire tunnel prefectly evenly and not at .2 power.
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Plasma Lighting?

Postby ZURI » Sun Feb 06, 2011 2:23 pm

Bnewton,

You'll need to take a few extra steps to improve the lighting in your ages. I'd recommend reading Andylegate's Lightmap tutorial @ http://dusty.homeunix.net/wiki/Light_Maps.

Hope this helps!

Zuri
MOULagain KI: 45001
User avatar
ZURI
 
Posts: 366
Joined: Mon Nov 16, 2009 8:34 pm
Location: Cincinnati

Re: Plasma Lighting?

Postby bnewton81 » Sun Feb 06, 2011 3:10 pm

Ok, I have read Andy's light mapping tut. This was very helpful. i do have one question though: what happens to the 1st texture? He starts with 1 texture and then adds a lightmap as a second texture mapped to COL and Amb. Won't that cover up the 1st texture completely?
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Plasma Lighting?

Postby tachzusamm » Sun Feb 06, 2011 3:23 pm

bnewton81 wrote:Is there anything special about lighting in Plasma? I am wondering because i added some lights to my age and when i link in the age is not lit as it was in blender. I don't see the falloff i did in blender. The whole age is perfectly lit with no shadows.


bnewton81 wrote:[..] but it still seems that plasma or PyPRP handles lighting differently than blender. Am i wrong? I just added one spot at the end of a tunnel with .2 energy and it lit the entire tunnel prefectly evenly and not at .2 power.

Yes, Plasma lighting is really special. This is because Plasma does not "render" scenes like Blender does, but calculates lighting in real time (or tries to do so).
Rendering (calculating realistic views) is a very time-consuming process, even the shading method used in Blender's viewport for working with models.
Plasma does not really render scenes - it just tries to add some shadows (if enabled), but it cannot handle shading in dependency of the object-to-lightsource distance to produce a realistic lighting impression - with the exception of the avatar's lighting.

bnewton81 wrote:I did turn off shadowbuff in blender for each of the lights, so that may be the reason,

Well, you did it completely right when disabling shadbuf. But I'm not sure what you mean with "for each of the lights". Shadbuf can be disabled for objects, but not for light sources.

Leaving Shadbuf enabled for objects (unfortunatelly the default for new objects) is what will cause the most lag in an Age. Unless you absolutely need dynamic shadows (shadows dependent of a lightsource's position) for an object, you should switch off Shadbuf for each object.

Some explanation:
- The "Shadbuf" switch determines if an object should *generate* a shadow.
- The "Shadeless" switch determines if an object should not *receive* shadows (and light). (In fact, Shadeless ON means "don't receive shadows / light")
Note: An object with Shadeless ON will still be lit in Plasma/URU, because in this case you adjust the emitting light of the object with the Amb slider (default 0.5), in conjuction with the object's "Col" color under Material tab, and together with the texture. But this works independently of any light source.

The best way for Plasma is to either *paint* shadows with vertex painting (fast and easy way), or to generate lightmaps (a bit more complex).

And to understand how different light sources work, you may be interested in reading this:
viewtopic.php?p=48473#p48473


bnewton81 wrote:He starts with 1 texture and then adds a lightmap as a second texture mapped to COL and Amb. Won't that cover up the 1st texture completely?

No, because Andy generates a second texture. See text and image below "Moving along....."
EDIT: Oh, wait. Seems I misunderstood "cover up". Well, no - because he set the second texture to "Multiply" instead of "Mix" under "Map To" tab - which will keep the first texture, and the second texture works as a pixel-based light factor then. So each pixel of the 1st texture goes 1:1 where the belonging pixel in the 2nd texture is white, and it will be darker where pixels of the 2nd texture become darker as well. Imagine the second texture as sunglasses with a grayscale texture.
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Plasma Lighting?

Postby bnewton81 » Sun Feb 06, 2011 10:46 pm

Whoa! You answered a lot of my questions Tachzusamm. Really. I meant to say i turned off the raytracing and shadow buffers on each of my lights. Totally blew my mind with the multiply thing at the end! I never really did understand what those did.

My avatar is all black in age. How can i light him? Do i need to place floods to hit him at all four angles of a room? Not a big problem really as most play in 1st person anyway, but I'd like to know.
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Re: Plasma Lighting?

Postby Lontahv » Sun Feb 06, 2011 10:58 pm

I would recommend just starting with the "Lamp" type. You'll need to set the distance (it will be a box called "Dist:") of these lamps to something like 100 if it's relatively close to the avatar you're trying to light and something like 1000 if it's far away. The numbers are huge and don't really match with the way things are displayed in Blender, however, for PyPRP you will need all your lamp distances to be large numbers.
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: Plasma Lighting?

Postby tachzusamm » Mon Feb 07, 2011 3:46 am

Lontahv wrote:[..]however, for PyPRP you will need all your lamp distances to be large numbers.

I would like to add a note here. For the lamp type "sun" it's not a good idea to choose a large number.
As Trylon wrote in his "first age" tutorial here : http://www.guildofwriters.com/wiki/Addi ... of_surface
When adding lights with ray shadow enabled, take care to keep the dist value below 100 or so, or the resulting shadows may 'clip' or vanish entirely.

And this is true for a lamp type "sun". I made that mistake myselves. In fact, a sun lits a scene in Plasma regardless of it's dist value, so I did not take care about the value.
But I experienced a disappearing avatar shadow sometimes, because I've set the distance to about 200. Reducing the distance to 80 (below 100) solved the problem.
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Plasma Lighting?

Postby andylegate » Mon Feb 07, 2011 4:35 am

I would really recommend saving the Light Maps for later. And use them only sparingly, like in enclosed areas (house, cave, etc, NOT outside).

Golden Rule is: Use lights to light your Avatar, not your Age.

Of course rules can be bent, stretched and broken.

But as you noted: You avatar was all black.

When you import a Cyan Age into blender, you won't see a lot of lights. That's not because they didn't use a lot, but because they used Max, and in Max you have 2 types of Lights: Max Standard and Plasma Run Time. The Max Standard lights are used to light objects, but are NOT exported with the Age. Only the effect they have is. Plasma Run Time is used to light the player and animated objects, and they are exported with the Age.

However, for your objects themselves: try to light your Age with the textures. You can control the color of and the brightness of them in the Materials Panel. That is kind of what Light Maps do, but they are mostly for helping display light splashes and shadows. Depending on lights to completely light your Age and avatar can be very hard (note I didn't say impossible, just very hard). You'll find it much easier to use the lights for lighting up the player, and depend up on the textures and materials to give your Age's objects there sense of lighting.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Plasma Lighting?

Postby tachzusamm » Mon Feb 07, 2011 5:11 am

And if you don't use 3DSMax and therefore don't have access to the Max Standard and Plasma Run Time lights, you can emulate them this way in Blender:

Emulating Max Standard lights for lighting objects (creating lightmaps for them, that is);
Insert extra lamps in Blender with the purpose of just creating light maps.
The light maps lamps get the logic property (type: "string"), (name: "page_num"), (value: "12345"), so they don't export to URU, but you can keep them in your Blender file to generate or modify your light maps, even later.

Emulating Plasma Run Time lights for the avatar and dynamically lit objects:
For the real lamps you want in URU, switch off the "Restrict / Allow renderability" button in the outliner (it's the rightmost image icon) - this way they are only exported to URU but don't affect your lightmap generation.
User avatar
tachzusamm
 
Posts: 575
Joined: Thu May 29, 2008 2:03 am
Location: Germany

Re: Plasma Lighting?

Postby bnewton81 » Mon Feb 07, 2011 12:59 pm

Holy Fword! I had no idea this was going to be so complex. Seems like every detail to making an age is a different school of study in its self. My bwain hurt.

So how do you change the brightness of an object? Emit ?

Makes great sense to light everything this way, but for true Myst ambiance it is unavoidable to use shadows around every in game light source. Ya know all the wall sconces, hanging lamps, desk lamps, glowy objects, etc. I know this means vast amounts of extra light mapping work, but I'd rather have one really good room than an entire age that lacks the realism necessary to immerse its visitors. In my opinion if the player can't get lost in your age's ambiance, then you have wasted your time. After all isn't that one of the biggest reasons we are all here, to be as much like the fictional D'ni as possible?

You guys always help me tons. Thanks for it.
User avatar
bnewton81
 
Posts: 296
Joined: Sat Aug 28, 2010 3:24 pm
Location: Houston, Texas

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 2 guests

cron