Jump to content

Function to generate mipmaps (or realtime cubemaps in lua)


shadmar
 Share

Recommended Posts

Hi

 

Will LE3D have such a functionality so we can have realtime cubemaps done in lua ?

As I understand after reading several posts, we can't do realtime cubemaps in LE2 (lua) because cubemaps generated from FBO doesn't have any mipmaps. (renders black) which ruins my fun :)

 

Or just the same, will it be possible to do realtime cubemaps in LE3D in lua (without using opengl directly via c++ as klepto2 has done).

 

Don't get me wrong, I like c++ just as much as the next guy, but I like using the editor and have smart lua objects.

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

The fastest way to do this is to render from one texture to a buffer, halving it each time. This is how downsampling for bloom works. Any downsampling done on the CPU would be far too slow.

 

I don't generally worry about devoting time to stuff for real-time cube mapping because it isn't a feasible technique to begin with. You're talking about rendering the scene 6 extra times.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

semi real-time is better performance wise. Just render one side of the cube each frame. After 6 frames you've done the whole thing. If you make it small enough and ignore shadows and lighting the performance hit is small. And you don't have to render all the renderables, so to speak.

 

All the functions to do this are already present, it just requires some assembly. Someone posted something in the gallery a while back.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

I think at least we should be able to render a cubemap from buffers using lua.

To snapshot an envmap cubemap when needed.

 

+1

Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...