Author Topic: Still Another Suggestion...  (Read 5194 times)

Offline PrimordialSoup

  • byte
  • *
  • Posts: 9
    • View Profile
Still Another Suggestion...
« on: March 08, 2003, 05:26:10 am »
I hope I'm not annoying you, but I have another idea, one I've actually been meaning to suggest since I looked closely at java.awt.color a couple of months ago.  I've just been forgeting to suggest...

Anyway, I was looking at java.awt.color and I noticed that all color objects have an alpha value associated with them that determines transparency.

I was wondering if setAdditionalColor() supports the alpha value.  If it doesn't use it, why not?  It seems a simple way to set both the color and the transparency of an object in one swoop...

I think it would be cool if it worked like that...

Thanx.
reating life isn't that hard.  Creating the UNIVERSE for it to live in is HARD!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Still Another Suggestion...
« Reply #1 on: March 10, 2003, 08:01:13 pm »
I understand your point, but i'm undecided if i should support it that way. The thing is, that making setAdditionalColor() support the transparency as well somehow collides with the naming of this method (because the transparency isn't an additional color at all...it's a basic property of the Object3D and it should be treated like that IMO). Maybe i'll add another method that does this combined setting instead...any suggestions for the naming of this thing?
I've added the setScale()-method you requested and it will be included in the next release that should surface within some days (at least i hope so). Anyway, the scale()-method is buggy in 0.84...the normals will be screwed up if more than one scaling is applied to the same object. Ever noticed that as a problem?

Offline PrimordialSoup

  • byte
  • *
  • Posts: 9
    • View Profile
Naming...
« Reply #2 on: March 13, 2003, 10:45:08 pm »
You could call the method setColor() using a java.awt.Color object as a parameter, under the assumption that the alpha value is a part of the color.

If that's not descriptive enough, perhaps setTransparentColor() would work...

And if you provide both setAdditionalColor() and setTransparentColor(), setTransparentColor() could just call setAdditionalColor() and then set the transparency for the object.

Also, what do you mean by normals?
Remember, you're talking to someone that is illiterate when it comes to 3D rendering terminology...
reating life isn't that hard.  Creating the UNIVERSE for it to live in is HARD!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Still Another Suggestion...
« Reply #3 on: March 14, 2003, 12:13:56 am »
I think i like the setTransparentColor()-idea the most. I think i'll add it. I don't know when the next release will be ready though. My new machine and my dev. environment are fine now, but i thougt it might be a good idea to put some Cyanacrylat glue (no...don't ask how this happened) into my left eye...this makes it quite difficult to see things clear...:cry:
Anyway, normals are used for lighting and backface culling and similar stuff. Every vertex of a Object3D is associated with a normal vector, which is rotated and translated together with the object. When scaling is used, the normals are scaled too...but they shouldn't because they have to be normalized (length==1)...hence the name. So they have to be adjusted afterwards. In 0.84 (and all former versions) this rescaling is buggy. The result is, that the object appears too bright or dark, depending on scaling. 0.85 will fix this.

Offline Ambience

  • byte
  • *
  • Posts: 2
    • View Profile
Still Another Suggestion...
« Reply #4 on: May 30, 2003, 03:07:58 am »
Not that it would really matter, but i can't find that setTransparentColor() method you mentioned. Did you forget to add it or am i blind?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Still Another Suggestion...
« Reply #5 on: June 02, 2003, 10:30:55 pm »
Quote from: "Ambience"
Not that it would really matter, but i can't find that setTransparentColor() method you mentioned. Did you forget to add it or am i blind?
Yes, i guess i've missed that one...not a big loss though. Maybe i'll add it to a later version.