Subject:
|
Re: Chrome Parts
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Fri, 9 Aug 2002 18:01:41 GMT
|
Viewed:
|
938 times
|
| |
| |
In lugnet.cad, Travis Cobbs writes:
> > > Gold: http://www.ldraw.org/library/official/images/334/3001.png
> > > Silver: http://www.ldraw.org/library/official/images/383/3001.png
>
> At a guess by looking at the two images, the gold specular is set up to be
> shiny for a wider angle, which causes the studs to be shiny in the sample
> gold image. You'll note that the rest of the brick isn't really shiny at
> all from this viewing/lighting angle. Then again, it just might be an
> artifact of the color chosen that makes the eye think that it is a
> distinctive material property.
You guessed it, or did you sneak a look at the code. ;)
> The specular angle is controlled by the specular exponent, which in OpenGL
> is accomplished with the GL_SHININESS parameter to glMaterialf. LDView uses
> 64 for all opaque surfaces and 128 (the max) for all transparent surfaces.
> As it turns out, the lower this value is, the wider the specular angle is.
> Toying around with it, I discovered that a value of 3 (out of 128) produces
> an angle that is wide enough to be visible in LDView on the studs of a brick
> in the default viewing angle. (Setting it to 0 causes the exact specular
> color you specify to be used from all angles).
That's interesting. I used a value of 15 for for the gold, and 50 for
the silver. Apparently 15 produces a wide enough angle for my default
view and light positions.
I don't like the regular bricks to be shiny so I disable the specular
component for them. I'll have to think about adding it for transparent
surfaces though.
> The only other specular changes currently in LDView are dropping the
> GL_SPECULAR color for black rubber to be dark gray (7.5%), while the
> specular color for other opaque colors is medium gray (50%), and transparent
> colors is light gray (75%). One thing you should be aware of is that it is
> perfectly legitimate to set your specular color to be more than 100%. The
> final colors are all clamped to 100% in the frame buffer, but if you use
> values greater than 1.0 for your color components, it will actually cause it
> to be brighter. Using non-gray specular colors might also produce a more
> metallic looking surface (at least for gold), but I'm not sure about this.
Now that's really interesting. I don't use gray for the specular color.
I use the same color as the metallic surface. I think it looks pretty
good on the gold (and on the silver when I switch to shininess value of
15). I'll have to test and see how gray looks in comparison.
> For Mac off-screen rendering, try sending e-mail to Alex Raftis (who is
> working on the Mac OS X port of LDView): alex@REMOVE.raftis.net. I'm pretty
> sure he uses off-screen rendering for his printing support. It will be Mac
> OS X-specific (probably Cocoa code), so I'm not sure how well it will
> integrate to your GLUT usage.
Well, so far the offscreen rendering code is either MESA or Windows
specific anyhow, so this shouldn't be much different. I think I
bypass GLUT in both cases to get the offscreen opengl context.
Don
|
|
Message is in Reply To:
| | Re: Chrome Parts
|
| (...) At a guess by looking at the two images, the gold specular is set up to be shiny for a wider angle, which causes the studs to be shiny in the sample gold image. You'll note that the rest of the brick isn't really shiny at all from this (...) (22 years ago, 9-Aug-02, to lugnet.cad)
|
25 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|