Entity Light and Entity Camera suggestions
issueid=78 19-10-2008 16:43
Member
Number of reported issues by ISAWHIM: 11
Entity Light and Entity Camera suggestions

I recently had an issue with mixing "Entity" items and the RawGL versions of the same code. I believe you explained it perfectly, when you said, "You should not mix RawGL control with Entity control items."

In short... "Entities" are a controlled set of RawGL, as I understand it. I was sending conflicting controls to a controlled item. Specifically, "Lighting" and "Perspective".

However, some control elements are not available, at the moment, which is what led me to using RawGL commands. Lighting seems to have a default "Ambient", and the control entity does not offer control of "Specular" and "Diffuse". The camera also has a limitation of using the "Fixed field of view", or "Perspective".

Looking through the commands for entities...

You already have the...
TBGL_EntitySetColor
TBGL_EntitySetCutoff

Why not just add...
TBGL_EntitySetAmbient
TBGL_EntitySetSpecular
TBGL_EntitySetDiffuse
Specific to the light-entity control.

Color would just be a generic version of Specular&Diffuse as one value...

Just trying to suggest what I would imagine I would have to type or search for, if I did not have the help-file at my disposal. (Some of the "Custom" commands don't always make sense to me.)

One thought about light-limitations and control, which could be done semi-automatically, or optionally as a setting...

For entity control of lights... could you just calculate the 8-nearest to Active-Camera? Which would allow hundreds of scene lights, but only the 8 nearest you would be turned-on. (Which I imagine the user would normally be doing in the programming. Such as quake, where lights are in a zone, and they program zone-control to turn lights on and off. But they also setup MAX-Lights to 32, which is a little much, but would be handy.)

On that same respect...
For Cameras... you don't allow "TBGL_EntitySetScale"...

On a camera, the "Scale" is the zoom-factor. Why not just use that as the input for FOV. You would only have to mention, in the help-file... "Scale for a camera element is the zoom (FOV)."

The normal scale for an entity is...
(Entity, x, y, z)

However, Camera scale could be...
(Entity, ANGLE) {Ratio L/W auto set to screen ratio, EG-optional} {Distance=Viewdistance, EG-not used}
or
(Entity, ANGLE, L/W-ratio) {Distance=Viewdistance, EG-not used}
Using the same function, but it would have a specific operation for a camera entity.
Issue Details
Issue Number 78
Issue Type Feature
Project TBGL
Category Unknown
Status Implemented
Priority Unknown
Suggested Version Unknown
Implemented Version (none)
Votes for this feature 0
Votes against this feature 0
Assigned Users (none)
Tags (none)




19-10-2008 20:46
Super Moderator
Hi Jason,

Light properties
Very easy to do, will work on it in following weeks.

Simulated multilights
Must examine whether I will need multiple render passes or not to do it.Should be realisable.

FOV for camera via TBGL_EntitySetScale
Adding FOV control to camera is good, I would just like to know others if they are ok with using TBGL_EntitySetScale or if they would prefer dedicated name of command.


Thank you,
Petr

19-10-2008 23:42
thinBasic MVPs
Maybe 2 commands Petr. If you using entities then scale of entity would be perfect.
If straight tbgl then a FOV command would be perfect.

The help file could make a mention of both similar commands and why there are 2 that do the same thing.
Since 2 different workflows, having 2 commands makes sense to me.

20-10-2008 05:59
Super Moderator
I second that.

20-10-2008 19:21
Super Moderator
Thanks guys,

will keep it in mind.


Petr

+ Reply