Jump to content

Recommended Posts

Posted

I can't seem to get the surface of a mdl. Counting surfaces produces zero. Using an engine created model like Box does work just not loaded models. Anyone else have this issue? I assume it should be possible right?

Posted

Thanks for the help, it does seem to be working for that person above. Yeah nothing fancy in the code just a basic test here. Maybe something going wrong with the fbx export from blender, but if that was the case I wouldn't think the object would be visible at all. 

        window = Window:Create()
        context = Context:Create(window)
        world = World:Create() 
        local camera = Camera:Create() 
        camera:SetRotation(35,0,0) 
        camera:Move(0,0,-7) 
        local light = DirectionalLight:Create() 
        light:SetRotation(35,35,0) 
        
        --Create a model
        modelWorks = Model:Box() 
		modelDoesntWork = Model:Load("Models/ico.mdl")
 
		System:Print(modelWorks:CountSurfaces()) --1
        System:Print(modelDoesntWork:CountSurfaces()) --0
  
        
        while true do        
            if window:Closed() or window:KeyHit(Key.Escape) then return false end

                Time:Update()               
                world:Update()
                world:Render()
                context:Sync()

        end

 

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...