<PAGE>

                                                                   Exhibit 10.4

                               TREX COMPANY, INC.
         Amended and Restated 1999 Incentive Plan for Outside Directors
               Non-Incentive Stock Option Agreement for Directors


<TABLE>
<S>                    <C>                                      <C>
Grant Date: _________  Stock Option Exercise Price: $_________  Last Date to Exercise: _______ /1/
</TABLE>


Number of Shares of Common Stock
Covered by Grant of Options:  ________________________

We are pleased to inform you that the Board of Directors or the Compensation
Committee of the Board of Directors has granted you an option to purchase Trex
Company, Inc. common stock. Your grant has been made under the Company's Amended
and Restated 1999 Incentive Plan for Outside Directors (the "Plan"), which,
together with the terms contained in this Agreement, sets forth the terms and
conditions of your grant and is incorporated herein by reference. A copy of the
Plan is attached. Please review it carefully. If any provisions of the Agreement
should appear to be inconsistent with the Plan, the Plan will control.



                                              This stock option grant has been
                                              executed and delivered as of
                                              __________ ___, _____ on behalf of
                                              Trex Company, Inc.


                                              _________________________________
                                              Name:
                                              Title:

ACCEPTED AND AGREED TO:


__________________________
Name of  Optionee:



  This is not a stock certificate or a negotiable instrument. Transferable only
pursuant to Section 11.2 of the Company's Amended and Restated 1999 Stock Option
                               and Incentive Plan.


---------------------
/1/ Certain events can cause an earlier termination of the Option. See "Effects
of Changes in Capitalization" in the Plan.

<PAGE>

1. Vesting:

Subject to the terms of the Plan, the Option becomes vested as to 100% of the
shares of Stock purchasable pursuant to the Option on the first anniversary of
the date of grant of the Option, if Optionee has been providing services to the
Company or a Subsidiary continuously from the Option's date of grant to the
first anniversary of the date of grant. Notwithstanding the foregoing, if you
terminate service as a Director with the Company and such termination is not for
Cause, the Option shall become 100% vested upon your termination.

2. Exercise:

You may exercise this Option, in whole or in part, to purchase a whole number of
vested shares at any time of not less than 100 shares, unless the number of
shares purchased is the total number available for purchase under the Option, by
following the exercise procedures as set forth in the Plan. All exercises must
take place before the Last Date to Exercise (shown on the covers sheet), or such
earlier termination of the Option. The number of shares you may purchase as of
any date cannot exceed the total number of shares vested by that date, less any
shares you have previously acquired by exercising this Option.

3. Option Termination:

Your Option will terminate immediately upon termination of your service for
"Cause." If your service terminates for a reason other than for Cause, the
Option will expire five (5) years after your termination, or, if earlier,
immediately after the Last Date to Exercise. "Cause" means, as determined by the
Board, (i) gross negligence or willful misconduct in connection with the
performance of duties; (ii) conviction of a felony or of a crime involving moral
turpitude; or (iii) material breach of any term of any employment, consulting or
other services, confidentiality, intellectual property or non-competition
agreements.

4. Taxes and Withholding:

This Option shall not constitute an incentive stock option within the meaning of
Section 422 of the Internal Revenue Code of 1986, as amended. In the event that
the Company determines that any federal, state, local or foreign tax or
withholding payment is required relating to the exercise or sale of shares
arising from this grant, the Company shall have the right to require such
payments from you, or withhold such amounts from other payments due to you from
the Company, a Subsidiary or an Affiliate.

5. Transferability:

The Option may be transferred in a manner consistent with Section 11.2 of the
Company's Amended and Restated 1999 Stock Option and Incentive Plan.

                                    * * * * *