realbasic-games
[Top] [All Lists]

Re: How do I assign a texture to a material in RB3D?

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: How do I assign a texture to a material in RB3D?
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Thu, 17 Nov 2005 08:22:34 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <437BF864 dot 7050508 at optonline dot net>
At 10:26 PM -0500 11/16/05, Daniel Lurie wrote:

I tried doing myMaterial.texture=newpicture(64,64,32).

That'll work if you watn your texture to be blank.

 I tried making a separate picture object p and doing myMaterial.texture=p.

That should work fine to set the texture to p. Note that this statement generates a texture from the given picture; you can't subsequently modify p and expect the texture to reflect it.

Neither works. Texture comes back as nil.

That's really odd! Yet you're able to load and display textured objects from files?

Also, the examples don't demonstrate making a material, so I've exhausted all the obvious things to attempt.

I'm quite sure that the Trimesh Explorer example *does* make a material; it also lets you paste in any picture to replace the texture of an existing material.

Best,
- Joe

--
Joe Strout                          REAL Software, Inc.

Vote for REALbasic (twice!) in the LinuxWorld Reader's Choice Awards:
http://linux.sys-con.com/general/readerschoice.htm
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>