Transparency in RB 3D again 
Author Message
 Transparency in RB 3D again

   Okay, Joe. I've managed to get an area of my image transparent.

   Basically, I have a fireball that's white in the middle with a yellow
and red halo around it. I want the white center to be opaque and the
outside area to be transparent. I made the outside of the fireball image
black and the corresponding mask area white. That part is transparent.
Wonderful. However the white center of the fireball is transparent, too,
even though its part of the mask picture is total black.

   This is confusing the hell out of me.

   Perhaps you could show me the code that would make this work like
I've come to expect from Photoshop masks, because I can't get my brain
around this pre/post-multiply thing.

   H-E-L-P!!!

--
 --



Tue, 16 Mar 2004 09:57:45 GMT  
 Transparency in RB 3D again


Quote:
>    Basically, I have a fireball that's white in the middle with a yellow
> and red halo around it. I want the white center to be opaque and the
> outside area to be transparent. I made the outside of the fireball image
> black and the corresponding mask area white. That part is transparent.
> Wonderful. However the white center of the fireball is transparent, too,
> even though its part of the mask picture is total black.

Hm.  That doesn't sound right... a black mask should make it opaque (no
matter what color the image is).

Please send me (privately) your images, and I'll try to see what's
going on.  If you like, also send me the "original" image you'd use
with photoshop masks, and I'll show you the code that makes it do the
same thing in RB.  (Though an explosion is a perfect place to take
advantage of the way Quesa/QD3D does transparency, by making some parts
appear to glow...)

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Wed, 17 Mar 2004 01:52:37 GMT  
 Transparency in RB 3D again


Quote:


> >    Basically, I have a fireball that's white in the middle with a yellow
> > and red halo around it. I want the white center to be opaque and the
> > outside area to be transparent. I made the outside of the fireball image
> > black and the corresponding mask area white. That part is transparent.
> > Wonderful. However the white center of the fireball is transparent, too,
> > even though its part of the mask picture is total black.

> Hm.  That doesn't sound right... a black mask should make it opaque (no
> matter what color the image is).

> Please send me (privately) your images, and I'll try to see what's
> going on.  If you like, also send me the "original" image you'd use
> with photoshop masks, and I'll show you the code that makes it do the
> same thing in RB.  (Though an explosion is a perfect place to take
> advantage of the way Quesa/QD3D does transparency, by making some parts
> appear to glow...)

> Cheers,
> - Joe

   OK. I'm a moron. It is working now, but the fireball comes out way
too dim in the middle. Its center is white but it comes out opaque gray.
The matching mask area is black. Does the mask have to be grayscale, or
does it matter?

--
 --



Wed, 17 Mar 2004 08:41:32 GMT  
 Transparency in RB 3D again


Quote:
>    OK. I'm a moron. It is working now, but the fireball comes out way
> too dim in the middle. Its center is white but it comes out opaque gray.
> The matching mask area is black. Does the mask have to be grayscale, or
> does it matter?

No, that's just lighting.  Turn it (and the camera) around so that the
light is shining on it more directly and it'll be bright instead of
dark.

Now, it's possible to avoid the shading by putting it in the background
group (instead of the rb3dspace.Objects group).  But this is a bit
tricky, since you have to reset its position every time the camera
moves -- I recommend you get on with the rest of your game, and come
back to this later.

Cheers,
- Joe

P.S. I do recommend you turn the camera around though; everything will
look better and brighter than the default camera orientation, which is
the way it is for dumb historical reasons.

--
,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Thu, 18 Mar 2004 00:53:35 GMT  
 Transparency in RB 3D again


Quote:


> >    OK. I'm a moron. It is working now, but the fireball comes out way
> > too dim in the middle. Its center is white but it comes out opaque gray.
> > The matching mask area is black. Does the mask have to be grayscale, or
> > does it matter?

> No, that's just lighting.  Turn it (and the camera) around so that the
> light is shining on it more directly and it'll be bright instead of
> dark.

> Now, it's possible to avoid the shading by putting it in the background
> group (instead of the rb3dspace.Objects group).  But this is a bit
> tricky, since you have to reset its position every time the camera
> moves -- I recommend you get on with the rest of your game, and come
> back to this later.

