Jump to content

Recommended Posts

Posted

Hi all,

 

when I create a number of cubes throu an array,

and I use CopyEntity(cube) in the constructor,

will the cubes all have the same material ?

If yes , how do I get arround it ?

 

 

cheers

Posted

You need to fill your array not by CopyEntity(), create each cube separate by CreateCube(). It loose instaces, but make different materials.

"Better" is big enemy of "good"

Posted

Thanks Guys,

 

EntityColor() works, but what is when I use Texture maps ?

I need to use a Texture atlas and change textures (UV coordinates)

in run time.

Are there any easy solutions arround ?

 

regards

Posted

Someone just posted a custom shader for UV scaling and scrolling (=offset), so theoretically it could be possible to use different UV offsets for cubes of the same material/shader, by telling the shader to use different offsets based on some value which different for each cube. The EntityColor could be one such value, so it could be used as a mapping value for a UV offset.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

Sounds like a "NO" as an answer to my question ; )

 

A Skybox with the usual format in extended form would work.

 

 

Would there be a problem to change the UV coords in run time ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...