create road with 2D texture

Hello, i have need help.

I want to create plane surface and apply road texture (png image), it’s possible with panda engine without use egg file ? how ?

thank’s for advance.

It’s not possible with this engine :open_mouth:

Sure it’s possible.
The easiest way is to use the CardMaker class:

from panda3d.core import *
from direct.showbase.ShowBase import ShowBase

class MyApp(ShowBase):

    def __init__(self):


        # setup the camera

        self.disableMouse(), -250., 130.), -30., 0.)

        # setup the lighting

        dir_light = DirectionalLight("dir_light")
        self.light = self.render.attachNewNode(dir_light)
        self.light.setColor((1., 1., 1., 1.))
        self.light.setHpr(45., -45., 0)

        # create the plane

        cm = CardMaker("plane")
        # set the size of the card (left, right, bottom, top - in XZ-plane)
        cm.setFrame(-100., 100., -100., 100.)
        self.plane = self.render.attachNewNode(cm.generate())
        # the card is created vertically in the XZ-plane, so it has to be rotated
        # to make it horizontal

        road_tex = self.loader.loadTexture("road_texture.png")

app = MyApp()

ok thank you very murch