Cubemap?

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Cubemap?

Post by VilleK »

Someone on FL Studio forums asked how to use a cubemap in ZGE. I remember seeing this but when I search the ZGE forums I only find mentions of it but no project. Maybe Kjell happen to have an example lying around? :)
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Cubemap?

Post by Kjell »

Hej Ville,
VilleK wrote: Wed Jun 08, 2022 7:18 amSomeone on FL Studio forums asked how to use a cubemap in ZGE. I remember seeing this but when I search the ZGE forums I only find mentions of it but no project.
Can't seem to find it either :P
VilleK wrote: Wed Jun 08, 2022 7:18 amMaybe Kjell happen to have an example lying around?
Depends a little on what this person means with "cubemap".

- Creating a real OpenGL cube-map for use with OpenGL features or a samplerCube in a shader?
- Applying 6 individual images to a cube to create a sky-box / panorama-image ( a.k.a. fake cube-map )?
- Using a single horizontal-cross ( see below for example ) image for either a real of a fake cube-map?

Image

Anyway, attached is a example of a real OpenGL cube-map generated from 6 individual Bitmap components ( and a quick & sloppy reflection demo ). It's a little clumsy, but there's no elegant way around it .. aside from adding a CubeMap component obviously :wink:

K
Attachments
Cubemap.zgeproj
(273.5 KiB) Downloaded 160 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Cubemap?

Post by VilleK »

That looks great, thanks!
Kjell wrote: Wed Jun 08, 2022 10:31 am Creating a real OpenGL cube-map for use with OpenGL features or a samplerCube in a shader?
Yes I think a samplerCube in a shader is the next step because the question mentioned this shader: https://www.shadertoy.com/view/Wl3fWX

I will reply to the user and ask for more details. It is in a private forum so cannot post the link here.
Post Reply