pict3d and pixel maps for textures

54 views
Skip to first unread message

Hendrik Boom

unread,
Sep 21, 2019, 10:55:01 PM9/21/19
to Racket Users
Is there a way to paste a pixel map (such as a .png ?) to
a face of one of the objects in pict3d? If so, I haven't found it.

I'd like to paint the objects with interesting textures.

-- hendrik

Stephen De Gabrielle

unread,
Sep 24, 2019, 4:58:35 AM9/24/19
to Racket Users
Hi Hendrik

Did you work out how to do this ? I’m also interested.

Kr

Stephen

Hendrik Boom

unread,
Sep 24, 2019, 7:05:20 AM9/24/19
to Racket Users
On Tue, Sep 24, 2019 at 01:58:35AM -0700, Stephen De Gabrielle wrote:
> Hi Hendrik
>
> Did you work out how to do this ? I’m also interested.

No. Not at all. I'm starting to look at using am OpenGL binding
instead for my projects .. but that looks much more difficult. I'm
still hoping for a solution -- or being told that the design of Pict3D
precudes there ever being one.

-- hendrik

Stephen De Gabrielle

unread,
Sep 24, 2019, 3:59:46 PM9/24/19
to Racket Users
I'm building it now so have a go. Not hopeful because the none of the tests/examples include any files that could be used as bitmap textures. I'm going to dig deeper because maybe the textures are picts?

Failing that It might be possible to add textures. Not my area of expertise, but worth a look.

s.

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20190924110511.juimc6houwkmbxbq%40topoi.pooq.com.

Hendrik Boom

unread,
Sep 24, 2019, 4:51:08 PM9/24/19
to Racket Users
On Tue, Sep 24, 2019 at 08:59:31PM +0100, Stephen De Gabrielle wrote:
> I'm building it now so have a go. Not hopeful because the none of the
> tests/examples include any files that could be used as bitmap textures. I'm
> going to dig deeper because maybe the textures are picts?

Sounds like a plausibe guess. And the pict package does have a
mechanism for textures, if I recall correctly.

-- hendrik

>
> Failing that It might be possible to add textures. Not my area of
> expertise, but worth a look.

And those textures would have to go through the rotating and twisting
transformations... or possibly manage to wrap around surfaces or
revolution. Might be complicated. Maybe I'll have to look at using
OpenGL directly if I want to produce anything soon.

Unfortunately, the Racket-like opernGL is poorly documented. Even the
simple 4-line example I found in the documentation runs but does
nothing visible.

I was hoping to use Racket in Ludum Dare in about 10 days.
Maybe I'll have to restrict myself to 2D. Or a text-only game.
Haven't done one of those yet.

-- hendrik

>
> s.
>
> On Tue, Sep 24, 2019 at 12:05 PM Hendrik Boom <hen...@topoi.pooq.com>
> wrote:
>
> > On Tue, Sep 24, 2019 at 01:58:35AM -0700, Stephen De Gabrielle wrote:
> > > Hi Hendrik
> > >
> > > Did you work out how to do this ? I’m also interested.
> >
> > No. Not at all. I'm starting to look at using am OpenGL binding
> > instead for my projects .. but that looks much more difficult. I'm
> > still hoping for a solution -- or being told that the design of Pict3D
> > precudes there ever being one.
> >
> > -- hendrik
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to racket-users...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/racket-users/20190924110511.juimc6houwkmbxbq%40topoi.pooq.com
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAGHj7-LbNKHUPE%3Dn9UytujPM4RhfAM_RYzTDn%3D2LeeiNDJNmCQ%40mail.gmail.com.

Hendrik Boom

unread,
Sep 25, 2019, 9:30:13 AM9/25/19
to Racket Users
On Tue, Sep 24, 2019 at 08:59:31PM +0100, Stephen De Gabrielle wrote:
> I'm building it now so have a go. Not hopeful because the none of the
> tests/examples include any files that could be used as bitmap textures. I'm
> going to dig deeper because maybe the textures are picts?
>
> Failing that It might be possible to add textures. Not my area of
> expertise, but worth a look.

In my ~/.racket/snapshot/pkgs/pict3d/TODO.txt file, under 'hard' it says

Figure out a nice functional API for textures

So I suspect that pict3D has no texture mapping yet. And I suspect it's
not just figuring out the API that's hard; I suspect that implementing
it will be harder still. Mapping a texture around a twisted rectanguar
box? Figuring out how to specify which faceof a cube gets a texture?
Is there even a way of talking about specific cube faces in pict3d?

-- hendrik

>
> s.
>
> On Tue, Sep 24, 2019 at 12:05 PM Hendrik Boom <hen...@topoi.pooq.com>
> wrote:
>
> > On Tue, Sep 24, 2019 at 01:58:35AM -0700, Stephen De Gabrielle wrote:
> > > Hi Hendrik
> > >
> > > Did you work out how to do this ? I’m also interested.
> >
> > No. Not at all. I'm starting to look at using am OpenGL binding
> > instead for my projects .. but that looks much more difficult. I'm
> > still hoping for a solution -- or being told that the design of Pict3D
> > precudes there ever being one.
> >
> > -- hendrik
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to racket-users...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/racket-users/20190924110511.juimc6houwkmbxbq%40topoi.pooq.com
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAGHj7-LbNKHUPE%3Dn9UytujPM4RhfAM_RYzTDn%3D2LeeiNDJNmCQ%40mail.gmail.com.

Hendrik Boom

unread,
Sep 25, 2019, 9:37:56 AM9/25/19
to Racket Users
On Wed, Sep 25, 2019 at 09:30:07AM -0400, Hendrik Boom wrote:
> On Tue, Sep 24, 2019 at 08:59:31PM +0100, Stephen De Gabrielle wrote:
> > I'm building it now so have a go. Not hopeful because the none of the
> > tests/examples include any files that could be used as bitmap textures. I'm
> > going to dig deeper because maybe the textures are picts?
> >
> > Failing that It might be possible to add textures. Not my area of
> > expertise, but worth a look.
>
> In my ~/.racket/snapshot/pkgs/pict3d/TODO.txt file, under 'hard' it says
>
> Figure out a nice functional API for textures
>
> So I suspect that pict3D has no texture mapping yet. And I suspect it's
> not just figuring out the API that's hard; I suspect that implementing
> it will be harder still. Mapping a texture around a twisted rectanguar
> box? Figuring out how to specify which faceof a cube gets a texture?
> Is there even a way of talking about specific cube faces in pict3d?

Unless someone already has this nearly finished and almost ready to check
into the next release, I suspect it'll be more than a few weeks' work
to accomplish this.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/20190925133007.juxijnj7b5ohtxyz%40topoi.pooq.com.
Reply all
Reply to author
Forward
0 new messages