Search Unity

Custom Rendering with LWRP/Universal

Discussion in 'Universal Render Pipeline' started by daxiongmao, Oct 17, 2019.

  1. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    412
    In my current project I have a set of rooms. I know the objects in these rooms and I know the lights as well.

    I would like to use the LWRP/URP to hopefully to be able to render out each room.
    I would like to render the room and all its children objects, corresponding lights together.
    Then move on to the next room.

    Having started looking at the source I seems like everything is really just culled bassed on some filters and then rendered. With the various passes.

    I am wondering if its possible to say render a subset of objects and associated lights.

    foreach(Camera)
    foreach(Room)
    Render(RoomObjects, RoomLights)

    Or would it be better to adjust render layers / enable game objects, then re-cull and render for each room. Ideally I would like the option to have per room shadow casting lights etc.

    I am aware of layers, but a level may have more than 32 rooms on the screen at a time. I don't want to use layers as a way to separate rooms, unless it was to assign a single room to a layer, culll render, then set next room to that layer repeat.

    Anyone do anything like this? Any opinions on which method?

    Thanks
     
  2. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    412
    Looking more I guess the culling i was seeing seems to be more for the lighting.
    And the DrawRenderers seems to take just some various properties to what i am guessing is internally cull the renders that match.
    So far I haven't found a way a way to specify a fixed list of object to be rendered

    Looking more like will have to put objects an active layer kind of thing.