> Cheers,
> - Joe

> P.S. I do recommend you turn the camera around though; everything will
> look better and brighter than the default camera orientation, which is
> the way it is for dumb historical reasons.

   So the light is along -z facing the viewer by default? If I make a
3dmf file with just a light object in it and import it, will it add a
light? The syntax doesn't seem that hard.

--
 --



Thu, 18 Mar 2004 06:09:02 GMT  
 Transparency in RB 3D again

Quote:
> So the light is along -z facing the viewer by default? If I make a
> 3dmf file with just a light object in it and import it, will it add a
> light? The syntax doesn't seem that hard.

I've tried point, spot and directional lights and didnt get any to work. My
3dmf code may have been wrong, but Im sure light manipulation will be added
soon. I've also tried different types of objects. Spheres (ovoid or
something like that in the 3dmf lit.) would open, but the ball was too
polygonolized and I couldnt find a way to up the angle threshold. It uses
more polygons the closer the sphere is ( and vice versa ) but not enough.
Same effect in other 3dmf viewers so its not RBs fault. I was surprised and
happy to find that Polylines open fine; they are a lot of fun.

-laz



Thu, 18 Mar 2004 15:00:30 GMT  
 Transparency in RB 3D again


Quote:

> > So the light is along -z facing the viewer by default? If I make a
> > 3dmf file with just a light object in it and import it, will it add a
> > light? The syntax doesn't seem that hard.

> I've tried point, spot and directional lights and didnt get any to work. My
> 3dmf code may have been wrong, but Im sure light manipulation will be added
> soon. I've also tried different types of objects. Spheres (ovoid or
> something like that in the 3dmf lit.) would open, but the ball was too
> polygonolized and I couldnt find a way to up the angle threshold. It uses
> more polygons the closer the sphere is ( and vice versa ) but not enough.
> Same effect in other 3dmf viewers so its not RBs fault. I was surprised and
> happy to find that Polylines open fine; they are a lot of fun.

> -laz

   Yeah. I have a class now that does 4 of the primitives for me (box,
sphere, cone, and cylinder.) Now, if I can just get it to use imported
pictures as texture maps.

--
 --



Thu, 18 Mar 2004 23:07:27 GMT  
 Transparency in RB 3D again

Quote:
>    So the light is along -z facing the viewer by default?

Not directly; it's actually coming it at a 45 degree angle (from +x,
+y, +z I think).  So by default, the light is coming at you, but at an
angle.

Quote:
> If I make a 3dmf file with just a light object in it and import it, will
> it add a light? The syntax doesn't seem that hard.

Alas, no, it doesn't work that way.  Lights have to be submitted to the
rendering engine separately.  We hope to add support for additional
lights in future versions of RB.

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout         Check out the Mac Web Directory:     |

`------------------------------------------------------------------'



Fri, 19 Mar 2004 01:03:25 GMT  
 Transparency in RB 3D again


Quote:

> >    So the light is along -z facing the viewer by default?

> Not directly; it's actually coming it at a 45 degree angle (from +x,
> +y, +z I think).  So by default, the light is coming at you, but at an
> angle.

> > If I make a 3dmf file with just a light object in it and import it, will
> > it add a light? The syntax doesn't seem that hard.

> Alas, no, it doesn't work that way.  Lights have to be submitted to the
> rendering engine separately.  We hope to add support for additional
> lights in future versions of RB.

> Cheers,
> - Joe

I wish I'd realized before I started coding. Now I have to rotate
everything 180 degrees. Arggghhhhiiiieeee!!!!

--
 --



Fri, 19 Mar 2004 01:17:52 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. AGAIN: Transparency of GIFS

2. Scheme vs ML again and again and again and again

3. Scheme vs ML again and again and again and again

4. RB and AppleScript question again.

5. calling applescript from RB again

6. Reading PDF from RB (Again)

7. Posting again : help needed, ideas for 2 player network game + 3d graphics

8. 3D Tech is up and running again

9. RB QuickStart Guider from RB

10. launching an RB app from another RB app - appleevents

11. RB Entwickler gesucht / RB Developers wanted

12. RB: row order by RB database

 

 
Powered by phpBB® Forum Software